Weird CIQ currentHeading() Issue

Ok, this is REALLY a strange one. I live in the US/Orlando, and the map on my EDGE 1030, which shows where "north" is (1 o'clock in the screenshow below), is always the same as CIQ's view of North. I added a black DOT on my little Weather Compass to show where CIQ thinks North is in relation to my current heading on my bike.

DIRECTION[BEARING] = myInfo.currentHeading;

It is easy to calculate North in relation to currentHeading.

But one of the users of my Data Field (he is located in France, about 20km from the Weather Station Orange) has noticed that at times, CIQ's view of North is wrong. This screenshot is from him. Garmin's map says North is at the 1 o'clock position, but CIQ thinks North is at the 4 o'clock position.

I've never see this disconnect in/around Florida. And Pierre only sees this happen occasionally.

I added labels to help diag this. The wind is coming from SSW, the bike is heading toward SW. So there is a 14.5 k/hr headwind about 45 degs from the front/left. The DOT shows that North behind and to the right. But this is wrong as you can see in the map view.

Any thoughts on what might be going on? I can't replicate that here. All I can do is trust currentHeading()?

Top Replies

All Replies

  • These... I use the Activity.Info currentHeading

  • He is riding his bike almost due North.

    But bike heading is SW

    No, the bike heading is N.

    "Heading" is the direction the thing is moving towards.

    But the wind "heading" is the FROM direction

    It's not "wind heading"! 

    It's wind direction.

    The bicycle is moving/heading NORTH. The wind is coming FROM the south moving NORTH. It's a tailwind.

    If you want to use "heading" for wind, it would be the opposite of "direction".

    "Heading" should be reserved to refer to where the vessel (the bicycle) is moving towards.

  • These... I use the Activity.Info currentHeading

    Ah. It's determined in only two ways (delta position) or compass orientation.

    I believe these three reports should say the same thing (number). You don't know what method the device is using to get the heading.

  • LOL ok I get the terminology issue. Direction makes more sense for wind. However, the data field logic is correct. It correctly shows the relative head and tailwind all the time for me. And almost all the time for Pierre.

    The screenshot shown is an anomoly that Pierre sees once in a while, where "currentHeading()" is reporting a bike heading that is not in alignment with reality.

    I'll try to dig into this more, by tracking a few other data points, like the speed and GPS accuracy when this happens, and when it does happen, how long the misalignment lasts. Thanks!

  • Direction makes more sense for wind.

    The wind direction thing is kind of confusing.

    "Heading" as a synonym for "wind direction" doesn't make "less sense". It's plain and simply wrong. "Heading" is always where the thing is going to.

    The screenshot shown is an anomoly that Pierre sees once in a while, where "currentHeading()" is reporting a bike heading that is not in alignment with reality.

    This is a much better description of the issue. The wind stuff is irrelevant!

    --------------------------------------------

    How are you determining movement?

    I'm not sure if there's some sort of cut off for speed below which the compass is used.

    I reported an issue with reporting "heading" on the 1030+ when stopped (three years ago).

    Note that the compass on the 1030+ has to be calibrated.

    At "reasonable" speeds (let's say about 10mph), GPS errors aren't going to be enough to report a wildly wrong heading. (Unless the GPS reception is really bad.)

    If there are real numbers of people using your datafield, then it's a bit odd to have only this one report of this problem.

  • I think you are onto something here! Maybe that is the issue. I'll ask Pierre. Maybe his device is sometimes reverting to an uncalibrated Compass. Thank you! My download count is about 1000 and this is the only report. But even for him it is usually correct, and the weather view is only one of many data points, so usually people glance down to quickly get a feel for the current temp or relative wind direction and speed... and probably wouldn't notice or just assume the data is accurate.

  • 1000 is kinda small. It wouldn't be too surprising if people were having the issue and not ever noticing it.

  • I'm not sure if there's some sort of cut off for speed below which the compass is used.

    Related thread with info from Garmin employee. (It's pretty old so references to certain bugs or inconsistencies across devices are likely outdated/irrelevant.)

    [https://forums.garmin.com/developer/connect-iq/f/discussion/5906/position-info-heading-vs-activity-info-heading-and-limitations/39302#39302]

    I'd like to take a closer look at this because there's a lot flying around in this thread. Here's what I've boiled things down to:
    • What does Position.info.heading represent?
    • What does Activity.info.currentHeading represent?
    • Are there differences between Position.info.heading and Activity.info.currentHeading?
    • Is there a movement threshold is for heading values, and if there is one, what is that threshold?
    My understanding, and the way these are documented, is that the heading values provided by Position and Activity represent the same value--the true north referenced direction of travel when moving, and the compass orientation when not moving. The movement threshold is, roughly speaking, walking speed. I don't know that we publish the exact threshold, but I'd say 1 m/s is probably a pretty good estimate. Raw GPS position has a lot of noise, so we have to set a threshold for movement to prevent the heading value from jumping around when moving slowly or standing still.

    Off the top of my head, I'd suggest taking a look at Activity.info.track as a possible alternative, since it provides the direction of travel in radians. However, I think there's still a lot left to be clarified here, so let me do some more digging to see if I can get some more details.
    Okay, I have some preliminary answers here. I'm going to further clarify some of this, but I can at least explain how this should behave. First, a couple of definitions:

    Heading - the direction you are facing (or the direction the bow of a boat or the nose of a plane is pointing), independent of direction of travel; the compass orientation
    Course - the direction of travel, independent of heading; this is also referred to as the track by Garmin
    • Position.info.heading provides course data (I'm still confirming whether it gives heading information when not moving)
    • Sensor.info.heading provides heading data
    • Activity.info.currentHeading provides heading data (however, course data is available in Activity.info.track)
    I believe the intended behavior makes sense because:
    • The Position module is essentially the GPS sensor module, which cannot provide a true heading
    • The Sensor module is all non-GPS sensors (e.g. the electronic compass), which can provide a true heading but not track/course info
    • The Activity module uses all available sensors, so is able to provide both within the context of an Activity
    Unfortunately, I think we at least have a couple of things that have confused things for folks:
    • Position.info.heading is poorly named - it would be more accurate to call it Position.info.track
    • The Activity.info.heading documentation is incorrect and should match the Sensor.info.heading documentation
    I still need to test these to confirm the behavior empirically--at this point, I'm just going off what the code tells me it should be doing. I'll continue to investigate and add more detail once I have more to share.
  • So, I was a bit off with heading.

    Heading (strictly) is what the front of the vessel (the GPS unit actually) is pointing towards. "Course" is where the vessel is moving towards.

    Normally (and always in the past). the heading is determined by differences in GPS location.

    That is, generally, there's no difference between "heading" and "course" with these devices (when they are moving at a sufficient speed).

    The 1030+ has an issue with reporting compass heading. I reported that issue 3 years ago and I doubt it's fixed.

  • A silly example for a bike, but valid for say a boat or airplane... you are pointed North but due to the air/water current, you are moving NorthWest. Your Heading is North and your Course is NorthWest. Even using deltas in GPS coordinates. In that case a Compass Sensor should indicate Heading (well the direction of the device) and GPS Deltas would indicate Course. Thanks. I learned something today. Not unlike the difference in Elevation and Altitude... often used interchangeably but are different.