]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/mag_compass.cxx
- fix unzoomed tapes (TODO: restore tick length)
[flightgear.git] / src / Instrumentation / mag_compass.cxx
index 1120dce770c7b0aa39fe51bc0c688188f30d0f7f..e67d35074b1d248f9e2b45e73b00535204928f5d 100644 (file)
@@ -86,7 +86,7 @@ MagCompass::update (double delta_time_sec)
                                 // 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
@@ -94,11 +94,19 @@ MagCompass::update (double delta_time_sec)
     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
 
 
     /*
@@ -146,7 +154,7 @@ MagCompass::update (double delta_time_sec)
     */
     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;