How to save a value for simulating it with a FIT-File in Simulator

Former Member
Former Member
I tried to save the heading values (Array of 10) from Sensor.getInfo().heading into the fit file using (just a code snippet)
session = Record.createSession({:name=>"Swim", :sport=>Record.SPORT_SWIMMING});
headingField = session.createField("heading",3,Fit.DATA_TYPE_FLOAT,{:units=>"radians", :count=>10});
session.start()


headingField.setData(headingValues);

The values are saved correctly in the FIT-File.
Is it possible to get these saved values in the simulator? If yes, how?

I uploaded the fit file here, because I can't add it as attachment: FIT-File
  • No, you cannot. The simulator only gives access to data that would be available to a device at runtime, and a history of the last 10 heading values are not one of these things.

    I'm trying to envision why this would be something you want access to. Are you just trying to simulate values to feed into the heading field of the Activity.Info?

    Travis
  • Former Member
    Former Member
    I'm trying to envision why this would be something you want access to. Are you just trying to simulate values to feed into the heading field of the Activity.Info?


    I am working at an thesis where I need the heading values for some calculation.
    Because the simulator gives no heading data, I do not want to walk around (and getting the heading values) for testing my app.

    Therefore I thought that i could record one sample fit file and play it somehow in the simulator..
  • If you just need a FIT file, there are thousands (ok maybe hundreds but still plenty) of example FIT files in this thread: https://forums.garmin.com/showthread.php?315439-GPS-Accuracy. Download one of those and I believe you can play it back in the simulator to get position data.
  • Former Member
    Former Member
    If you just need a FIT file, there are thousands (ok maybe hundreds but still plenty) of example FIT files in this thread: https://forums.garmin.com/showthread...9-GPS-Accuracy. Download one of those and I believe you can play it back in the simulator to get position data.


    I need specific FIT files for swimming.. and therefore just heading values from the magnetometer and no positioning..
  • I need specific FIT files for swimming.. and therefore just heading values from the magnetometer and no positioning..


    i dont think you can playback heading from a pool swimming fit file. At least, i havent been able.

    I do some testing in my living room . I walk from wall to wall, and back :)