After computing orthogoanl X, Y and Z matrix, a Taylor's expansion is used in 'Direction Cosine Matrix IMU: Theory'.

Scaling X, Y and Z using a Taylor's expansion,

[In the paper]

X_norm =  0.5 (3 - dot(X_orth, X_orth)) * X_orth

Y_norm =  0.5 (3 - dot(Y_orth, Y_orth)) * Y_orth

Z_norm =  0.5 (3 - dot(Z_orth, Z_orth)) * Z_orth

> dot(X,X) = dot product

But when I look at the C programming code.

[C programming code]

      /* U scaling */
      VectorDotProduct(&rmat[0], &rmat[0], &f_buff);
      f_buff = 1./sqrt(f_buff);
      for (i=0;i<3;i++) rmat[i] = rmat[i]*f_buff;

      /* V scaling */
      VectorDotProduct(&rmat[3], &rmat[3], &f_buff);
      f_buff = 1./sqrt(f_buff);
      for (i=0;i<3;i++) rmat[3+i] = rmat[3+i]*f_buff;

      /* W scaling */
      VectorDotProduct(&rmat[6], &rmat[6], &f_buff);
      f_buff = 1./sqrt(f_buff);
      for (i=0;i<3;i++) rmat[6+i] = rmat[6+i]*f_buff;

1) This way is to divide each element of each row instead of Taylor's expansion. But I am not sure how to represent mathmatically.Could anyone help me how to work and represent it?

2) '&' looks like pointers. If this symbol is the pointer in C programming, please tell me how to work.

3) Please could anyone tell me why this use 1/sqrt(x*x) instead of Taylor's expansion?

Thank you very much

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    The taylor expansion is just a first term expansion of the square root function around a nominal value of 1, and is used in place of the square root function to reduce the processing time required by the function.

    Other than processing time there is no reason to use the taylor series expansion - it is only an approximation.

This reply was deleted.

Activity

Chris Anderson liked Zara Mae Pickering's profile
May 21
Azjeg liked Azjeg's profile
Apr 27
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
More…