Position::Info.heading always 0 ?

Former Member
Former Member
Replaying a .FIT file I'm getting lat/lon values OK, but the heading value is always 0. Is this because my sample .FIT file was recorded by a device that doesn't have a compass in it, or because the simulator doesn't calculate headings from GPS point to point?

Thanks
  • Former Member
    Former Member over 10 years ago
    Seeing the same problem using the Sensor module, sensorInfo.speed is correct, but both sensorInfo.altitude and sensorInfo.heading are always null. Does the simulator not supply altitude or heading data from .FIT files yet?

    Thanks
  • Thanks for the report. We'll look into it.
  • heading showing 0.000

    Hi,

    Yes, in the position sample app, I've got the below code in the onUpdate() function, and all that ever populates for this heading field appears to be 0.00000, at least using the simulator.

    string = "heading = " + posnInfo.heading.toString();

    // outputs "heading = 0.00000" under all simulated circumstances



    Of course, this code appears to do something outside the simulator - it shows something other than 0 at least.
  • Looks like we addressed the OP's report early last year, but the simulator is simply not reporting a heading value when simulating FIT data. I've reported this to get it fixed--thanks!
  • Looks like we addressed the OP's report early last year, but the simulator is simply not reporting a heading value when simulating FIT data. I've reported this to get it fixed--thanks!


    BTW, It's not just when simulating data, but also when you playback a .fit file. Heading is always north.

    I'm not really concerned, as when testing something like this, it's easier to just sideload to a watch, and walk a bit, and see if the heading is correct. Unless you can see where you are on the actual route you are simulating or playing back, it's hard to tell if you're displaying it correctly in the simulator. (the route in the simulator starts by heading south, angles NE, stops, and then jumps back to start, repeating every 2 minutes, BTW. I've used it for testing a "chart" many times!)
  • Unless you can see where you are on the actual route you are simulating or playing back, it's hard to tell if you're displaying it correctly in the simulator. (the route in the simulator starts by heading south, angles NE, stops, and then jumps back to start, repeating every 2 minutes, BTW. I've used it for testing a "chart" many times!)

    Heading isn't necessarily the direction of travel. If a magnetometer is in use and you walk north while facing south, your heading will be 180 (south).
  • Heading isn't necessarily the direction of travel. If a magnetometer is in use and you walk north while facing south, your heading will be 180 (south).


    True, but if I walk backwards, I tend to run to stuff! :) (Sometimes I run into stuff when I'm walking forward too, but that's another story!)
  • heading question

    BTW, It's not just when simulating data, but also when you playback a .fit file. Heading is always north.

    I'm not really concerned, as when testing something like this, it's easier to just sideload to a watch, and walk a bit, and see if the heading is correct. Unless you can see where you are on the actual route you are simulating or playing back, it's hard to tell if you're displaying it correctly in the simulator. (the route in the simulator starts by heading south, angles NE, stops, and then jumps back to start, repeating every 2 minutes, BTW. I've used it for testing a "chart" many times!)


    Well I'm working on an app which extends the heading functionality, so for me it's easier to load a .fit file into the simulator and watch the screen, than to upload it, get dressed up for outside, and go walking along angled chalk lines every time I want to test it. Of course, for this app I'm looking for more than just to see if the heading works or not.

    Okay, fair enough, the simulator doesn't simulate the heading functionality on the watches yet. I've heard some watches derive the heading value from a magnetometer and others derive it from most recent GPS-logged movement.

    My question then is, for the watches that calculate the heading value from recent GPS-logged movement, can anyone tell me, is heading re-calculated every second, from the last and second-to-last logged GPS points? Or, is it more of a recent "average", say, calculated from the last three points, or combined heading over the last five seconds? Any detail here would be appreciated, for helping me to understand the watch functionality if nothing else.
  • My question then is, for the watches that calculate the heading value from recent GPS-logged movement, can anyone tell me, is heading re-calculated every second, from the last and second-to-last logged GPS points? Or, is it more of a recent "average", say, calculated from the last three points, or combined heading over the last five seconds? Any detail here would be appreciated, for helping me to understand the watch functionality if nothing else.


    The devices I test with don't have a compass, and only use GPS for heading. With GPS you have to be moving to get a heading. If you stop for a bit, it's all over the place and a bit worthless. It's independent of "gps logging" (recording a .fit file?) As far as times and recording, some devices have "smart recording", while others do it every second (and some you can select what you want), but I think in all cases, onPosition() is called at the same interval (I've never checked, and could be wrong). And how often ActInfo is updated is probably the same.

    If you have a watch with a compass, you could test it on that, and only have target devices in the app store that also have a compass, but ask for a couple people that have non-compass watches to beta test for you, and then pass on a side-load version. It depends on how important heading is in your app. With my apps, I simply display the heading and do nothing else with it, so if it's "all over the place" it doesn't matter.
  • thanks

    thanks! excellent info I appreciate it!