i want to fix direction not north

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

i want to fix direction not north

ソリューションへジャンプ
1,042件の閲覧回数
timronaldo
Contributor II

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.

ラベル(1)
0 件の賞賛
返信
1 解決策
745件の閲覧回数
michaelestanley
NXP Employee
NXP Employee

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

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
746件の閲覧回数
michaelestanley
NXP Employee
NXP Employee

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

0 件の賞賛
返信