Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to discard points with no altitude and/or velocity value #171

Open
chippieuk opened this issue Nov 19, 2024 · 2 comments
Open

Comments

@chippieuk
Copy link

I'm using Overland on iPhone to send location to a locally running instance of Dawarich. I'm noticing a number of incorrect points, where it seems to jump back to a previous location, then back on track again.

Images below indicate this.

Looking at the data recorded in Dawarich for the points, the incorrect ones never had an altitude or velocity value attahced to them (see images below first of a 'correct' point, then an 'incorrect one'. Is it possible for Overland to reject these erroneous points?

image

image

image

@aaronpk
Copy link
Owner

aaronpk commented Nov 29, 2024

I generally like to avoid dropping data in the app in favor of doing that kind of filtering on the server, but I realize that workflow doesn't work for everyone. It's a reasonable request to add an option to discard these kinds of points. These are usually locations that were obtained not through GPS but through wifi or cell tower positioning, there just isn't an actual indication in the iOS API of this other than noticing some fields are empty.

@aaronpk aaronpk changed the title Incorrect points recorded Add option to discard points with no altitude and/or velocity value Nov 29, 2024
@FrozenDragoon
Copy link

In the meantime, for anyone else that comes across this issue looking for the same thing: Here's a way to auto delete of these points.

I'm sure there's better ways, but this seems to be working well enough for me over the last 48 hours.


[[[[ Use with caution, etc, etc. ]]]]


  1. Assign a Device ID in your Overland settings -> Server URL menu (needed to filter points, as there might be other sources of data that lack the velocity and altitude)
  2. Create a file delete_bad_points.rb alongside your docker-compose.yml file with the following content:
    (Line 2 isn't required, I just left it from my manual steps. Taken from the FAQ Page)
bad_points = Point.where("velocity":nil,"altitude":nil,"tracker_id":"OverlandTrackerID")
bad_points.size
bad_points.destroy_all
  1. Update your docker-compose.yml file to mount the delete_bad_points.rb:
  dawarich_app:
    image: freikin/dawarich:latest
    container_name: dawarich_app
    volumes:
      - ./delete_bad_points.rb:/delete_bad_points.rb
  1. Restart your containers (run docker compose up -d)
  2. Create delete_bad_points.sh in the same directory with the following content:
    (Adjust for the location of your docker binary, etc)
#!/bin/sh
/usr/bin/docker compose exec -T dawarich_app /bin/sh -c "bin/rails runner /delete_bad_points.rb" 
  1. Now you can run the delete_bad_points.sh script manually.
  2. OR you can run it via cron. For example, this runs the script every few hours and hides the output: 0 */5 * * * /location/of/script/delete_bad_points.sh &> /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants