]> git.mxchange.org Git - flightgear.git/commitdiff
Alternator should still put out some output when RPM < 800. (Yes I know this
authorcurt <curt>
Mon, 14 Jun 2004 21:36:10 +0000 (21:36 +0000)
committercurt <curt>
Mon, 14 Jun 2004 21:36:10 +0000 (21:36 +0000)
is hard coded for the C172, but so far no one has asked to do this more
generically.)

src/Systems/electrical.cxx

index 0a02f2c321ad70178e31e8ed36b9df0e6155a3f9..72dcf3917aeba31d489307cabc3c69fdf6d69812 100644 (file)
@@ -350,12 +350,17 @@ void FGElectricalSystem::update (double dt) {
     if ( fgGetBool("/controls/engines/engine[0]/master-bat") ) {
         volts = 24.0;
     }
-    if ( fgGetBool("/controls/engines/engine[0]/master-alt") &&
-         fgGetDouble("/engines/engine[0]/rpm") > 800 )
-    {
-        double alt_contrib = 28.0;
-        if ( alt_contrib > volts ) {
-            volts = alt_contrib;
+    if ( fgGetBool("/controls/engines/engine[0]/master-alt") ) {
+        if ( fgGetDouble("/engines/engine[0]/rpm") > 800 ) {
+            double alt_contrib = 28.0;
+            if ( alt_contrib > volts ) {
+                volts = alt_contrib;
+            }
+        } else if ( fgGetDouble("/engines/engine[0]/rpm") > 200 ) {
+            double alt_contrib = 20.0;
+            if ( alt_contrib > volts ) {
+                volts = alt_contrib;
+            }
         }
     }
     _volts_out->setDoubleValue( volts );