// This is the real magnetic
// which would be displayed
// if the compass had no errors.
- double heading_mag_deg = _heading_node->getDoubleValue();
+ //double heading_mag_deg = _heading_node->getDoubleValue();
// don't update if the compass
if (!_serviceable_node->getBoolValue())
return;
- // jam on excessive sideslip
+ /*
+ * Vassilii: commented out because this way, even when parked,
+ * w/o any accelerations and level, the compass is jammed.
+ * If somebody wants to model jamming, real forces (i.e. accelerations)
+ * and not sideslip angle must be considered.
+ */
+#if 0
+ // jam on excessive sideslip
if (fabs(_beta_node->getDoubleValue()) > 12.0) {
_rate_degps = 0.0;
return;
}
+#endif
/*
*/
double x_accel_g = _x_accel_node->getDoubleValue() / 32;
double y_accel_g = _y_accel_node->getDoubleValue() / 32;
- double z_accel_g = _z_accel_node->getDoubleValue() / 32;
+ //double z_accel_g = _z_accel_node->getDoubleValue() / 32;
theta -= 0.07 * x_accel_g;
phi -= 0.07 * y_accel_g;