From 2aca8ca2cf9ecef0f28cdc4f3f7882de0d042e33 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 2 Apr 2001 02:59:31 +0000 Subject: [PATCH] Irix MipsPro patches and fixes. --- irix-hack.sh | 11 +++++++++++ src/FDM/Balloon/BalloonSim.cpp | 10 ++++++++++ src/FDM/flight.cxx | 6 +++--- src/Main/bfi.cxx | 2 ++ src/Main/fg_props.cxx | 12 +++++++++--- src/Main/main.cxx | 2 +- src/Scenery/newcache.cxx | 2 +- src/Weather/weather.cxx | 2 +- 8 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 irix-hack.sh diff --git a/irix-hack.sh b/irix-hack.sh new file mode 100644 index 000000000..de8e212e9 --- /dev/null +++ b/irix-hack.sh @@ -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 diff --git a/src/FDM/Balloon/BalloonSim.cpp b/src/FDM/Balloon/BalloonSim.cpp index 10c1642f2..350298b50 100644 --- a/src/FDM/Balloon/BalloonSim.cpp +++ b/src/FDM/Balloon/BalloonSim.cpp @@ -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); diff --git a/src/FDM/flight.cxx b/src/FDM/flight.cxx index f947c6414..3d98c9c15 100644 --- a/src/FDM/flight.cxx +++ b/src/FDM/flight.cxx @@ -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, diff --git a/src/Main/bfi.cxx b/src/Main/bfi.cxx index c4cc0a113..3707f4e8e 100644 --- a/src/Main/bfi.cxx +++ b/src/Main/bfi.cxx @@ -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. diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index 713c5178a..46eef4299 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -20,13 +20,19 @@ // // $Id$ -#include +#ifdef HAVE_CONFIG_H +# include +#endif + +#include STL_IOSTREAM #include
#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 /** diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 6f0823bc7..30caafe1f 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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 ); diff --git a/src/Scenery/newcache.cxx b/src/Scenery/newcache.cxx index c464bddee..b6d26bb7f 100644 --- a/src/Scenery/newcache.cxx +++ b/src/Scenery/newcache.cxx @@ -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 ); diff --git a/src/Weather/weather.cxx b/src/Weather/weather.cxx index 7d2c45ae7..ac703dd1a 100644 --- a/src/Weather/weather.cxx +++ b/src/Weather/weather.cxx @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include -- 2.39.5