not bug - my simple fix for bad accuracy saved by phone problem in owntracks #1336
Korenchkin
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hello,
this is just a help for someone who might need it,it is for owntracks,but i think someone might find this usefull
so i'm using owntracks as a backend for location storage from android phone (running as independent service),i have no direct connection with dawarich(now that i think of it),i push location from home assistant...need to change this later(horrible solution)
but,in dawarich statistics i noticed older years 30k km usually,but some years were 16M km! my phone logged wrong coordinates(pulled from google)...
so this simple command run on owntracks file store removes points above certain precision (i selected 400+,might refine later)
run inside /var/spool/owntracks/recorder/store/rec/$login/$device (there are YYY-MM.rec files)
sed -Eiz '/^.*\"acc\"\:([4-9][0-9][0-9])|([0-9]{4,})\}/d' *.recthis command worked for me,but take it carefully,run it on copy first and compare,it searches for "acc":$number and if it is 4NN-9NN or (|) NNNN or more N then it deletes line,sed -E enables advanced operations(number match),-i inplace edit,-z i was testing,but i think it is unnecessary
hope you don't need this,but if you do,you don't need to fight regex and more - vim<>sed regex chaos(incompatibility)
edit:now that i fixed this,i have to rerun import to dawarich..so i think winter is coming back,so i need the heat anyway :)
Edit2:brainfart :)
Beta Was this translation helpful? Give feedback.
All reactions