Datafield : detect indoor session

Former Member
Former Member
Hi guys,

When using a powermeter on your bike and doing indoor sessions, many have noticed their power output isn't exactly the same. I've already written a program that shows me my 3s avg of FTP in % with a FTP setting in the properties (since you still can't acces the user profile data) and now I'd like to make use of the offset indoor/outdoor ftp.

Based on in & outdoor tests I'll make a new indoor FTP property available in the datafield but now I'd like the datafield to be aware if it's in or outside, this way I can use the same datafield in both activity profiles, as opposed to 2 datafields, each with their own FTP setting.

Since I don't think you can get the current activity profile name anywhere, i'd like to use the GPS info to know i'm doing an indoor session. Specifically, GPS is disabled when using the indoor profile.

Is there anywhere I can detect if it's disabled or not?


GPS disabled : use indoor FTP setting
GPS enabled with sattelite coverage : use outdoor FTP setting
GPS enabled without sattelite coverage (in woods or bad weather): use outdoor FTP setting

Any way I can detect this? Just thinking about this at work, will try something in code tonight, but not sure I can test this in the simulator.

Thanks!
  • It might not be exact (if GPS takes a bit to lock), but you could use Activity.info.startLocation. If you don't get a startLocation, no GPS.

    if(info.startLocation!=null) {
    //using GPS
    }
  • Former Member
    Former Member over 8 years ago
    Thanks,

    I might build in a little delay (couple of seconds). If the startlocation remains null I can default to indoorFTP.
    In my case, I could use speed as an added field since I don't use a speed sensor indoor (it's rubbish :)) but some people do.