websss
asked on
Xamarin - Location tracking: getting the heading/bearing/direction ?
Hi
I'm a noob on xamarin
I'm creating a little app which simply sends latitude, longitude, speed and direction/heading to a server over TCP every 30 secs
The heading/direction is causing me some confusion
I'm expecting to get a result between 0 and 360 (degrees) which is indicative of the direction you are travelling (think north east south west)
However, I'm a little confused what sensors I need to enable as there seems to be:
Accelerometer
Gyroscope
Magnetometer
Compass
firstly i'm trying to get android working on Xamarin, but I also want iOS and Windows phone
Can anyone help me in choosing which one is "the one" or if there are many which "order of preference" i should use based on the phones supported hardware
Also, Is there a cross platform option that I'll need to use on Xamarin for iOS Android and windows?
I'm a noob on xamarin
I'm creating a little app which simply sends latitude, longitude, speed and direction/heading to a server over TCP every 30 secs
The heading/direction is causing me some confusion
I'm expecting to get a result between 0 and 360 (degrees) which is indicative of the direction you are travelling (think north east south west)
However, I'm a little confused what sensors I need to enable as there seems to be:
Accelerometer
Gyroscope
Magnetometer
Compass
firstly i'm trying to get android working on Xamarin, but I also want iOS and Windows phone
Can anyone help me in choosing which one is "the one" or if there are many which "order of preference" i should use based on the phones supported hardware
Also, Is there a cross platform option that I'll need to use on Xamarin for iOS Android and windows?
ASKER
Thanks Hamidreza
We have this working with loads of tracking devices (not phones) and its sending the heading fine
Based on what you said, the issue is if the phone isn't pointed forwards then it will report the wrong direction moving.
I guess this is more complicated that I thought
We have this working with loads of tracking devices (not phones) and its sending the heading fine
Based on what you said, the issue is if the phone isn't pointed forwards then it will report the wrong direction moving.
I guess this is more complicated that I thought
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Solution: send device's geo location (long/lat) to you server in intervals. Then on your server interpolate the geo points and calculate the slope of the path which it declares the direction of the travel. This process can also take place on the device.