jonasoreland / runnerup

A open source run tracker
GNU General Public License v3.0
719 stars 271 forks source link

Start activity without waiting for GPS first #255

Open netmackan opened 9 years ago

netmackan commented 9 years ago

Feature request:

Background: I usually start biking by first bringing out the bike from indoors (bike shed or underground garage) and it is first when I get out I will get the GPS signals and can start the activity. It is a bit annoying to have to stop as soon as I get out to bring up the phone, possibly in the rain, to start the activity.

Suggestion: For instance instead of having the start activity grayed out, it could be yellow or something to be able to schedule a start as soon as there is a GPS signal. Alternatively, there could be an additional button for schedule the start when signals are available. Then when there is enough signals available, I would expect to hear the "Activity started." audio from my pocket without having to bring out the phone.

bagage commented 8 years ago

Should the yellow part of the activity be recorded or not? If not, I think it could be easy enough to do and I might give it a look.

netmackan commented 8 years ago

I was thinking that the yellow part would not be recorded. Basically the activity would officially start when the location is first known.

bagage commented 8 years ago

OK, then I'll give it a look when I get some time. Can you assign this to me @jonasoreland as a reminder? Thanks.

nebmo commented 8 years ago

Could it be a setting if yellow should be recorded or not? Because I would like to be able to start activities without having GPS fix for indoor sports for example (saving HR)

bagage commented 8 years ago

The problem in that case is: what to do when GPS finally comes available?

Should we consider position points or ignore them? In the first case, many thing would be broken (map would not display the whole activity, etc.). What do you think?

jonasoreland commented 8 years ago

For indoor sports i think we should do activities wo/ gps at all...

Not the same as this if you ask me

/Jonas On 22 Jul 2015 22:13, "Niklas Weidemann" notifications@github.com wrote:

Could it be a setting if yellow should be recorded or not? Because I would like to be able to start activities without having GPS fix for indoor sports for example (saving HR)

— Reply to this email directly or view it on GitHub https://github.com/jonasoreland/runnerup/issues/255#issuecomment-123849047 .

bagage commented 8 years ago

Why not? Is it not just an activity parameter "record GPS location"?

jonasoreland commented 8 years ago

difference is

On Wed, Jul 22, 2015 at 11:03 PM, Gautier Pelloux-Prayer < notifications@github.com> wrote:

Why not? Is it not just an activity parameter "record GPS location"?

— Reply to this email directly or view it on GitHub https://github.com/jonasoreland/runnerup/issues/255#issuecomment-123862798 .

bagage commented 8 years ago

No GPS at all would be better for sure. What is the current status of your implementation?

Regarding the current issue I'll only add yellow state it should be simple enough.

bagage commented 8 years ago

I will not have time to implement this actually, so if someone wants to implement it, feel free to do it. Sorry about that!

dsjstc commented 7 years ago

My phone sometimes takes 3-4 minutes to get signal after I leave the house and start my run. So I, for one, would prefer to start recording upon pressing "start", without waiting for signal.

But either way is better than having to wait for signal to start.

club4android commented 7 years ago

Can you enable the button to start without gps and and record when it finds the gps? It's really cumbersome to stop when outside, get the phone, wait for gps and press start. I hope someone can implement this.

tropikhajma commented 6 years ago

I needed this desperately, so I ditched RunnerUp and installed AAT (http://bailu.ch/aat/) from F-Droid instead. Works as I expect it to and the interface is much simpler.

davidedelvento commented 6 years ago

Another problem that I see here is that if the screen of phone goes dark (which it does after a while, I could probably change that...) the count of locked GPS satellites goes down to zero. Annoying.

Can't we keep them locked like after the activity has been started?

@davidedelvento

gerhardol commented 6 years ago

@davidedelvento I believe the current behavior should be kept. With auto-start GPS enabled, GPS should not be kept alive unless the "run" starts. Otherwise you need to delete the activity to stop GPS which would be annoying.

With auto-start off, the GPS is started and kept started also when screen is off (and other apps are started).

Marx2 commented 6 years ago

GPS should lock some time before activity starts. It sometimes happen that just after locking it gives weird results for about a minute then stabilise (depend on weather)

czw., 10.08.2017, 16:02 użytkownik Gerhard Olsson notifications@github.com napisał:

@davidedelvento https://github.com/davidedelvento I believe the current behavior should be kept. With auto-start GPS enabled, GPS should not be kept alive unless the "run" starts. Otherwise you need to delete the activity to stop GPS which would be annoying.

With auto-start off, the GPS is started and kept started also when screen is off (and other apps are started).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonasoreland/runnerup/issues/255#issuecomment-321560216, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyOZsBCHywlDm58OlW29rr4Nrs3xAjLks5sWw2DgaJpZM4EaNzQ .

davidedelvento commented 6 years ago

@gerhardol

With auto-start GPS enabled, GPS should not be kept alive unless the "run" starts. Otherwise you need to delete the activity to stop GPS which would be annoying.

A common patter for runners is to set up the up to get ready, then do some warm-up exercises (in the hope of the GPS satellites being locked) and then run.

This use case is not supported by RU, because of the problem I described. Maybe we can have a separate button (let me call it "lock GPS" but a better name is needed) that would do that? I think this would be extremely useful, instead of having to wait at the end of the warm-up.

In addition to the "start" which would become "start as soon as the GPS are locked" (when they are not locked) that @netmackan proposed, of course

gerhardol commented 6 years ago

My prefered functionality was to handle sport type as a "tree" with overlay for all settings. With that you could have an "Indoor" branch where GPS is off. That is a major change...

I want to be able to start without GPS completely. For instance set the activity type to Indoor and hardcode it there. Changes are needed to RU to handle GPS less (in addition to a new sport type).

If I have a runners watch, it is OK to start GPS and the press start when actually running. With a phone I want to pick it up once, then put it away, possibly control it with a remote (headset, some watch or maybe even voice). I now need to start GPS, put it away, go out, bring it forward and protect it and put away.

I would like to have an option to start an activity directly also without GPS, even if the points are bad (that can be filtered). The countdown can be used too.

I propose that pressing start before GPS (when the button is gray) prompts you if you really want to start now, wait until GPS and start or wait.

Edit: it is relative easy to handle "force start" with long click. Without changes, recording will start when GPS is locked. Audio cues for GPS connected makes sense here...

davidedelvento commented 6 years ago

@gerhardol

I propose that pressing start before GPS (when the button is gray) prompts you if you really want to start now, wait until GPS and start or wait.

Edit: it is relative easy to handle "force start" with long click. Without changes, recording will start when GPS is locked. Audio cues for GPS connected makes sense here...

Great. I agree with that. I could not care less for hard-to-implement indoor branch (what would you be using RU for? maybe the HRM and cadence?)

Having at least one, or better both of the different "start flavors" you proposed (i.e. start now and add GPS when possible, or start as soon as GPS is locked) is great. But would my third "start flavor" hard to implement or easy? To me it sounds very easy and as I said earlier it would be extremely convenient for doing warm-up exercises before the run (and by the way, behave identically to what many GPS watches do).

gerhardol commented 6 years ago

But would my third "start flavor" hard to implement or easy?

I see that as "no auto start GPS", already existing. Then you start GPS without starting the activity, also trying to connect when the screen is off. (I would like to change the default to this too.)

davidedelvento commented 6 years ago

Sorry I don't know what "auto start GPS" in the option does (maybe as part of this refactoring for NG, we need some tooltips or user documentation on every option we have around...) Can you please be more clear on how this works at the moment?

gerhardol commented 6 years ago

If "auto-start GPS" is set, the GPS is always on while the app is running. If no activity is started, GPS is cnot locked when the app is not active (otherwise the app would keep GPS on always after the app had been started once).

Without auto start, you have to start GPS explicitly. So GPS is not on when you look at the history or creating workouts. The GPS is on (after starting it) also when the screen is off.

I want to change the defaults from first alternative to the second.

davidedelvento commented 6 years ago

I tried to disable auto start GPS and it did what I wanted for my "third flavor".

However I'm still confused about what auto start does. Let me try to say it in totally different words and you tell me if I'm correct.

If autostart GPS is set, then the GPS is on only if: 1) you are waiting to lock the GPS and the screen is not gone in power save or 2) you started from the previous screen and now are in the middle of the workout (that is, the workout is not ended). otherwise, it's off.

If autostart GPS is not set, then the GPS is always on (unless you turned it off from the global settings of the phone, obviously).

Is this correct? If so, I propose to rename "autostart GPS" to "reduce power consumption by limit GPS usage" or something along those lines.

gerhardol commented 6 years ago

The way it is implemented is the only sensible and the naming is OK to me A description could be added, but I better do that in the manual Changing the default is easier to explain

An alternative name could be Keep GPS on in the foregound, but Autostart GPS is simpler to me

GPS is obviously always on when recording. The behavior is different only before starting.

Auto start GPS: Keeps GPS when the app is in the foreground. It cannot be in any other way, it will drain the batteries. It is not expected by users to keep the GPS on in the background without any explicit start.

davidedelvento commented 6 years ago

Thanks for the explanation.

To me, Auto start GPS sounds more like "give this app permissions to enable GPS on its own without asking me each time" or something along those lines.

Keep GPS on in the foreground does not sound very clear either.

Moreover, this setting is not much about starting as much it is about stopping the GPS, and from the name that's totally unclear. I propose calling it Auto start/stop GPS and adding a "tooltip" (or whatever is called in android) like the one for Headset key start/stop below. The tooltip could say "reduce power consumption by stopping GPS when the app goes in background and the workout is not started".

I think changing the default like you proposed in #621 is good.

jhubble commented 6 years ago

I expected the autostart gps option to start recording when the app is launched. It could start logging data, adding in the actual gps data points when available. (I don't really care if I miss the first few seconds of a workout. However, I get annoyed when I have to wait in the rain for a lock or don't get anything recorded because I forgot to press a button after gps lock.)

Cagier commented 6 years ago

Apologies if this is slightly off-topic here but it seems the challenge that most people are trying to overcome here is the wait for the GPS when they want to start an activity. Also, there are other related threads about poor accuracy of GPS and lost signals (which are effectively more hardware/firmware issues on the phone as far as I am concerned).

I frequently used to have major GPS issues with other apps and also with RunnerUp which was incredibly frustrating but I now normally get a GPS fix with a few seconds by following a few simple steps. You may well have seen some of these elsewhere but I thought it would be worthwhile sharing what works for me...

I don't know how many of these tips are are psychological and how many make actually a difference but I just know that GPS works a heck of a lot better for me these days. Thsi routine might sound like a bit of a complicated workaround but it only takes a few seconds of preparation and avoids the frustrating wait when you get outside and just want to RUN! Hopefully something in there will help someone reading this. I find even coming from an indoor are with no GPS, I still normally only have to wait about 15-20 seconds to get a fully accurate lock on my HTC One with the above routine.


I acknowledge that this does not specifically address the OP's reason for the feature request but I would advise against automatically starting recording immediately when GPS is available as it generally gets more accurate over the first few minutes as satellites lock in and will take longer to stabilise if you are actually moving - so you may well end up bizarre readings for the first few minutes that will throw off all your activity stats. If such a feature were to be implemented then I would think about setting an accuracy threshold so you had to have a higher number of satellites (and hence a higher degree of accuracy) before automatically recording location as part of the RunnerUp activity in order to avoid this.

gerhardol commented 6 years ago

@Cagier If you deselect "Autostart GPS", then you dont need to start another application (unless you want to force AGPS download). (You will have to press Start GPS once though.)

GPS is fundamental to RU recording right now. I have tried some quickfixes, but what that will achieve is just to delay starting the activity recording until GPS is tracked. OK for me, but a little lame behavior and hard to explain for those that just wants to use RU as stopwatch/HR recorder (cadence meter). I have considered adding a "long press on disabled waiting for GPS" button to handle this, but that would be a little hidden functionality...

bbarker commented 4 years ago

For my purposes it would be really great if I could use RunnerUp with indoor activities as well, where no GPS is needed. So far RunnerUp is better than any other app I've found for watching heart rate zones, and the only other one I've found is the Adidas app. Not only not open source, it costs $50/year to get that functionality there... and it isn't even as good as RunnerUp. However, it will bail on the GPS. Not saying that there aren't good reasons for why things are they way they are here currently.

gerhardol commented 4 years ago

I agree it would be good to be able to record without GPS but it is not the highest of my priorities.

darkdragon-001 commented 4 years ago

Maybe it makes sense to use other location information provided by the SDK? Especially in urban environments, the location without GPS (triangulation, wifi, ...) sometimes gives better resolution than GPS. So this could be used to start an activity. Just display a yellow instead of a green button and let the user decide.

gerhardol commented 4 years ago

Maybe it makes sense to use other location information provided by the SDK? Especially in urban environments, the location without GPS (triangulation, wifi, ...)

Google services could improve static location detection where there are no GPS at all but is no replacement for GPS. Google fused location services could potentially improve accuracy. That will require an account etc for all developers and not be compatible with F-Droid.

vitlib commented 3 years ago

Any news on this? I'm using RU in a basement and there's no GPS signal so it's unusable. Besides, when I come in from outside signal is lost and HR stops getting tracked.

gerhardol commented 3 years ago

It is in the list of changes that should be done, but not something I am working on.