Compass FXOS8700 software for angle calculation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compass FXOS8700 software for angle calculation

2,993 Views
anilkumarraj200
Contributor I

Hi,

Please share the I need firmware driver code for Compass FXOS8700.

Thanks,
Labels (2)
0 Kudos
2 Replies

2,129 Views
anilkumarraj200
Contributor I

Hi,

I am getting the below accelerometer & magnetometer data from FXOS sensor. 

I would like to calculate Pitch, Roll, Yaw or heading (compass like in mobile North heading) 

And in my board sensor direction x & Y is different orientation, in software can it be tune and apply any error factor in software logic.

Please help me how to calculate the above values:

Regards 

0 Kudos

2,129 Views
david_diaz
NXP Employee
NXP Employee

Hello,

Thank you for writing.

The tilt-compensated eCompass algorithm, from the NXP Sensor Fusion Libraries, actually calculates all three angles (pitch, roll, and yaw or compass heading) that define the PCB orientation.

So, in this case I recommend to download the libraries mentioned in order to get the source code and to review the application note below in order to get more detailed more information:

Implementing a Tilt-Compensated eCompass using Accelerometer and Magnetometer Sensors

 

I hope this information helps.

Please let me know if you have any further question.

 

Regards,

David

0 Kudos
%3CLINGO-SUB%20id%3D%22lingo-sub-633138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECompass%20FXOS8700%20software%20for%20angle%20calculation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-633138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23222222%3B%20background-color%3A%20%23ffffff%3B%22%3EHi%2C%3C%2FSPAN%3E%3CBR%20data-jive-statusinputadd%3D%22true%22%20data-jive-truncation-flag%3D%22true%22%20style%3D%22color%3A%20%23222222%3B%22%20%2F%3E%3C%2FP%3E%3CDIV%20style%3D%22color%3A%20%23222222%3B%20border%3A%200px%3B%20font-size%3A%2013px%3B%22%3EPlease%20share%20the%20I%20need%20firmware%20driver%20code%20for%20Compass%20FXOS8700.%3CBR%20data-jive-statusinputadd%3D%22true%22%20data-jive-truncation-flag%3D%22true%22%20%2F%3E%3CBR%20data-jive-statusinputadd%3D%22true%22%20data-jive-truncation-flag%3D%22true%22%20%2F%3EThanks%2C%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-633138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAccelerometers%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMagnetic%20Sensors%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-633140%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Compass%20FXOS8700%20software%20for%20angle%20calculation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-633140%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20am%20getting%20the%20below%20accelerometer%20%26amp%3B%20magnetometer%20data%20from%20FXOS%20sensor.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20calculate%20Pitch%2C%20Roll%2C%20Yaw%20or%20heading%20(compass%20like%20in%20mobile%20North%20heading)%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAnd%20in%20my%20board%20sensor%20direction%20x%20%26amp%3B%20Y%20is%20different%20orientation%2C%20in%20software%20can%20it%20be%20tune%20and%20apply%20any%20error%20factor%20in%20software%20logic.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EPlease%20help%20me%20how%20to%20calculate%20the%20above%20values%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ERegards%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-633139%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Compass%20FXOS8700%20software%20for%20angle%20calculation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-633139%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you%20for%20writing.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20tilt-compensated%20eCompass%20algorithm%2C%20from%20the%20%3CA%20href%3D%22http%3A%2F%2Fwww.nxp.com%2Fwebapp%2Fsps%2Fdownload%2Flicense.jsp%3FcolCode%3DNXPSENSORFUSIONREVISION5%26amp%3BParent_nodeId%3D13638844902257338007CA%26amp%3BParent_pageType%3D%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ENXP%20Sensor%20Fusion%20Libraries%3C%2FA%3E%2C%20actually%20calculates%20all%20three%20angles%20(pitch%2C%20roll%2C%20and%20yaw%20or%20compass%20heading)%20that%20define%20the%20PCB%20orientation.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ESo%2C%20in%20this%20case%20I%20recommend%20to%20download%20the%20libraries%20mentioned%20in%20order%20to%20get%20the%20source%20code%20and%20to%20review%20the%20application%20note%20below%20in%20order%20to%20get%20more%20detailed%20more%20information%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fcache.freescale.com%2Ffiles%2Fsensors%2Fdoc%2Fapp_note%2FAN4248.pdf%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EImplementing%20a%20Tilt-Compensated%20eCompass%20using%20Accelerometer%20and%20Magnetometer%20Sensors%3C%2FA%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20hope%20this%20information%20helps.%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20if%20you%20have%20any%20further%20question.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EDavid%3C%2FP%3E%3C%2FLINGO-BODY%3E