Page 1 of 2

How to get compass data in arduino?

Posted: Sat Apr 08, 2017 5:15 pm
by HEMANT
Hello, i bought marvelmind system recently, in the dashboard under the view option, i can see an option for getting "Compass data(X,Y axis)". So i am guessing the system can be used as a digital compass for the map IT creates. Can someone tell me how to get this data on arduino? and how to utilise this data?
By "how" i mean the sample code required to get that data from marvelmind and parse it. It will be a great help.
Thanks in advance.

Re: How to get compass data in arduino?

Posted: Sun Apr 09, 2017 1:04 pm
by smoker77
Hello,
current version of sowftware release (5.51) not outputs the inertial sensors data in the same protocol as coordinates.
In the next release we will add the function of streaming of raw data from gyro, accelerometer and compass.
Take aware this function will be available only for hardware with mounted inertial sensors, see the attached picture.

Re: How to get compass data in arduino?

Posted: Tue Jul 04, 2017 3:50 pm
by janinl
I would also be interested in this feature.
In my case I am using the USB-UART interface.

Thanks

Re: How to get compass data in arduino?

Posted: Tue Jul 04, 2017 4:54 pm
by smoker77
Hello. New version of software from our site (5.63) already can output the raw inertial sensors data. But by default it is disabled, you should enable this output as shown on the screenshot. The data are coming according to section 1.3 of the protocol: https://drive.google.com/open?id=0ByNFY ... mhKTkkzVzg.

Re: How to get compass data in arduino?

Posted: Wed Jul 05, 2017 1:06 am
by janinl
Hi Smoker77,

It works, this is awesome!

Thanks a lot

Re: How to get compass data in arduino?

Posted: Wed Jul 05, 2017 3:20 pm
by amolad
Hello!
Any possiblility of receiving the raw distances of the hedge to the stationary beacon?
Still waiting for this for the pixhawk integration of marvelmind :(

Re: How to get compass data in arduino?

Posted: Wed Jul 05, 2017 5:17 pm
by smoker77
Hello.
Do you need the raw distances data output from modem or from hedge?
For the modem the data is already available, see section 6 of this protocol:
http://marvelmind.com/downloads/modem_u ... _01_27.pdf
From the mobile beacon this data is not yet available, the update containing this function will be ready in coming weeks.

Re: How to get compass data in arduino?

Posted: Thu Jul 06, 2017 12:40 pm
by amolad
Okay Thank you!!
Yes it is from the mobile beacon.
How it works is that, these raw distances are inputted to the EKF of ardupilot which then computes the position of the vehicle!
https://github.com/ArduPilot/ardupilot/ ... d.cpp#L390
This is why :(

Re: How to get compass data in arduino?

Posted: Sat Jul 08, 2017 4:06 pm
by admin
amolad wrote:Okay Thank you!!
Yes it is from the mobile beacon.
How it works is that, these raw distances are inputted to the EKF of ardupilot which then computes the position of the vehicle!
https://github.com/ArduPilot/ardupilot/ ... d.cpp#L390
This is why :(



Just for me to understand. So, basically, you need the same what we currently already have for modem, also on the mobile beacon, right? Raw distances. And then you do the mathematics, filtering, etc. by yourself. Correct?

Re: How to get compass data in arduino?

Posted: Mon Jul 10, 2017 4:00 pm
by amolad
admin wrote:
amolad wrote:Okay Thank you!!
Yes it is from the mobile beacon.
How it works is that, these raw distances are inputted to the EKF of ardupilot which then computes the position of the vehicle!
https://github.com/ArduPilot/ardupilot/ ... d.cpp#L390
This is why :(



Just for me to understand. So, basically, you need the same what we currently already have for modem, also on the mobile beacon, right? Raw distances. And then you do the mathematics, filtering, etc. by yourself. Correct?


Exactly! The Kalmann filter in the ardupilot code already does the triangulation since it has to support multiple beacons. Now since marvelmind already gives us the XYZ of the vehicle, this is supplied as back calculation and reliabilty based on the accuracy. The accuracy of the info is now hardcoded as +/- 2cms! It would be nice to have some sort of accuracy info too supplied if possible? :) But its not too important.
The kalmann filter will use the raw distances and compute the XYZ and does a check between the given values and calculated values.

So yeah just need the info what the modem shows, the raw distances, also in the mobile beacon side! :)