This object is in archive! 

GPS bearing stuck in degrees true

Carl Mascott shared this problem 12 years ago
Solved

Locus Free 2.2.1


Using custom screen "Simple map" (one of default skins)


Sensor settings:


Use hardware compass: OFF (should get bearing from GPS)


Use true bearing: OFF (should give degrees magnetic)


Parameter being displayed:


"{orient_course}", // course orientation (source depend on selection on GPS screen - GPS or internal compass)


Sample NMEA RMC sentence showing magnetic declination of 15.9 deg W:


$GPRMC,172409.00,A,4228.9018,N,07118.4575,W,102.2,281.3,120412,15.9,W*61


Course is always in degrees true regardless of value of "Use true bearing".

Replies (5)

photo
0

current system used "True bearing" settings only on bearing from sensors. Not from GPS. This is now fixed, so in case you have


bearing from GPS and "True bearing" is off, I`ll reduce values from GPS by declination

photo
0

$GPRMC,170655.00,A,4202.1655,N,07053.8326,W,340.4,165.9,160412,15.9,W*60


Magnetic declination is now (Locus Free 2.2.2) being accounted for but there is still a one-degree discrepancy between GPS data and Locus data. From the RMC sentence above the magnetic bearing should be 181.8 degrees; Locus shows 181 degrees.


I notice that Locus doesn`t show a bearing until the aircraft starts to move. Are you calculating the (true) bearing rather than reading it from the GPS?

photo
0

As for the discrepancy between 181.8deg and 181deg, i`m guessing that since headings and courses are displayed as no more than three significant digits, Locus truncates the value rather than rounding.

photo
0

hmm I think it will not be a problem of rounding. Locus use ROUND_HALF_EVEN method so it should be correct. Problem will be probably in value itself you compare. Because yes, I compute declination and true bearing by myself (thanks to some algorithm in android, not mine) so it should differ compare to declination from NMEA sentences

photo
0

The problem turns out to be the magnetic declination from my "GPS" (X-Plane 9.62 flight simulator). "GPS" value: 15.9 degrees W. Current WMM-2010 (as used by Android) value: 15.1 degrees W. Case closed.

Replies have been locked on this page!