--- /dev/null
+#!/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
/* later, but currently was my main concern to get it going... */
/************************************************************************/
+#ifndef FG_OLD_WEATHER
sgVec3 v;
FGPhysicalProperty wdbpos = WeatherDatabase->get(position);
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 ;-)
{
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);
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,
fgUpdateMoonPos();
cur_light_params.Update();
fgUpdateLocalTime();
+#ifndef FG_OLD_WEATHER
fgUpdateWeatherDatabase();
+#endif
current_radiostack->search();
// Restore all of the old states.
//
// $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
/**
}
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 );
// 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 );
#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>