I have parrot AR drone 2.0 elite edition. And i read couple documents which says that i can get the magnetometer reading such as magX, magY and magZ. Also the YAW. Is there anyway to calculate the direction my drone is heading(north/south/east/west or northeast and such) by using these values? It also has 3 axis gyroscopes and a 3 axis accelerometer. I am probably going to use nodejs. Any help is greatly appreciated. Thank you.
This documentation might help a little explaining magnetometer http://arcbotics.com/products/sparki/parts/magnetometer/
Yes, you can get the drone's heading from the navdata. If you're using the node library ar-drone, then you can do something like this:
magneto.heading.fusionUnwrappedwill be the drone's heading, in degrees. You can see another example of it being used in the ardrone-webflight project, here where it uses heading to update the HUD's compass display.