]> git.mxchange.org Git - flightgear.git/commitdiff
Updates from David Megginson:
authorcurt <curt>
Sat, 17 Jun 2000 03:41:03 +0000 (03:41 +0000)
committercurt <curt>
Sat, 17 Jun 2000 03:41:03 +0000 (03:41 +0000)
1. I've modified src/Time/fg_time.cxx so that the --start-date-gmt
option works correctly, at least on my system.

2. I've modified src/Main/bfi.cxx to return the correct time from
FGBFI::getTimeGMT(), so that saving and reloading now keeps the time set
correctly again.

3. I've modified src/Main/main.cxx so that the engine still makes a
noise when it's idling (it sounded very strange when the engine simply
turned off at idle then magically turned on again with a little
throttle).

src/Cockpit/sp_panel.cxx
src/Main/bfi.cxx
src/Main/main.cxx
src/Time/fg_time.cxx

index 6f81955e55b9c49b5d29ad05ee7fd252a22bddfe..356bdaa22335b1be65c50ca75c838eb6508673fe 100644 (file)
@@ -464,7 +464,7 @@ InstrumentData instruments[] =
     {new MyTexturedLayer("turnBall",
        int(SIX_W * (4.0/64.0)), int(SIX_W * (4.0/64.0))), {
       {TransData::Rotation, FGSteam::get_TC_rad,
-        -0.1, 0.1, -450.0, 0.0},
+        -0.1, 0.1, -2000.0, 0.0},
       {TransData::YShift, 0, 0.0, 0.0, 0.0, -(SIX_W/4)+4}
     }}
   }},
index c87ce8b9bdfc85dbf468c0500320bc630657308a..9c20d6996842809c26d39dbac4fde4ed5c711f94 100644 (file)
@@ -249,8 +249,7 @@ FGBFI::setAircraftDir (const string &dir)
 time_t
 FGBFI::getTimeGMT ()
 {
-                               // FIXME: inefficient
-  return mktime(FGTime::cur_time_params->getGmt());
+  return FGTime::cur_time_params->get_cur_time();
 }
 
 
index 6967b7b8ac567b0482f31ba1560a9a6bd12323ad..67491f58143c919d0dd09d9709b36285abad0989 100644 (file)
@@ -942,35 +942,37 @@ static void fgMainLoop( void ) {
 
        double pitch = log((controls.get_throttle(0) * 14.0) + 1.0);
        //fprintf(stderr, "pitch1: %f ", pitch);
-       if (controls.get_throttle(0) > 0.0 || cur_fdm_state->v_rel_wind > 40.0) {
-           //fprintf(stderr, "rel_wind: %f ", cur_fdm_state->v_rel_wind);
-           // only add relative wind and AoA if prop is moving
-           // or we're really flying at idle throttle
-           if (pitch < 5.4) {  // this needs tuning
-               // prop tips not breaking sound barrier
-               pitch += log(cur_fdm_state->v_rel_wind + 0.8)/2;
-           } else {
-               // prop tips breaking sound barrier
-               pitch += log(cur_fdm_state->v_rel_wind + 0.8)/10;
-           }
-           //fprintf(stderr, "pitch2: %f ", pitch);
-           //fprintf(stderr, "AoA: %f ", FG_Gamma_vert_rad);
-
-           // Angle of Attack next... -x^3(e^x) is my best guess Just
-           // need to calculate some reasonable scaling factor and
-           // then clamp it on the positive aoa (neg adj) side
-           double aoa = cur_fdm_state->get_Gamma_vert_rad() * 2.2;
-           double tmp = 3.0;
-           double aoa_adj = pow(-aoa, tmp) * pow(M_E, aoa);
-           if (aoa_adj < -0.8) aoa_adj = -0.8;
-           pitch += aoa_adj;
-           //fprintf(stderr, "pitch3: %f ", pitch);
-
-           // don't run at absurdly slow rates -- not realistic
-           // and sounds bad to boot.  :-)
-           if (pitch < 0.8) pitch = 0.8;
+       // if (controls.get_throttle(0) > 0.0 || 
+       //     cur_fdm_state->v_rel_wind > 40.0) {
+
+       //fprintf(stderr, "rel_wind: %f ", cur_fdm_state->v_rel_wind);
+       // only add relative wind and AoA if prop is moving
+       // or we're really flying at idle throttle
+       if (pitch < 5.4) {  // this needs tuning
+           // prop tips not breaking sound barrier
+           pitch += log(cur_fdm_state->v_rel_wind + 0.8)/2;
+       } else {
+           // prop tips breaking sound barrier
+           pitch += log(cur_fdm_state->v_rel_wind + 0.8)/10;
        }
-       //fprintf(stderr, "pitch4: %f\n", pitch);
+       //fprintf(stderr, "pitch2: %f ", pitch);
+       //fprintf(stderr, "AoA: %f ", FG_Gamma_vert_rad);
+
+       // Angle of Attack next... -x^3(e^x) is my best guess Just
+       // need to calculate some reasonable scaling factor and
+       // then clamp it on the positive aoa (neg adj) side
+       double aoa = cur_fdm_state->get_Gamma_vert_rad() * 2.2;
+       double tmp = 3.0;
+       double aoa_adj = pow(-aoa, tmp) * pow(M_E, aoa);
+       if (aoa_adj < -0.8) aoa_adj = -0.8;
+       pitch += aoa_adj;
+       //fprintf(stderr, "pitch3: %f ", pitch);
+
+       // don't run at absurdly slow rates -- not realistic
+       // and sounds bad to boot.  :-)
+       if (pitch < 0.8) pitch = 0.8;
+       // }
+       // fprintf(stderr, "pitch4: %f\n", pitch);
 
        double volume = controls.get_throttle(0) * 1.15 + 0.3 +
            log(cur_fdm_state->v_rel_wind + 1.0)/14.0;
index 69b29b461a728ce8339a6ace8d94f67892a4e4b0..4d8f7c012934229b44fe663f60a21530e82f0c87 100644 (file)
@@ -187,7 +187,7 @@ void FGTime::init( double lon, double lat ) {
            //printf("warp = %d\n", warp); 
            break;
        case fgOPTIONS::FG_TIME_GMT_ABSOLUTE:
-           warp = timeOffset - (currGMT - systemLocalTime) - cur_time;
+           warp = timeOffset - currGMT;
            break;
        case fgOPTIONS::FG_TIME_LAT_ABSOLUTE:
            warp = timeOffset - (aircraftLocalTime - systemLocalTime) -