Determining heading in Inertial Navigation Systems

739 views Asked by At

I have a question regarding inertial navigation with a mobile device. I am using an android tablet for development but I think the question is related to all types (even with better sensors) of hardware.

The most basic question when developing an inertial system is how to determine the direction of the carrier's movement. Even if we assume that the magnetometer readings are 100% accurate (which they are obviously not!) There is still the question of the device orientation relative to the user.

Simple example - if the user is walking north, but holds the device with the device's Y axis points north-east, (a link to a picture of the different axis: http://developer.android.com/reference/android/hardware/SensorEvent.html) Then the magnetometer will point towards north-east. How can we tell which way the user is actually heading? (The same will be true if we use both magnetometer and Gyro for determining heading)

A possible solution will be to use the Accelerometer's Y-axis and X-axis readings. Something in the direction of using arctan(a-Y/a-X) (for example - if the user holds the device perfectly straight, then the X-Axis will show nothing...) But since the Accelerometer's readings are not stable, it is not so easy...

Does anyone know of an algorithm that actually works? I am sure this is a well known problem, but I can't seem to find references to solutions...

Thanks in advance!

Ariel

2

There are 2 answers

1
Martin On

The really right answer is to leave the device sitting there for a while, detect the rotation of the earth, and then compute true north from that. Unfortunately, the gyros in a mobile phone aren't accurate enough for that....

0
ravemir On

See this answer for an idea: by obtaining the acceleration values in relation to the earth, you can then use the atan2 function to compute the actual direction.

You mention the user holds the tablet, and I assume fairly stable (unlike a case I am working on, where the user moves the phone constantly). Yet, for some reason, the user may change the orientation of the device, and this may influence the readings you obtain.

Thus, in the event of an orientation change, you should call remapCoordinates() accordingly to fix the readings you obtain.

NOTE: You can also use the getOrientation() method accordingly, and the first field represents the heading direction.