Playback FIT file in simulator?

Does anyone use the "Playback File..." functionality when testing their apps? And if so, should the FIT files taken directly from an actual device work properly?

I have been trying to test out a data field and I have been using FIT files from my D2 Bravo, which contains elevation information and should likely contain other information such as temperature, speed (groundspeed) and heading. However, when playing back the file the only thing that seems to be set within the Activity.Info object that is passed to the compute() method is position. Elevation, speed and heading are all zero and/or null. I saw all old thread from 2014/2015 that mentioned something about missing data but surely this isn't *STILL* the case? If it is still the case and FIT file playback is only partially working, then how are other people testing out their apps and/or data fields other than the obvious (and undesirable) option of building for their device and testing in the wild?

Thanks,
Douglas
  • I use playback all the time for testing. Both .fit files I've copied off my device, as well as some people people have sent me for testing from their devices.

    One thing to note if if the .fit was recorded with "smart recording", the data won't be smooth when playing back in the sim - it can take a few seconds for the data to update.

    What specific data do you seem to be missing? Things will be null if you're not recording, and in some cases, for a bit after starting (things live the average values). You always want to check for null values in Activity.info.
  • I use playback all the time for testing. Both .fit files I've copied off my device, as well as some people people have sent me for testing from their devices.

    One thing to note if if the .fit was recorded with "smart recording", the data won't be smooth when playing back in the sim - it can take a few seconds for the data to update.

    What specific data do you seem to be missing? Things will be null if you're not recording, and in some cases, for a bit after starting (things live the average values). You always want to check for null values in Activity.info.


    As I said in my original message, pretty much everything I'm interested in is null or zero. Specifically missing are: altitude (Info.altitude), speed (Info.currentSpeed), heading (Info.currentHeading). I've tried both running and flying activity FIT files and both are the same. I only have access to the FIT files from my D2 Bravo so if those data points are there for others then this is either a Mac SDK/simulator issue or a D2 Bravo issue.

    This is YET another case where some actual input from someone at Garmin would be awesome, but instead we're forced to rampantly speculate on what and how things should function. Sigh.

    Cheers,
    Douglas
  • Are you testing a data field? Have you "started" it by clicking on the simulated start button? (or going into "Data Fields>Timer" and started it?)

    You're having a problem with something that is commonly used by others with no problem. It's not a general problem in other words...

    Per the api documentation, you need to handle the cases where something in Activity.info is null, as that's likely to happen on a real device)

    Use "Contact Developer" for one of my apps in the store and I'll gladly send you one of the .fit files I use for testing. They are mainly running/hiking/walking, from an hour to maybe 10 hours, so let me know what you want.
  • Are you testing a data field? Have you "started" it by clicking on the simulated start button? (or going into "Data Fields>Timer" and started it?)

    You're having a problem with something that is commonly used by others with no problem. It's not a general problem in other words...

    Per the api documentation, you need to handle the cases where something in Activity.info is null, as that's likely to happen on a real device)


    Yes, I'm testing a data field. I am printing the values sent to the compute() method to STDOUT and as soon as I choose a FIT file to playback, the position immediately starts presenting a "moving" target, departing from my hangar at the airport and taxiing to the runway. There is no need to start the activity with the button or via the menu. And doing so has no effect.

    This FIT data file is not a case where the data is (or should be) null as I started the recording during the taxi, but I am handling that case regardless. I am getting ZEROs for heading and speed and -20037508 for alititude. And I have run the activity for 15 minutes with no change in this.

    If this does work for others then, as I said in another thread, I'm inclined to believe this is an issue with the Mac SDK and/or the FIT files produced by the D2 Bravo.

    Cheers,
    Douglas
  • Yes, I'm testing a data field. I am printing the values sent to the compute() method to STDOUT and as soon as I choose a FIT file to playback, the position immediately starts presenting a "moving" target, departing from my hangar at the airport and taxiing to the runway. There is no need to start the activity with the button or via the menu. And doing so has no effect.

    This FIT data file is not a case where the data is (or should be) null as I started the recording during the taxi, but I am handling that case regardless. I am getting ZEROs for heading and speed and -20037508 for alititude. And I have run the activity for 15 minutes with no change in this.

    If this does work for others then, as I said in another thread, I'm inclined to believe this is an issue with the Mac SDK and/or the FIT files produced by the D2 Bravo.

    Cheers,
    Douglas


    Sys.printlin() either info.elapsedTime or info.timerTime as that's how you see if you started recording.

    I often use "playback .fit" when I'm testing something that needs GPS, but doesn't even record. And lat/lon changes, as it should. DF's NEED a start to get going.

    If elapsedTime/timerTime doesn't change you are not really running and just click on the "start button" on the simulated device. This extra step is needed with 2.1.x, to allow testing the new "onTimerXYZ()" callbacks for data fields.
  • Okay, if someone from Garmin could chime in that would be great because there is clearly some confusion here.

    As soon as I start playback of the file from SDK 2.1.3 on a Mac, the position updates as it should and elapsed time counts up. "Starting" the app via the start button on the simulated watch (D2 Bravo) or via the Timer menu has no effect.

    I will track down a non D2 Bravo FIT for and see if it changes but if this works for others and not for me then I clearly need some official answers because I've tried everything as per the docs and the forums.

    Over to you Garmin.

    Cheers,
    Douglas
  • Okay, if someone from Garmin could chime in that would be great because there is clearly some confusion here.

    As soon as I start playback of the file from SDK 2.1.3 on a Mac, the position updates as it should and elapsed time counts up. "Starting" the app via the start button on the simulated watch (D2 Bravo) or via the Timer menu has no effect.

    I will track down a non D2 Bravo FIT for and see if it changes but if this works for others and not for me then I clearly need some official answers because I've tried everything as per the docs and the forums.

    Over to you Garmin.

    Cheers,
    Douglas


    You don't need to wait for someone from Garmin needs to chime in (but they will if I'm wrong! :) ). As I said, lat/lon will start changing right away (lat/lon changes if you are NOT recording in a simulator perspective!). Other things WON'T change until you tell the simulator to "start" your recording. Just click the "start" button on the simulated device in the sim. This is SIMPLE to try!
  • You don't need to wait for someone from Garmin needs to chime in (but they will if I'm wrong! :) ). As I said, lat/lon will start changing right away (lat/lon changes if you are NOT recording in a simulator perspective!). Other things WON'T change until you tell the simulator to "start" your recording. Just click the "start" button on the simulated device in the sim. This is SIMPLE to try!


    Jim,

    I appreciate you trying to help but as I have said, "Starting" the app via the start button on the simulated watch (D2 Bravo) or via the Timer menu has no effect. I say again, I have pressed the start button and I have started the timer via the menu and the activity info is STILL returning zero, despite the activity timer counting up.

    This is why I would love for Garmin to chime in; because as I said I have done as you've suggested (both ways), and it doesn't work. So either you're wrong or there's a bug. Or both.

    And if starting is required, then why does some data show up immediately following playback start? Why not have no other data until such time as the DF is started? It seems to me that ask of the currentX() methods should all return values all the time since they are "spot" values not based on any other data, such as the total or average methods. All signs point to bug.

    Furthermore, if starting is required to have data show up I'd like to know what the rational is? On the Fly app on my actual D2 Bravo I see elevation, speed, heading and vertical speed displayed regardless of whether or not I'm recording. I don't see why the simulator would be any different, especially when playing back a FIT file. When I simulate data I see data for those regardless of recording state so why not also with FIT playback? I realize those new onTimerX method callbacks will need to be handled but it seems fairly easy to not call it if the user isn't recording.

    Cheers,
    Douglas
  • What happens when you "Simulate Data" vs playing back your .fit? (again, with doing the "start") Maybe your .fit is the problem. And maybe it's something about that one .fit.

    What activity was your .fit recording? (it's one from \garmin\activities on your watch, correct?)
  • Former Member
    Former Member over 9 years ago
    If you send your .FIT file (and project if you want to) to [email][email protected][/email], I can look at what data is in the file.

    Speed, heading, position, and altitude should all update from the file without the timer running if they are present. Data points like distance, average speed, total ascent, and others that are derived by an activity recording will not function until a recording has been started.