]> git.mxchange.org Git - flightgear.git/commitdiff
Irix MipsPro patches and fixes.
authorcurt <curt>
Mon, 2 Apr 2001 02:59:31 +0000 (02:59 +0000)
committercurt <curt>
Mon, 2 Apr 2001 02:59:31 +0000 (02:59 +0000)
irix-hack.sh [new file with mode: 0644]
src/FDM/Balloon/BalloonSim.cpp
src/FDM/flight.cxx
src/Main/bfi.cxx
src/Main/fg_props.cxx
src/Main/main.cxx
src/Scenery/newcache.cxx
src/Weather/weather.cxx

diff --git a/irix-hack.sh b/irix-hack.sh
new file mode 100644 (file)
index 0000000..de8e212
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+for n in `find . -name Makefile`; do \
+   echo "Fixing file $n"; \
+   \
+   mv -f $n $n.ar-new; \
+   sed 's/^AR = ar/AR = CC -ar/g' $n.ar-new > $n;
+   \
+   mv -f $n $n.ar-new; \
+   sed 's/$(AR) cru /$(AR) -o /g' $n.ar-new > $n; \
+done
index 10c1642f2a7c155621237accc4cfaf67cd7ca28f..350298b50e9bc1ab9ab7b723a6a595f20708ff50 100644 (file)
@@ -169,6 +169,7 @@ void balloon::update()
     /* later, but currently was my main concern to get it going...          */
     /************************************************************************/
 
+#ifndef FG_OLD_WEATHER
     sgVec3 v;
 
     FGPhysicalProperty wdbpos = WeatherDatabase->get(position);
@@ -191,6 +192,13 @@ void balloon::update()
     float k = 1.0 / (1.0/4.8 + 1.0/(4.8+3.4*speed) + l_of_the_envelope/lambda);
     float Q = k * balloon_envelope_area * (dt/3600.0) * (wdbpos.Temperature - T);   //(dt/3600.0) = time since last call in hours
 
+#else
+   // I realy don't think there is a solution for this without WeatherCM
+   // but this is a hack, and it's working -- EMH
+   double mAir = 0;
+   float Q = 0;
+#endif
+
     // gain of energy by heating:
     if (fuel_left > 0.0)       //but only with some fuel left ;-)
     {
@@ -218,8 +226,10 @@ void balloon::update()
     sgVec3 fTotal, fFriction, fLift;
 
     sgScaleVec3(fTotal, gravity_vector, mTotal);
+#ifndef FG_OLD_WEATHER
     sgScaleVec3(fFriction, v, cw_envelope * wind_facing_area_of_balloon * WeatherDatabase->getAirDensity(position) * speed / 2.0);  //wind resistance
     sgScaleVec3(fLift, gravity_vector, -balloon_envelope_volume * wdbpos.AirPressure / (287.14 * wdbpos.Temperature));
+#endif
    
     sgAddVec3(fTotal, fLift);
     sgAddVec3(fTotal, fFriction);
index f947c64144941f0d34a3b155307eac6f69441697..3d98c9c155ec198388990b65b5e67724ac854ba1 100644 (file)
@@ -192,15 +192,15 @@ FGInterface::bind ()
   fgTie("/orientation/roll", this,
        &FGInterface::get_Phi_deg,
        &FGInterface::set_Phi_deg,
-       false);
+       true);
   fgTie("/orientation/pitch", this,
        &FGInterface::get_Theta_deg,
        &FGInterface::set_Theta_deg,
-       false);
+       true);
   fgTie("/orientation/heading", this,
        &FGInterface::get_Psi_deg,
        &FGInterface::set_Psi_deg,
-       false);
+       true);
 
                                // Calibrated airspeed
   fgTie("/velocities/airspeed", this,
index c4cc0a1137ce58875d45fc34969a38a923784999..3707f4e8ed96f64905e783a3242804cc0de199bc 100644 (file)
@@ -103,7 +103,9 @@ reinit ()
   fgUpdateMoonPos();
   cur_light_params.Update();
   fgUpdateLocalTime();
+#ifndef FG_OLD_WEATHER
   fgUpdateWeatherDatabase();
+#endif
   current_radiostack->search();
 
                                // Restore all of the old states.
index 713c5178a9b6b044daafa5273e9f3ea5d107599e..46eef4299a7929489f967749cf4657fc464720b2 100644 (file)
 //
 // $Id$
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#  include <simgear/compiler.h>
+#endif
+
+#include STL_IOSTREAM
 
 #include <Main/fgfs.hxx>
 #include "fg_props.hxx"
 
-using std::istream;
-using std::ostream;
+#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
+SG_USING_STD(istream);
+SG_USING_STD(ostream);
+#endif
 
 
 /**
index 6f0823bc70cfabb7c92dc57a2a074dbdc7eb0e47..30caafe1f7d2fe5ec15f46672f194f2b50ed5fa1 100644 (file)
@@ -555,7 +555,7 @@ void fgRenderFrame( void ) {
        }
 
        glEnable( GL_DEPTH_TEST );
-       if ( fgGetString("/sim/rendering/fog") != "disabled" ) {
+       if ( fgGetString("/sim/rendering/fog") != (string)"disabled" ) {
            glEnable( GL_FOG );
            glFogi( GL_FOG_MODE, GL_EXP2 );
            glFogfv( GL_FOG_COLOR, l->adj_fog_color );
index c464bddee6e9ea0a0b7bba8dda3aab86f552f066..b6d26bb7f2bc0f47f3a797f20becfeb021f2c02a 100644 (file)
@@ -65,7 +65,7 @@ FGNewCache::~FGNewCache( void ) {
 
 // Free a tile cache entry
 void FGNewCache::entry_free( long cache_index ) {
-    SG_LOG( SG_TERRAIN, SG_INFO, "FREEING CACHE ENTRY = " << cache_index );
+    SG_LOG( SG_TERRAIN, SG_DEBUG, "FREEING CACHE ENTRY = " << cache_index );
     FGTileEntry *e = tile_cache[cache_index];
     e->free_tile();
     delete( e );
index 7d2c45ae72e0703f79d1d61431c70b8fe620f906..ac703dd1ac910a44473a4b5e997d3c06b7f973bb 100644 (file)
@@ -35,7 +35,7 @@
 #include <math.h>
 
 #include <simgear/debug/logstream.hxx>
-#include <simgear/math/fg_random.h>
+#include <simgear/math/sg_random.h>
 
 #include <Aircraft/aircraft.hxx>
 #include <Weather/weather.hxx>