Calculating Compass Bearing - using Honeywell Formula.

Firmware/software/electronics/mechanics
Post Reply
lxrocks
Member
Posts: 31
Joined: Sat Feb 15, 2014 1:24 am

Calculating Compass Bearing - using Honeywell Formula.

Post by lxrocks »

Playing with mag parameters and I was researching how to calculate the Compass Bearing based on the mag.(x,y,z) values and I noticed that the firmware seems to be re-using the MPU-6050 code and could not see anything specific for MPU-9250.

The MPU-9250 spec sheet refers the magnetometer specs as AK8963, so I guess the MPU-9250 is really a MPU-6050 with an AK8963 added. (Which is probably why the MPU-9250 can use MPU-6050 code un-modified.)


I wanted to clarify the firmware's Magnetometer code, however. I see reference to a

Code: Select all

imu.c(line 314): hmc5883lGetHeading(&mag.x, &mag.y, &mag.z);
- there is no Honeywell chip according to the schematics - so I assume this is compatible with MPU-9250


So finally a question :),

Is the compass data good or do we have some more work to do in this space?

Can I use the Honeywell guide on calculating Compass Bearing with this data?
lxrocks
Member
Posts: 31
Joined: Sat Feb 15, 2014 1:24 am

Re: Calculating Compass Bearing - using Honeywell Formula.

Post by lxrocks »

I cannot make any sense of the mag data being returned. I have applied the Honeywell formula to the data , yet i see no rotation or changes in the mag data if I rotate the CF2 in 360 degree turns. Do I potentially have hardware issue?

I have been scoping through the firmware of the magnetometer code and I am not convinced that it is properly supported but it's not familiar territory for me, so I hope someone can shed some light on the MPU9250/AK8963 support in the latest firmware.

In any event, I've had a lot of fun digging around the code :)

thanks
Post Reply