Could there be a bug in fusion.c?

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

Could there be a bug in fusion.c?

ソリューションへジャンプ
1,937件の閲覧回数
vlam
Contributor I

Hello,

 

The following is line 1386 in function fRun_9DOF_GBY_KALMAN() in fusion.c.

 

    fmatrixAeqInvA(pfRows, iColInd, iRowInd, iPivot, 3);

 

That line is supposed to compute the inverse of the 6x6 matrix, P+, however, the size passed to it is 3. Is that supposed to be 6 instead?

 

Regards,

Vinh

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

YES!  I took your question to the author of that piece of code (Mark Pedley), and he confirmed your suspicion.  So first, apologies for creation of a bug for you to find, and second, my sincere congratulations on identifying it so precisely.  I very rarely find problems in Mark's code, although I've spent a lot of time with it over the years.

What led you to it?

Regards,

Mike

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,536件の閲覧回数
michaelestanley
NXP Employee
NXP Employee

YES!  I took your question to the author of that piece of code (Mark Pedley), and he confirmed your suspicion.  So first, apologies for creation of a bug for you to find, and second, my sincere congratulations on identifying it so precisely.  I very rarely find problems in Mark's code, although I've spent a lot of time with it over the years.

What led you to it?

Regards,

Mike

0 件の賞賛
返信
1,535件の閲覧回数
vlam
Contributor I

Hi Michael,

Thanks to you and Mark Pedley for confirming that. No apologies are necessary -- I am glad to help out. I appreciate that Freescale is making the code and documentation available to help the community making further advances in this area.

I found that bug while porting the code to Java (to run on Android in particular). The available documentation helps to make reading such good quality code a pleasure. Please give Mark my compliment.

That reminds me: May I ask you a somewhat related question on this thread? In function, driver.c:CreateAndSendBluetoothPacketsViaUART(), it is not clear to me why various measurements are scaled by different amounts. For examples, angular velocities (fOmega) are scaled by 20, Euler angles (fPhiPl, fThePl, fRhoPl) by 10, quaternions (fq) by 30K, etc.

1. Why do they need to be scaled? How are the scaling values determined?

2. Linear acceleration (faSePl)  is not output. But if it were, how would it be scaled?

Regards,

Vinh

0 件の賞賛
返信