Author Topic: Low-power tracking  (Read 1818 times)

Offline hgmichna

  • More than Newbie
  • *
  • Posts: 13
    • View Profile
Low-power tracking
« on: November 16, 2015, 11:34:54 »
What is the best way to record a track while riding in an airliner?

The main problem is power consumption if the GPS is kept active all the time. Since airliners fly absolutely straight at constant altitude and with mostly constant speed, there is harly any need to have more track points than one every two minutes. Perhaps even one every five minutes would suffice.

I think the nicest solution would be to have an automatic adjustment of the track point frequency, depending on the regularity or irregularity of the movement, but I think Locus currently does not have this.

Perhaps it could be a possible improvement to add something like automatic low-power tracking. My personal wish would be that the phone checked its movement, using as little power as possible. When it detects movement, it could then adjust its track point frequency accordingly. For example, if I keep moving in a straight line at constant speed, the track point frequency could be very low.
 

Online poutnikl

  • Master of Locus
  • ****
  • Posts: 647
  • Thanked: 68 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A2 (6G/128G) / A10 / LM3 Pro + LM4 alpha
Re: Low-power tracking
« Reply #1 on: November 16, 2015, 12:53:57 »
The solution could be closely related to the way how Kalman filters work, i.e. evaluating predictor and corrector terms.

The application would predict, based on the position history patterns, the future position. If the prediction-correction difference*)  was less than a given lower limit, the position determining interval would be increased. OTOH, if the difference would be higher than given upper limit, the interval would be decreased. The absolute maximum/minimum interval values could be optionally provided.
*) ( or perhaps better the relative difference wrt passed distance betwen points )

But I guess this is very specialized use case, so enough could be using the current solution of GPS ON/OFF management, manually using  long  wakeup GPS intervals.

Offline hgmichna

  • More than Newbie
  • *
  • Posts: 13
    • View Profile
Re: Low-power tracking
« Reply #2 on: November 16, 2015, 17:58:41 »
Thanks for your reply! Your proposal sounds like a very good solution.

You wrote, "But I guess this is very specialized use case …" I think the automatic adjustment you describe is the general use case that almost everybody wants. Most users who track want to know where they were, not how many track points per kilometer they want to record.

After reading your message I found and looked at the GPS auto-off and related settings. I had tried these a long time ago, but had then forgotten about them.

I cannot use them anyway. They are far too weird for me to understand. Must be about a dozen settings that could all influence each other, and how they influence each other is completely unclear.

Just one example: "Min accuracy". Ostensibly it influences when the GPS is kept on. It is measured in meters, which means that more meters correspond to less accuracy. This already raises the question whether "Min" means minimal accuracy or a minimal meter figure. Apart from that it is completely unclear whether this setting overrides the other auto-off-related settings or whether it is overridden by other, conflicting settings.

Another example, out of many, is the interdependence of the GPS auto-off settings with the track recording profile. If the time interval given in the tracking profile is smaller than that in the GPS auto-off settings, will the GPS then stay on or not? Again, which setting overrides which other setting?

And on and on in this fashion. I don't have a week of free time to study all related settings and test how they interact with each other.

Unfortunately it also makes little sense to ask here about all of these settings, because I would have severe doubts whether the person answering actually knows the right answers or just guesses. I could not believe anybody anyway, except perhaps the programmer who wrote Locus, and even he might not know all these interdependencies off-hand.

I am a computer programmer. If I shy away from these settings, then 99% of non-technical users will have no clue what they mean when combined. The design aims for a user who may not exist.

If I could give a hint at how Locus could be improved, then I would say, remove most settings and make them automatic. Or leave them there for the 1% of users who manage to understand them and put an "automatic" checkbox above them.

For example, for tracking I think only two settings are needed:

1. Time between automatic checks for movement after the phone has been found not to move much for a while. Default: 10 min

2. Average accuracy of interpolated track. This could be given as an absolute distance tolerance like 10 m plus a time tolerance like 10 s, so the total distance tolerance grows with speed. Since this concept is a bit difficult to grasp for non-mathematical thinkers, it would probably be better to give the user three simple choices like fine, normal, and coarse, and in the help file list the distance accuracies and a hint about which speed would lead to battery savings due to the GPS being switched off between track points. List these for a few commonly occuring speeds. I would even dare to say that almost all users would be fairly happy with just one fully automatic setting, i.e. no setting at all, with automatic adjustments as described in the preceding posting.

I would not ask for average accuracy in m, because in all use cases I can think of, the distance tolerance grows with speed.

This would also nicely make tracking profiles superfluous, because instead of changing the tracking profile it would be just as easy to set the accuracy to coarse before I board an airliner (if that were even necessary, because at high speed the distance tolerance would grow anyway). And it would make the GPS auto-off settings superfluous, because Locus could easily decide for itself when to switch off the GPS between track points. Locus could measure the times the GPS takes to find a fix after being powered up, to adapt the decision to the individual phone.

Generally my recommendation would be to think harder about what most users really want, instead of what an engineer might perhaps want.

That said, I want to stress that I like Locus very much and believe it is by far the best offline mapping app, with Google Maps being the only serious competitor. I use both. There is just always room for improvement.
 

Offline eldron

  • Apprentice of Locus
  • **
  • Posts: 232
  • Thanked: 4 times
    • View Profile
  • Device: Galaxy Ace 2 (Android 4.4.4 - CM11)
Re: Low-power tracking
« Reply #3 on: November 16, 2015, 17:59:21 »
How about using a battery pack to prolong the battery life of your device? They are available in all shapes and sizes.
If you want to save battery whilst recording a track I am not sure how efficient it would be to just record one point every few minutes. From my understanding the GPS of your device would have to be switched off between recording your trackpoints in order to save battery. When you want to record your next point the GPS of your device has to be switched on again and has to get a fix on the satellites again, before being able to record your next point. Being in an airliner you would have covered quite a distance in the meantime, which would increase the time to get the next GPS fix.
If, on the other hand, your device´s GPS stays on all the time and only records a point every few minutes, I don´t see how this would reduce the battery drain..?
 

Offline hgmichna

  • More than Newbie
  • *
  • Posts: 13
    • View Profile
Re: Low-power tracking
« Reply #4 on: November 16, 2015, 18:19:19 »
How about using a battery pack to prolong the battery life of your device? They are available in all shapes and sizes.

I have one. I do that already. It is a bit awkward though and makes it more difficult to put the phone in the best place in a cramped airliner, sometimes behind the window shade. Clever software can perhaps achieve the same thing without extra hardware.

I often need the power pack to recharge the phone while changing planes.

If you want to save battery whilst recording a track I am not sure how efficient it would be to just record one point every few minutes. From my understanding the GPS of your device would have to be switched off between recording your trackpoints in order to save battery. When you want to record your next point the GPS of your device has to be switched on again and has to get a fix on the satellites again, before being able to record your next point. Being in an airliner you would have covered quite a distance in the meantime, which would increase the time to get the next GPS fix.
If, on the other hand, your device´s GPS stays on all the time and only records a point every few minutes, I don´t see how this would reduce the battery drain..?

It is a tradeoff and the time between trackpoints where switching off the GPS saves energy is different for every phone type. When I once experimented with this (a long time ago with an older smartphone), I found that taking one track point every 2 min and having the GPS off in between saves quite a bit of battery charge. Consider that probably the entire phone goes to sleep in between track points, if the app is programmed cleverly.

You have to consider also that modern GPS chips are blindingly fast in acquiring a fix. My new phone often gets a fix within 4 s, even indoors (with a window). Often, but perhaps not always, I can put it on the table in front of a window seat in an airliner and still keep tracking, something which I could only very rarely do with older smartphones, which needed to be kept right at the window.
 

Online poutnikl

  • Master of Locus
  • ****
  • Posts: 647
  • Thanked: 68 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A2 (6G/128G) / A10 / LM3 Pro + LM4 alpha
Re: Low-power tracking
« Reply #5 on: November 16, 2015, 18:42:12 »
You may also want to try GPSlogger application.
https://play.google.com/store/apps/details?id=com.mendhak.gpslogger&hl=en

BTW by minimal accuracy is usually meant that the point is discarded, if reported accuracy is worse than x metres. It helps to avoid jumps in logged tracks, if GPS fails and location determination falls back to GSM location. Such location can be wrong even few kilometres out of the cities and can ruin the track logging..

Offline Andrew Heard

  • Master of Locus
  • ****
  • Posts: 791
  • Thanked: 46 times
    • View Profile
  • Device: Samsung Galaxy A5 Oreo/8, Lenovo Note 4 Nougat/7.1
Re: Low-power tracking
« Reply #6 on: November 16, 2015, 22:04:57 »
Track recording on my old Xperia Z1 uses about 2% battery per hour. So unless you are on a very long plane flight is it really worth additional effort to reduce power consumption further? It seems most planes now have USB charging facilities too. Review your chosen track recording profile and set minimum distance AND time. I use 50m and 30s for a cycling profile, maybe for a plane it could be 2000m and 120s?