This object is in archive! 

Inconsistent/wrong heading direction between compass and GPS.

gigapus shared this problem 11 years ago
Solved

Locus Pro 2.3.1


Use hardware compass ON


Auto change ON


Two cases, each considered for facing or moving towards true N (same issue for any direction):


Use true bearing ON:


When stationary (i.e., using hardware compass for bearing) the view indicator/heading line is out by an amount equal to but of opposite sign to the declination (which is 17 degrees here). That is, I expect to see it point true N, but it actually points W of true N (while magnetic N is E of true N). When moving (i.e., using GPS for bearing) the arrow/heading line points to true N.


Use true bearing OFF:


When stationary the view indicator/heading line points to true N. When moving the arrow/heading line points to magnetic N.


As you can see, the results are not consistent between the compass and GPS in both cases. I would expect the view/heading/arrow to point in the direction I am pointing in all cases.

Replies (12)

photo
0

I`m experiencing what seems to be the same problem. Specifics:


- Two phones misbehave identically: Droid X and Droid razr Maxx (2.3.6)


- Similar misbehavior on Locus Free and Locus Pro.


- Google Maps and Catch Compass on the same phones show true and magnetic north correctly.


- Magnetic declination in my area is about 14 degrees East (San Francisco, CA).


- It almost seems as if Locus is applying the magnetic declination in the opposite direction.


Regarding the last bullet above, it would be nice if Locus had an option to display the phone`s


heading numerically, similar to what some compass apps can do. Some of us older folks who


learned navigation before the invention of the lodestone compass (back when one found true


north by checking which side of a tree trunk had the most moss) still like to be able to take a


rough numeric sighting along the edge our smart phone. An optional numeric heading indicator


would be a nice minor addition, but obviously it should have very low priority. The magnetic


declination error is much more important, since it causes the displayed map to be oriented


incorrectly.


I`d be happy to help in correcting this problem. Thanks for the great application, which was


of great use last year when travelling in Europe.

photo
0

hello Guys,


I`m sorry for very very late response. I would like to solve this issue to next version, so may you please confirm me that this issue still exists? I did some changes to this behaviour and as I`m checking code, it should be OK now (in latest version 2.5.4). Thanks

photo
0

Menion -- Thanks for the reply.


I upgraded to 2.5.4 when it became available. Unfortunately, it didn`t seem to correct the behavior, but before this reply I waited until I could run a more careful experiment. I`ll describe it for completeness. The magnetic declination here near San Francisco is about 15 degrees east.


First, with an analog orienteering compass, and distant from any metal, I drew 3 radial lines on the table for magnetic north, true north (345 degrees), and the last correcting the declination in the wrong direction, i.e. 15 degrees.


After moving the magnetic compass far away, I turned off the "true north" correction in settings and lined the Razr Maxx with the magnetic north line. The Locus red rotation indicator pointed very close to north. Then, without moving the device, I added the correction option in settings. The phone then lined up closely with the incorrect north at 15 degrees. As a final test, turning off map rotation and lining up the phone with the correct 245 true north, the map roughly agreed with the street outside.


So it almost seems as though the magnetic declination correction is being applied in the wrong direction. But it`s hard to believe this misbehavior could be limited to one particular line of phones instead of all phones.


I haven`t rechecked, but my older Droid X seemed to behave the same. Both devices are by Motorola. However, there was a time some months ago whereGoogle Sky Map rotated in the wrong direction on many Motorola phones, which bug was corrected by a later release. Perhaps the sign of some offset register is different in the Motorola microcode hen in most other brands.


Anyway, until the bug can be fixed, I know the error can be compensated for any location with the angle offset controls in settings.


If you need more experiments, or tests of fixes (if you don`t have access to the necessary phones) then I would be more than willing to help. Locus is a wonderful application and has saved me a number of times.


-- Steve

photo
0

excellent Steve, thank you


I think I finally found a problem.


I`m currently fixing magnetic north coming from compass by reduction of declinations, so "true north = magnetic north - dec". Which is in real correct, but not here. I have set declination to 15 (for testing) and now I see it. There is need to set angle to opposite direction to finally display correctly ... ah damn, hard for me to explain in English, anyway I`ll fix it and you`ll see in next version


And thanks once more for perfect report!

photo
0

This is the same problem that I reported under a different topic.


At the end is an excerpt from the Android GeomagneticField class documentation.


getDeclination() follows the convention for sign: east is positive.


(Same convention used here:


http://www.ngdc.noaa.gov/geomag-web/#...


)


With this sign convention the equation is:


(1) mag = true - dec


or


(2) true = mag + dec


Eq 1 is reflected in the familiar mnemonic for calculating mag heading: "East is least, west is best" (i.e., with west declination mag > true).


If anyone finds this confusing I suggest making a sketch for yourself.


BTW, this was correct in Locus in v2.2.3 and earlier.


public float getDeclination ()


Since: API Level 3


Returns


The declination of the horizontal component of the magnetic field from true north, in degrees (i.e. positive means the magnetic field is rotated east that much from true north).

photo
0

if someone will have free time, may you try this test version? https://dl.dropbox.com/u/8015949/Locu...


I would like to release in sunday new version, so it should be fine if this issue will be finally correctly fixed

photo
0

any news with 2.5.6 version?

photo
0

Since one or two updates the map is "shuffling" around in the "rotate map" mode. That is if I rotate the phone, the map rotates even slower or even in the wrong direction (I rotate left and the map does not compensate but rotates (even further) left too), depending on the direction. At some point it suddenly rotates quickly about 180°.


All this behaviour was correct in a previous version.


I will investigate further, at which orientation which behaviour occurs.

photo
0

OK, have not had time to check moving case, but stationary case has changed ... although it is still not right. Basically, it seems to have flipped: the heading line is now correct when true bearing is on, and is out by an amount equal but opposite to the declination when true bearing is off. The heading line should not change between these cases - I have not changed my position at all. The numerical value of the heading will be different, depending on whether is it magnetic or true, but the physical direction drawn on the map should be the same.

photo
0

Tested moving case today. It behaves identically to the new stationary case. That is, it works as expected when "true bearing" is on, but when it is off it indicates a heading offset by an amount equal to but opposite sign to the magnetic declination.

photo
0

Hi,


you`re right. Maps are oriented to true north, so there is no reason to also change heading by "true north" settings. It should be always to true north, so fixed now


And Oliver - should your problems be caused only by un-calibrated compass? It sometimes happen also for me, but a little bit "waving" with a phone for a while, usually helps

photo
0

if you`ll have again some free evening, check please this version. Should be correct now http://forum.locusmap.eu/viewtopic.ph... . Thank you

Replies have been locked on this page!