void orientationCalcEulers_f(struct OrientationReps* orientation) {
  if (bit_is_set(orientation->status, ORREP_EULER_F))
    return;

  if (bit_is_set(orientation->status, ORREP_EULER_I)) {
    EULERS_FLOAT_OF_BFP(orientation->eulers_f, orientation->eulers_i);
  }
  else if (bit_is_set(orientation->status, ORREP_RMAT_F)) {
    FLOAT_EULERS_OF_RMAT(orientation->eulers_f, orientation->rmat_f);
  }
  else if (bit_is_set(orientation->status, ORREP_QUAT_F)) {
    FLOAT_EULERS_OF_QUAT(orientation->eulers_f, orientation->quat_f);
  }
  else if (bit_is_set(orientation->status, ORREP_RMAT_I)) {
    RMAT_FLOAT_OF_BFP(orientation->rmat_f, orientation->rmat_i);
    SetBit(orientation->status, ORREP_RMAT_F);
    FLOAT_EULERS_OF_RMAT(orientation->eulers_f, orientation->rmat_f);
  }
  else if (bit_is_set(orientation->status, ORREP_QUAT_I)) {
    QUAT_FLOAT_OF_BFP(orientation->quat_f, orientation->quat_i);
    SetBit(orientation->status, ORREP_QUAT_F);
    FLOAT_EULERS_OF_QUAT(orientation->eulers_f, orientation->quat_f);
  }
  /* set bit to indicate this representation is computed */
  SetBit(orientation->status, ORREP_EULER_F);
}
void orientationCalcRMat_f(struct OrientationReps* orientation)
{
  if (bit_is_set(orientation->status, ORREP_RMAT_F)) {
    return;
  }

  if (bit_is_set(orientation->status, ORREP_RMAT_I)) {
    RMAT_FLOAT_OF_BFP(orientation->rmat_f, orientation->rmat_i);
  } else if (bit_is_set(orientation->status, ORREP_QUAT_F)) {
    float_rmat_of_quat(&(orientation->rmat_f), &(orientation->quat_f));
  } else if (bit_is_set(orientation->status, ORREP_EULER_F)) {
    float_rmat_of_eulers(&(orientation->rmat_f), &(orientation->eulers_f));
  } else if (bit_is_set(orientation->status, ORREP_QUAT_I)) {
    QUAT_FLOAT_OF_BFP(orientation->quat_f, orientation->quat_i);
    SetBit(orientation->status, ORREP_QUAT_F);
    float_rmat_of_quat(&(orientation->rmat_f), &(orientation->quat_f));
  } else if (bit_is_set(orientation->status, ORREP_EULER_I)) {
    EULERS_FLOAT_OF_BFP(orientation->eulers_f, orientation->eulers_i);
    SetBit(orientation->status, ORREP_EULER_F);
    float_rmat_of_eulers(&(orientation->rmat_f), &(orientation->eulers_f));
  }
  /* set bit to indicate this representation is computed */
  SetBit(orientation->status, ORREP_RMAT_F);
}