]> git.mxchange.org Git - flightgear.git/commitdiff
MacOS build updates.
authorcurt <curt>
Thu, 27 Apr 2000 21:57:08 +0000 (21:57 +0000)
committercurt <curt>
Thu, 27 Apr 2000 21:57:08 +0000 (21:57 +0000)
17 files changed:
NEWS
src/Airports/simple.cxx
src/FDM/JSBSim/FGAircraft.cpp
src/FDM/LaRCsim/ls_gravity.h
src/FDM/LaRCsim/ls_interface.h
src/FDM/LaRCsim/navion_init.h
src/FDM/UIUCModel/uiuc_aircraft.h
src/FDM/UIUCModel/uiuc_engine.h
src/FDM/UIUCModel/uiuc_parsefile.h
src/FDM/UIUCModel/uiuc_warnings_errors.h
src/Main/bfi.hxx
src/Main/main.cxx
src/Main/save.hxx
src/Time/moonpos.hxx
src/Time/sunpos.cxx
src/Weather/weather.hxx
src/WeatherCM/sphrintp.h

diff --git a/NEWS b/NEWS
index 883060cc25a0d4d43d73a50ffdaa34879fba3cbc..c14786d7a8fe7d2a2761e982c6ad3da302f331d8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,40 @@
+New in 0.7.3
+* April 27, 2000
+* Cygwin32 build fixes
+* MSVC++ build fixes
+* Mac build fixes
+* Updates to JSBsim flight dynamics code that includes a generic
+  reconfigurable flight control system.
+* Updates to LaRCsim flight dynamcis code contributed by UIUC that
+  allows loading aircraft specifications at runtime from config files.
+  UIUC is using flightgear as a platform to do icing research.  The UIUC
+  aircraft use the c172 gear model for now which causes some weirdness
+  on the ground for some of the larger aircraft.
+* Flight model no longer has to be chosen at compile time.
+* Separated ephemeris code from the actual sky rendering code and gave
+  this whole section a big overhaul.  The moon should now consistantly
+  have the correct phase.
+* Rebuilt the sky dome using ssg.
+* Removed dependencies on mat3.h and friends (old srgp support lib)
+* Added navaid database management and query code.
+* Airport lookups now done through gdbm (a light weight embedded database.)
+* Converted ssgVTable's to ssgVtxTables which do proper memory
+  management and should facilitate use of compiled vertex arrays once
+  ssg add support for these.
+* Simple radio stack added to the instrument panel.  The frequencies are
+  currently hardwired to default values until the UI for changing them
+  is finished.  But, this is enough to fly ILS instrument approaches.
+* Added a chronometer to the instrument panel.
+* Compass, vsi, and altitute instruments and vacuum system are more
+  accurately modeled.
+* Added a magnetic variation model to "simgear" for use by flightgear.
+* Added custom joystick client support so sim can be flown from a
+  remote joystick connected to another machine.  This is in support of
+  some custom hardware located in the human factors research lab of the
+  university of minnesota.
+
 New in 0.7.2
+* February 17, 2000
 * Lots of code reorganizations
 * Build requires plib-1.1.x
 * Build requires SimGear-0.0.x
index 9ac98469b2389117ad5cabccb6233c7dff2eff47..cad2e4671d7197eea1d0fb9f6ae39f2ce394ede1 100644 (file)
@@ -179,9 +179,16 @@ int FGAirportsUtil::load( const string& file ) {
 bool FGAirportsUtil::dump_gdbm( const string& file ) {
 
     GDBM_FILE dbf;
+
+#if !defined( MACOS )
     dbf = gdbm_open( (char *)file.c_str(), 0, GDBM_NEWDB | GDBM_FAST, 
                     S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH,
                     NULL );
+#else
+    dbf = gdbm_open( (char *)file.c_str(), 0, GDBM_NEWDB | GDBM_FAST,
+                    NULL, NULL );
+#endif
+
     if ( dbf == NULL ) {
        cout << "Error opening " << file << endl;
        exit(-1);
index 65ea475ec1ededc50dbade2ffdbc2907c0291c24..0c5012cdaf4107ea1cffb90229f18637816fab45 100644 (file)
@@ -149,6 +149,8 @@ FGAircraft::FGAircraft(FGFDMExec* fdmex) : FGModel(fdmex),
   AxisIdx["ROLL"]  = 3;
   AxisIdx["PITCH"] = 4;
   AxisIdx["YAW"]   = 5;
+
+  numTanks = numEngines = 0;
 }
 
 
index dd118dcdae720e799234d4f3bd8919f6fcd6caad..3eb07f361151447d1158da5483138db5c8411a80 100644 (file)
@@ -8,4 +8,4 @@
 void ls_gravity( SCALAR radius, SCALAR lat, SCALAR *gravity );
 
 
-#endif _LS_GRAVITY_H
+#endif /* _LS_GRAVITY_H */
index 7b1911544c785aa7f0b14ac9e5775f251d3ec860..533d1328140213f1d0fa91758651a784ff8d19da 100644 (file)
@@ -48,9 +48,9 @@ int fgFlight_2_LaRCsim (fgFLIGHT *f);
 
 /* Convert from the LaRCsim generic_ struct to the fgFLIGHT struct */
 int fgLaRCsim_2_Flight (fgFLIGHT *f);
+#endif
 
 void ls_loop( SCALAR dt, int initialize );
-#endif
 
 /* Set the altitude (force) */
 int ls_ForceAltitude(double alt_feet);
@@ -65,6 +65,9 @@ int ls_ForceAltitude(double alt_feet);
 
 
 // $Log$
+// Revision 1.3  2000/04/27 19:57:08  curt
+// MacOS build updates.
+//
 // Revision 1.2  2000/04/10 18:09:41  curt
 // David Megginson made a few (mostly minor) mods to the LaRCsim files, and
 // it's now possible to choose the LaRCsim model at runtime, as in
index 0bb54a8230b9aa59ea44153b7678ce14ff8677cd..408080532798ce0a19f87cf4c6426370cc0cdba6 100644 (file)
@@ -8,4 +8,4 @@
 void navion_init( void );
 
 
-#endif _NAVION_INIT_H
+#endif /* _NAVION_INIT_H */
index fedc30e11f6b15b578ec88f72510567f1264082a..a3d11f407047cc36db7e611db6d24ae6281870d4 100644 (file)
 #ifndef _AIRCRAFT_H_
 #define _AIRCRAFT_H_
 
+#include <simgear/compiler.h>
+
 #include <map>
 #include <iostream>
 #include "uiuc_parsefile.h"
 
+FG_USING_STD(map);
+FG_USING_STD(iostream);
+#ifdef MACOS
+FG_USING_STD(ofstream);
+#endif
+
 typedef stack :: iterator LIST;
 
 /* Add more keywords here if required*/
index 3a9b4e304fb8ede8e3c77624ec1143dde0d954c9..d0deb342cd67dbe0e6d3935e4b1efad211951387 100644 (file)
@@ -2,8 +2,10 @@
 #define _ENGINE_H_
 
 #include "uiuc_aircraft.h"
+#include "uiuc_warnings_errors.h" /* for cerr, exit() */
 #include "../FDM/LaRCsim/ls_generic.h"
 #include "../FDM/LaRCsim/ls_cockpit.h"
 
 void uiuc_engine();
+
 #endif // _ENGINE_H_
index 09752146cf78fa34668d0ba1f898406e388d9b67..1514f4e6d38be91ae684773d0b5cd4ac596319e8 100644 (file)
@@ -1,10 +1,20 @@
 #ifndef _PARSE_FILE_H_
 #define _PARSE_FILE_H_
 
+#include <simgear/compiler.h>
+
 #include <string>
 #include <list>
 #include <fstream>
 
+FG_USING_STD(string);
+FG_USING_STD(list);
+#ifdef MACOS
+FG_USING_STD(ifstream);
+FG_USING_STD(iostream);
+FG_USING_STD(endl);
+#endif
+
 #define DELIMITERS " \t"
 #define COMMENT "#"
 
index 80cb9eaad08db3532cbad34316859ef118b9669f..a2f18422c0bc06360eb2a7bfe2fb1904ce626165 100644 (file)
@@ -1,8 +1,14 @@
 #ifndef _WARNINGS_ERRORS_H_
 #define _WARNINGS_ERRORS_H_
 
+#include <simgear/compiler.h>  /* for FG_USING_STD */
+
 #include <string>
 #include <iostream>
+#include <stdlib.h>            /* for exit */
+
+FG_USING_STD(string);
+FG_USING_STD(iostream);
 
 void uiuc_warnings_errors(int errorCode, string line);
 
index ef514f0c2d5a22d9ec8ee12b82d21ef0d27c86dd..58cac3145041a0b3663cd971b4ccc83f1470cac4 100644 (file)
@@ -23,6 +23,8 @@
 #include <time.h>
 #include <string>
 
+#include <simgear/compiler.h>
+
 FG_USING_NAMESPACE(std);
 
 
index 10ca154ec3de65c656b6b631e1f9988e31796ee2..3cb5be5d19e26b6f6c67429a5413099504184a4e 100644 (file)
@@ -1291,6 +1291,8 @@ int fgGlutInitEvents( void ) {
 int main( int argc, char **argv ) {
 
 #if defined( MACOS )
+    freopen ("stdout.txt", "w", stdout );
+    freopen ("stderr.txt", "w", stderr );
     argc = ccommand( &argv );
 #endif
 
index 1e55a09a7a5667f823cdb1d4cc503f8a290ff73a..72f7e9e8e2fe5e220215e798e4e230727271b921 100644 (file)
@@ -39,6 +39,4 @@ FG_USING_NAMESPACE(std);
 extern bool fgSaveFlight (ostream &output);
 extern bool fgLoadFlight (istream &input);
 
-#endif __SAVE_HXX
-
-// end of save.hxx
+#endif // __SAVE_HXX
index cfc4763bef790fe12c0f2684f21d79baaef3e793..5c04315f64acf053c3ace36da199b0edac962c88 100644 (file)
@@ -48,6 +48,9 @@
 
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <ctime>
+#  ifdef MACOS
+     FG_USING_STD(time_t);
+#  endif
 #else
 #  include <time.h>
 #endif
index 5d76843b32d967a637cf6ad89cfdec5659d169b7..e60bfeb51098a9401489e94ff6549a3a7bb3380b 100644 (file)
@@ -44,6 +44,9 @@
 #  include <cmath>
 #  include <cstdio>
 #  include <ctime>
+#  ifdef MACOS
+     FG_USING_STD(time_t);
+#  endif
 #else
 #  include <math.h>
 #  include <stdio.h>
index 110de62a81051902e7c267af09891766371cf42a..73ec55002b05eb292439f7f672eb927fe4006e15 100644 (file)
 #define _WEATHER_HXX
 
 
+#include <simgear/compiler.h>
+
+#include <simgear/xgl/xgl.h>
+
+#ifdef FG_HAVE_STD_INCLUDES
+#  include <cmath>
+#else
+#  include <math.h>
+#endif
+
 // holds the current weather values
 class FGWeather {
 
index d0987e2308ccce11adf0b33b102decd258bc3199..78ab4bd4736d2059b34545656aa9ffa63282d3db 100644 (file)
@@ -51,12 +51,19 @@ public:
     int Evaluate (const double x, const double y, const double z, T& f) const;
     int Evaluate (const double thetaAngle, const double phiAngle, T& f) const;
 
+#ifndef MACOS
+    // CodeWarrior doesn't know the differece between sgVec2 and
+    // sgVec3, so I commented this out for Mac builds. This change is
+    // related to a similar change in FGLocalWeatherDatabase module.
+     
     T Evaluate(const sgVec2& p) const
     {
        T retval;
        Evaluate(p[1], p[0], retval);
        return retval;
     }
+#endif
+
  
     T Evaluate(const sgVec3& p) const
     {