public static Matrix3 rotation_df(DFLog.DFItem ATT) { //return the current DCM rotation matrix''' var r = new Matrix3(); r.from_euler(radians((Double)ATT.GetRaw("Roll")), radians((Double)ATT.GetRaw("Pitch")), radians((Double)ATT.GetRaw("Yaw"))); return(r); }
public static Vector3 earth_accel_df(DFLog.DFItem IMU, DFLog.DFItem ATT) { //return earth frame acceleration vector from df log var r = rotation_df(ATT); var accel = new Vector3((float)IMU.GetRaw("AccX"), (float)IMU.GetRaw("AccY"), (float)IMU.GetRaw("AccZ")); return(r * accel); }