455745_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

455745_en-US

455745_en-US

i want to fix direction not north

Hi. i am user of K64F, sensor fusion.

 

after some test, i knew that the magnetometer has a slight error to point a north. ( about 8 degree (yaw))

 

so i want to fix a direction receiving from magnetometer , not real north

(For example, I want to designate the power up direction is north.)

 

Question 1 :  it is right way to use magnetometer offset compensation? like FXOS8700CQ_Mag_Calibration function in  FXOS8700CQ - Bare metal example project

 

 

 

i tried to test a FXOS8700CQ_Mag_Calibration function

when i push button, OnNMI works and FXOS8700CQ_Mag_Calibration function execute.

but it didn't work. mag raw data was stopped.

 

 

Question 2 :  i is problem about timing or I have to redesign a code?

 

Thank you.

SensorFusionRe: i want to fix direction not north

Tim,

I'll have to let Tomas comment on your project-specific questions, as I haven't looked at his code.  But with regard to Question 1:  Magnetic calibration works by mapping a 3D ellipsoid of magnetic measurements into a 3D sphere.  Freescale's routines do this by performing something called a total least squares fit.  This attempts to minimize radial error in the mapping.  But at the end of the day, it can leave uncorrected some amount of pure rotation in the magnetic distortion.  That's why you still see some error even after correction.  The error results from fundamental assumptions in the mag cal routines, and there is nothing you can do in those routines to account for it.  The fix is to simply apply a fixed, final 3D rotation to the computed device orientation to account for the error.

Mike

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎02-04-2026 03:45 AM
更新者: