gpslogger icon indicating copy to clipboard operation
gpslogger copied to clipboard

Feature Request - heartbeat log during "Don't log if I'm not moving" activity recognition

Open 007mparker opened this issue 5 years ago • 2 comments

Hi - I use GPSLogger to keep track of my kids location by feeding the data to restdb.io (custom URL feature) and working on it from there (I have geofence alerts and the like so we can stop them running in the house caked in mud;-). It works great but for one niggle, if they are stationary it saves power by not logging (good battery preservation) but then I cannot tell if they are just stationary or if the phone has died / app is turned off. Ideally it would be possible to force a log entry every X seconds but have this set much higher than the standard logging interval. e.g. I log every 5 seconds as standard but even if no movement want a log entry every 5 minutes and even if GPS is not available. I'm aware this will only work for so long due to dozing but kids rarely take their phone out of their hands so it usually has some movement to stop it sleeping.

007mparker avatar Mar 31 '19 09:03 007mparker

Not doing anything at the moment about this but wanted to write my thoughts in case I can revisit this later.

So I like this idea for what it does, which is the heartbeat. I tried to figure out who it would be implemented. I think to add such a feature, it would be added in here:

https://github.com/mendhak/gpslogger/blob/8f31c48b960e338d9be7a055e71f9d47608c4515/gpslogger/src/main/java/com/mendhak/gpslogger/GpsLoggingService.java#L649-L652

This increases complexity though, the app is already dense with logic and adding additional exceptions and bypasses already makes it quite hard to test and maintain.

On one hand I could hardcode to 5 minutes so that a position is logged anyway, but users who are looking to conserve battery may want that to be optional. If I make the duration configurable it will increase confusion and introduce an expectation that a log should have appeared at that interval, whereas Android OS does not really perform the movement check at regular intervals.

mendhak avatar Apr 13 '19 08:04 mendhak

Hey. Sorry to hijack this but i wanted to ask two questions and didn't really know where else to ask. I am using the app in conjunction with Home Assistant to enable presence based home automation. Its going really well and find it much more reliable that all the others: Locative, Owntracks etc. SO thanks!!!

Question 1 Will the "Don't log if i'm not moving" feature stop the app from logging new locations if it were situated very still inside a car? If so, is there anyway that the app can detect that it is traveling at motor vehicle speeds and temporarily disable this feature? Its a great feature for when my phone is sitting in a drawer in work but not so good when its in my cars arm rest when driving home (depending on the answer to my question above that is).

Question 2 Furthermore, do you have an suggestions/advice regarding using the app 24/7 on an android phone that can give me a good balance between accuracy and battery life? (eg. not having to top-up charge during the day which i have to do at times just now)

My Current settings Log GPS/GNSS locations - ON Log network locations - ON Log passive locations - ON Logging interval - 600 Keep GPS on between fixes - OFF Distance filter - 500 Accuracy filter - 250 Duration to match accuracy - 30 Absolute time to GPS fix - 45 Don't log if I'm not moving - ON

Eeeeeediot avatar Jul 07 '19 23:07 Eeeeeediot