BobbyMi / ardu-imu

Automatically exported from code.google.com/p/ardu-imu
0 stars 0 forks source link

Scalar factor in DCM undocumented and not in repo - 1.9.8 release #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compare 1.9.8 release to repository (I couldn't find any revision that had 
this magic number in it).

What is the expected output? What do you see instead?
1.9.8 contains:
void Euler_angles(void)
{
  #if (OUTPUTMODE==2)         // Only accelerometer info (debugging purposes)
    roll = 1.9*atan2(Accel_Vector[1],Accel_Vector[2]);    // atan2(acc_y,acc_z)
    pitch = -1.9*asin((Accel_Vector[0])/(double)GRAVITY); // asin(acc_x)
    yaw = 0;
  #else
    pitch = -1.9*asin(DCM_Matrix[2][0]);
    roll = 1.9*atan2(DCM_Matrix[2][1],DCM_Matrix[2][2]);
    yaw = atan2(DCM_Matrix[1][0],DCM_Matrix[0][0]);
  #endif
}

This constant of 1.9 does not appear in the repository and it is undocumented 
in this release.  There is a comment on the downloads page talking about 
calibration for pitch and roll, but it is unclear if it refers to this.  It's 
also not clear why the calibration is performed after extracting the angles and 
not on the sensor measurements themselves.

What version of the product are you using? On what operating system?
1.9.8 from the downloads section.

Please provide any additional information below.

Original issue reported on code.google.com by kmat...@gmail.com on 19 Jan 2013 at 9:35