]> git.mxchange.org Git - flightgear.git/commitdiff
Optimizations (tm) by Norman Vine.
authorcurt <curt>
Sat, 3 Apr 1999 04:20:01 +0000 (04:20 +0000)
committercurt <curt>
Sat, 3 Apr 1999 04:20:01 +0000 (04:20 +0000)
FDM/JSBsim.cxx
FDM/LaRCsim.cxx
FDM/flight.cxx
FDM/flight.hxx

index 4872c6b9dbcbc2463625c2dbedaa6186f843ed8f..b8aa1dff0ea7f16726be002b349e2f7c02a9e9ba 100644 (file)
@@ -248,12 +248,19 @@ int fgJSBsim_2_FGInterface (FGInterface& f) {
     //                        D_pilot_above_rwy );
     // f.set_Pilot_Rwy_Rwy( X_pilot_rwy, Y_pilot_rwy, H_pilot_rwy );
 
+    f.set_sin_lat_geocentric( lat_geoc );
+    f.set_cos_lat_geocentric( lat_geoc );
+    f.set_sin_cos_longitude( lon );
+    f.set_sin_cos_latitude( lat_geod );
 
     return 0;
 }
 
 
 // $Log$
+// Revision 1.4  1999/04/03 04:20:01  curt
+// Optimizations (tm) by Norman Vine.
+//
 // Revision 1.3  1999/02/26 22:09:10  curt
 // Added initial support for native SGI compilers.
 // Integrated Jon's next version of JSBsim.
index 22f75966ae872c485b22d3c5669657714a35481f..b647f034006152081245ef400d4dff810bccb991 100644 (file)
@@ -47,7 +47,7 @@ int fgLaRCsimUpdate(FGInterface& f, int multiloop) {
     double save_alt = 0.0;
 
     // lets try to avoid really screwing up the LaRCsim model
-    if ( f.get_Altitude() < -9000 ) {
+    if ( f.get_Altitude() < -9000.0 ) {
        save_alt = f.get_Altitude();
        f.set_Altitude( 0.0 );
     }
@@ -389,12 +389,25 @@ int fgLaRCsim_2_FGInterface (FGInterface& f) {
     //                        D_pilot_above_rwy );
     // f.set_Pilot_Rwy_Rwy( X_pilot_rwy, Y_pilot_rwy, H_pilot_rwy );
 
+    f.set_sin_lat_geocentric(Lat_geocentric);
+    f.set_cos_lat_geocentric(Lat_geocentric);
+    f.set_sin_cos_longitude(Longitude);
+    f.set_sin_cos_latitude(Latitude);
+
+    // printf("sin_lat_geo %f  cos_lat_geo %f\n", sin_Lat_geoc, cos_Lat_geoc);
+    // printf("sin_lat     %f  cos_lat     %f\n", 
+    //        f.get_sin_latitude(), f.get_cos_latitude());
+    // printf("sin_lon     %f  cos_lon     %f\n",
+    //        f.get_sin_longitude(), f.get_cos_longitude());
 
     return 0;
 }
 
 
 // $Log$
+// Revision 1.12  1999/04/03 04:20:02  curt
+// Optimizations (tm) by Norman Vine.
+//
 // Revision 1.11  1999/02/05 21:28:58  curt
 // Modifications to incorporate Jon S. Berndts flight model code.
 //
index 734d250fcae1e2c10449e1fac4e56ba4d5561c59..f173426876366280ec99e5fe1b18e8206ab554c3 100644 (file)
@@ -110,7 +110,7 @@ int fgFDMInit(int model, FGInterface& f, double dt) {
        fgExternalInit(base_fdm_state);
     } else {
        FG_LOG( FG_FLIGHT, FG_WARN,
-                 "Unimplemented flight model == " << model );
+               "Unimplemented flight model == " << model );
     }
 
     // set valid time for this record
@@ -195,6 +195,9 @@ void fgFDMSetGroundElevation(int model, double ground_meters) {
 
 
 // $Log$
+// Revision 1.17  1999/04/03 04:20:03  curt
+// Optimizations (tm) by Norman Vine.
+//
 // Revision 1.16  1999/02/26 22:09:12  curt
 // Added initial support for native SGI compilers.
 // Integrated Jon's next version of JSBsim.
index 9edf224e3ec211e6627583b58c3c01eb7375bd55..d73f37389ff2b42aa2a920e5d123af2be4affcb5 100644 (file)
@@ -794,6 +794,47 @@ public:
     // Extrapolate FDM based on time_offset (in usec)
     void extrapolate( int time_offset );
 
+    // sin/cos lat_geocentric
+    double sin_lat_geocentric;
+    double cos_lat_geocentric;
+    inline void set_sin_lat_geocentric(double parm) {
+       sin_lat_geocentric = sin(parm);
+    }
+    inline void set_cos_lat_geocentric(double parm) {
+       cos_lat_geocentric = cos(parm);
+    }
+    inline double get_sin_lat_geocentric(void) const {
+       return sin_lat_geocentric;
+    }
+    inline double get_cos_lat_geocentric(void) const {
+       return cos_lat_geocentric;
+    }
+
+    double sin_longitude;
+    double cos_longitude;
+    inline void set_sin_cos_longitude(double parm) {
+       sin_longitude = sin(parm);
+       cos_longitude = cos(parm);
+    }
+    inline double get_sin_longitude(void) const {
+       return sin_longitude;
+    }
+    inline double get_cos_longitude(void) const {
+       return cos_longitude;
+    }
+       
+    double sin_latitude;
+    double cos_latitude;
+    inline void set_sin_cos_latitude(double parm) {
+       sin_latitude = sin(parm);
+       cos_latitude = cos(parm);
+    }
+    inline double get_sin_latitude(void) const {
+       return sin_latitude;
+    }
+    inline double get_cos_latitude(void) const {
+       return cos_latitude;
+    }
 };
 
 
@@ -819,6 +860,9 @@ void fgFDMSetGroundElevation(int model, double alt_meters);
 
 
 // $Log$
+// Revision 1.14  1999/04/03 04:20:04  curt
+// Optimizations (tm) by Norman Vine.
+//
 // Revision 1.13  1999/02/05 21:29:02  curt
 // Modifications to incorporate Jon S. Berndts flight model code.
 //