src/Cockpit/Makefile \
src/Cockpit/built_in/Makefile \
src/Environment/Makefile \
- src/FDM/Balloon/Makefile \
src/FDM/ExternalNet/Makefile \
src/FDM/ExternalPipe/Makefile \
src/FDM/JSBSim/Makefile \
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <osg/ref_ptr>
#include <osg/Node>
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(string);
#include <istream>
#include <ostream>
-#include STL_STRING
+#include <string>
#include "ATCVoice.hxx"
#include <string>
SG_USING_STD(string);
-#include STL_IOSTREAM
+#include <iostream>
SG_USING_STD(cout);
#include <simgear/misc/sg_path.hxx>
#include <Main/globals.hxx>
#include <stdlib.h>
-#include STL_FSTREAM
+#include <fstream>
#include "ground.hxx"
#include "ATCutils.hxx"
#include "ATC.hxx"
#include "ATCProjection.hxx"
-#include STL_STRING
+#include <string>
class FGAIEntity;
class FGATCMgr;
#include <plib/sg.h>
#include <iosfwd>
-#include STL_STRING
+#include <string>
#include "ATC.hxx"
#include "ATCProjection.hxx"
#include <simgear/misc/sgstream.hxx>
#include <simgear/misc/strutils.hxx>
-#include STL_STRING
+#include <string>
#include "simple.hxx"
#include "runways.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
#include <stdlib.h>
#include <iostream>
-#include STL_STRING
+#include <string>
#include <plib/sg.h>
#include <Main/fg_props.hxx>
#include <Airports/runways.hxx>
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(string);
#include <AIModel/AIFlightPlan.hxx>
-//#include STL_STRING
+//#include <string>
#include "groundnetwork.hxx"
#include <simgear/compiler.h>
#include <simgear/route/waypoint.hxx>
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(string);
//#include <Main/fg_props.hxx>
//#include <Airports/runways.hxx>
-#include STL_STRING
+#include <string>
#include "parking.hxx"
#include "groundnetwork.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector>
#include "gnnode.hxx"
#include <simgear/debug/logstream.hxx>
#include <Main/fg_props.hxx>
-#include STL_STRING
+#include <string>
#include <map>
#include "runways.hxx"
-SG_USING_NAMESPACE(std);
SG_USING_STD(istream);
SG_USING_STD(multimap);
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <map>
SG_USING_STD(string);
#include <Main/fg_props.hxx>
#include <Airports/runways.hxx>
-#include STL_STRING
+#include <string>
#include "simple.hxx"
#include "xmlloader.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <map>
#include <set>
#include <vector>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(string);
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector>
#include <deque>
#include <simgear/compiler.h>
#include <simgear/structure/exception.hxx>
-#include STL_STRING
-#include STL_FSTREAM
+#include <string>
+#include <fstream>
#ifdef HAVE_CONFIG_H
# include <config.h>
#include <algorithm> // for_each()
#include <vector> // STL vector
#include <deque> // STL double ended queue
-#include STL_FSTREAM
+#include <fstream>
#include <osg/State>
SG_USING_STD(deque);
SG_USING_STD(vector);
-SG_USING_NAMESPACE(std);
#define float_to_int(v) SGMiscf::roundToInt(v)
#include <simgear/props/props.hxx>
#include <istream>
-#include STL_FSTREAM
-#include STL_STRING
+#include <fstream>
+#include <string>
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
#include <simgear/compiler.h>
#include <iosfwd>
-#include STL_STRING
+#include <string>
class FGPanel;
#include <simgear/compiler.h>
#include <simgear/math/interpolater.hxx>
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cmath>
-#else
-# include <math.h>
-#endif
+#include <cmath>
using namespace std;
#include <simgear/compiler.h>
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cmath>
-#else
-# include <math.h>
-#endif
-
+#include <cmath>
/**
* Model the natural environment.
# include <simgear/threads/SGQueue.hxx>
#endif
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cmath>
-#else
-# include <math.h>
-#endif
-
+#include <cmath>
#include <queue>
#include <vector>
#include <simgear/sound/soundmgr_openal.hxx>
#include <Main/fg_props.hxx>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
+++ /dev/null
-/*****************************************************************************
-
- Header: BalloonSimInterface.h
- Author: Christian Mayer
- Date started: 07.10.99
-
- -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) --------
-
- This program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
- Foundation; either version 2 of the License, or (at your option) any later
- version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Further information about the GNU General Public License can also be found on
- the world wide web at http://www.gnu.org.
-
-FUNCTIONAL DESCRIPTION
-------------------------------------------------------------------------------
-interface to the the hot air balloon simulator
-
-HISTORY
-------------------------------------------------------------------------------
-07.10.1999 Christian Mayer Created
-*****************************************************************************/
-
-/****************************************************************************/
-/* SENTRY */
-/****************************************************************************/
-#ifndef BalloonSimInterface_H
-#define BalloonSimInterface_H
-
-/****************************************************************************/
-/* INCLUDES */
-/****************************************************************************/
-#include <FDM/Balloon/BalloonSim.h>
-
-#include <Aircraft/aircraft.hxx>
-
-#include "flight.hxx"
-
-/****************************************************************************/
-/* DEFINES */
-/****************************************************************************/
-
-/****************************************************************************/
-/* DECLARATIONS */
-/****************************************************************************/
-
-
-class FGBalloonSim: public FGInterface {
-
- balloon current_balloon;
-
-public:
-
- FGBalloonSim( double dt );
- ~FGBalloonSim();
-
- // copy FDM state to BalloonSim structures
- bool copy_to_BalloonSim();
-
- // copy FDM state from BalloonSim structures
- bool copy_from_BalloonSim();
-
- // reset flight params to a specific position
- void init();
-
- // update position based on inputs, positions, velocities, etc.
- void update( double dt );
-};
-
-
-/****************************************************************************/
-#endif /*BalloonSimInterface_H*/
-
-
-
-
+++ /dev/null
-.deps
-Makefile
-Makefile.in
+++ /dev/null
-/*****************************************************************************
-
- Module: BalloonSim.cpp
- Author: Christian Mayer
- Date started: 01.09.99
- Called by:
-
- -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) --------
-
- This program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
- Foundation; either version 2 of the License, or (at your option) any later
- version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Further information about the GNU General Public License can also be found on
- the world wide web at http://www.gnu.org.
-
-FUNCTIONAL DESCRIPTION
-------------------------------------------------------------------------------
-A hot air balloon simulator
-
-HISTORY
-------------------------------------------------------------------------------
-01.09.1999 Christian Mayer Created
-03.10.1999 Christian Mayer cleaned the code by moveing WeatherDatabase
- calls inside the update()
-*****************************************************************************/
-
-/****************************************************************************/
-/* INCLUDES */
-/****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-// #include <conio.h>
-#include <math.h>
-
-#include <simgear/constants.h>
-
-#include <Aircraft/aircraft.hxx>
-
-#include "BalloonSim.h"
-
-#include <plib/sg.h>
-
-/****************************************************************************/
-/********************************** CODE ************************************/
-/****************************************************************************/
-
-/****************************************************************************/
-/* */
-/* Constructor: */
-/* Set the balloon model to some values that seem reasonable as I haven't */
-/* got much original values */
-/* */
-/****************************************************************************/
-balloon::balloon()
-{
- dt = 0.1;
- ground_level = 3400.0;
-
- sgSetVec3(gravity_vector, 0.0, 0.0, -9.81);
- sgSetVec3(velocity, 0.0, 0.0, 0.0);
- sgSetVec3(position, 0.0, 0.0, 0.0);
- sgSetVec3(hpr, 0.0, 0.0, 0.0);
-
- /************************************************************************/
- /* My balloon has a radius of 8.8 metres as that gives a envelope */
- /* volume of about 2854 m^3 which is about 77000 ft^3, a very common */
- /* size for hot air balloons */
- /************************************************************************/
-
- balloon_envelope_area = 4.0 * (8.8 * 8.8) * SGD_PI;
- balloon_envelope_volume = (4.0/3.0) * (8.8 * 8.8 * 8.8) * SGD_PI;
-
- wind_facing_area_of_balloon = SGD_PI * (8.8 * 8.8);
- wind_facing_area_of_basket = 2.0; //guessed: 2 m^2
-
- cw_envelope=0.45; //a sphere in this case
- cw_basket=0.8;
-
- weight_of_total_fuel = 40.0; //big guess
- weight_of_envelope = 200.0; //big guess
- weight_of_basket = 40.0; //big guess
- weight_of_cargo = 750.0; //big guess
-
- fuel_left=1.0;
- max_flow_of_fuel_per_second=10.0*1.0/3600.0; //assuming 10% of one hour of total burn time
- current_burner_strength = 0.0; //the throttle
-
- lambda = 0.15; //for plasic
- l_of_the_envelope = 1.0/1000.0; //the thickness of the envelope (in m): 1mm
-
- T = 273.16 + 130.6; //Temperature in the envelope => still at ground level
-}
-
-void balloon::update()
-{
- /************************************************************************/
- /* I'm simplifying the balloon by reducing the simulation to two */
- /* points: */
- /* the center of the basket (CB) and the center of the envelope (CE) */
- /* */
- /* ce */
- /* I */
- /* I */
- /* cg (=center of gravity) */
- /* I */
- /* cb */
- /* */
- /* On each center are forces acting: gravity and wind resitance. CE */
- /* additionally got the lift (=> I need to calculate the weight of the */
- /* air inside, too) */
- /* */
- /* The weight of the air in the envelope is dependant of the tempera- */
- /* ture. This temperature is decreasing over the time that is dependant */
- /* of the insulation of the envelope material (lambda), the gas used */
- /* (air) and the wind speed. For a plane surface it's for air: */
- /* */
- /* alpha = 4.8 + 3.4*v with v < 5.0 m/s */
- /* */
- /* The value k that takes all of that into account is defined as: */
- /* */
- /* 1 / k = 1 / alpha1 + 1 / alpha2 + l / lambda */
- /* */
- /* with 'l' beeing the 'length' i.e. thickness of the insulator, alpha1 */
- /* the air inside and alpha2 the air outside of the envelope. So our k */
- /* is: */
- /* */
- /* k = 1 / [1/4.8 + 1/(4.8+3.4v) + l/lambda] */
- /* */
- /* The energy lost by this process is defined as: */
- /* */
- /* dQ = k * A * t * dT */
- /* */
- /* with Q being the energy, k that value defined above, A the total */
- /* area of the envelope, t the time (in hours) and dT the temperature */
- /* difference between the inside and the outside. */
- /* To get the temperature of the air in the inside I need the formula: */
- /* */
- /* dQ = cAir * m * dT */
- /* */
- /* with cAir being the specific heat capacity(?) of air (= 1.00 kcal / */
- /* kg * degree), m the mass of the air and dT the temperature change. */
- /* As the envelope is open I'm assuming that the same air pressure is */
- /* inside and outside of it (practical there should be a slightly */
- /* higher air pressure in the inside or the envelope would collapse). */
- /* So it's easy to calculate the density of the air inside: */
- /* */
- /* rho = p / R * T */
- /* */
- /* with p being the pressure, R the gas constant(?) which is for air */
- /* 287.14 N * m / kg * K and T the absolute temperature. */
- /* */
- /* The value returned by this function is the displacement of the CB */
- /************************************************************************/
-
- /************************************************************************/
- /* NOTE: This is the simplified version: I'm assuming that the whole */
- /* balloon consists only of the envelope.I will improove the simulation */
- /* later, but currently was my main concern to get it going... */
- /************************************************************************/
-
- // 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 = 1;
- float Q = 0;
-
- // gain of energy by heating:
- if (fuel_left > 0.0) //but only with some fuel left ;-)
- {
- float fuel_burning = current_burner_strength * max_flow_of_fuel_per_second * dt * weight_of_total_fuel; //in kg
-
- //convert to cubemetres (I'm wrongly assuming 'normal' conditions; but that's correct for my special case)
- float cube_metres_burned = fuel_burning / 2.2; //2.2 is the density for propane
-
- fuel_left -= fuel_burning / weight_of_total_fuel;
-
- // get energy through burning.
- Q += 22250.0 * cube_metres_burned; //22250 for propan, 29500 would be butane and if you dare: 2580 would be hydrogen...
- }
-
- // calculate the new temperature in the inside:
- T += Q / (1.00 * mAir);
-
- //calculate the masses of the envelope and the basket
- float mEnvelope = mAir + weight_of_envelope;
- float mBasket = weight_of_total_fuel*fuel_left + weight_of_basket + weight_of_cargo;
-
- float mTotal = mEnvelope + mBasket;
-
- //calulate the forces
- sgVec3 fTotal, fFriction, fLift;
-
- sgScaleVec3(fTotal, gravity_vector, mTotal);
-
- //sgAddVec3(fTotal, fLift); //FIXME: uninitialized fLift
- //sgAddVec3(fTotal, fFriction); //FIXME: uninitialized fFriction
-
- //claculate acceleration: a = F / m
- sgVec3 aTotal, vTotal, dTotal;
-
- sgScaleVec3(aTotal, fTotal, 1.0 / mTotal);
-
- //integrate the displacement: d = 0.5 * a * dt**2 + v * dt + d
- sgScaleVec3(vTotal, velocity, dt);
- sgScaleVec3(dTotal, aTotal, 0.5*dt*dt); sgAddVec3(dTotal, vTotal);
-
- //integrate the velocity to 'velocity': v = a * dt + v
- sgScaleVec3(vTotal, aTotal, dt); sgAddVec3(velocity, vTotal);
-
- /************************************************************************/
- /* VERY WRONG STUFF: it's just here to get some results to start with */
- /************************************************************************/
-
- // care for the ground
- if (position[2] < (ground_level+0.001) )
- position[2] = ground_level;
-
- //return results
- sgAddVec3(position, dTotal);
-
- //cout << "BallonSim: T: " << (T-273.16) << " alt: " << position[2] << " ground: " << ground_level << " throttle: " << current_burner_strength << "\n";
-}
-
-void balloon::set_burner_strength(const float bs)
-{
- if ((bs>=0.0) && (bs<=1.0))
- current_burner_strength = bs;
-}
-
-void balloon::getVelocity(sgVec3 v) const
-{
- sgCopyVec3(v, velocity);
-}
-
-void balloon::setVelocity(const sgVec3 v)
-{
- sgCopyVec3(velocity, v);
-}
-
-void balloon::getPosition(sgVec3 v) const
-{
- sgCopyVec3(v, position);
-}
-
-void balloon::setPosition(const sgVec3 v)
-{
- sgCopyVec3(position, v);
-}
-
-void balloon::getHPR(sgVec3 angles) const //the balloon isn't allways exactly vertical
-{
- sgCopyVec3(angles, hpr);
-}
-
-void balloon::setHPR(const sgVec3 angles) //the balloon isn't allways exactly vertical
-{
- sgCopyVec3(hpr, angles);
-}
-
-void balloon::setGroundLevel(const float altitude)
-{
- ground_level = altitude;
-}
-
-float balloon::getTemperature(void) const
-{
- return T;
-}
-
-float balloon::getFuelLeft(void) const
-{
- return fuel_left;
-}
-
-/*
-void main(void)
-{
- bool burner = true;
- balloon bal;
- bool exit = false;
- sgVec3 pos={0.0, 0.0, 0.0};
- char c;
- float acc_dt = 0.0;
- float alt;
-
-bool hysteresis = false; // moving up
- for (;!exit;)
- {
- for (int i=0; i<100; i++)
- {
- bal.update(0.1); acc_dt += 0.1;
- bal.getPosition(pos);
- alt = pos[2];
-
- if (alt > 3010)
- {
- hysteresis = true;
- burner = false;
- }
- if ((alt < 2990) && (hysteresis == true))
- {
- hysteresis = false;
- burner = true;
- }
- if ((bal.getTemperature()-273.16)>250.0)
- burner = false; //emergency
- }
-
- // toogle burner
- c = getch();
- if (c==' ')
- burner=!burner;
- //if (c=='s')
- // show=!show;
-
- //printf("Position: (%f/%f/%f), dP: (%f/%f/%f), burner: ", pos[0], pos[1], pos[2], dp[0], dp[1], dp[2]);
- printf("%f \t%f \t%f \t%f\n", acc_dt/60.0, bal.getTemperature()-273.16, pos[2], bal.getFuelLeft());
- if (burner==true)
- {
- //printf("on\n");
- bal.set_burner_strength(1.0);
- }
- else
- {
- //printf("off\n");
- bal.set_burner_strength(0.0);
- }
-
- }
-}
-*/
+++ /dev/null
-/*****************************************************************************
-
- Header: BalloonSim.h
- Author: Christian Mayer
- Date started: 01.09.99
-
- -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) --------
-
- This program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
- Foundation; either version 2 of the License, or (at your option) any later
- version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Further information about the GNU General Public License can also be found on
- the world wide web at http://www.gnu.org.
-
-FUNCTIONAL DESCRIPTION
-------------------------------------------------------------------------------
-Header for the hot air balloon simulator
-
-HISTORY
-------------------------------------------------------------------------------
-01.09.1999 Christian Mayer Created
-03.10.1999 Christian Mayer cleaned the code by moveing WeatherDatabase
- calls inside the update()
-*****************************************************************************/
-
-/****************************************************************************/
-/* SENTRY */
-/****************************************************************************/
-#ifndef BalloonSim_H
-#define BalloonSim_H
-
-/****************************************************************************/
-/* INCLUDES */
-/****************************************************************************/
-#include <plib/sg.h>
-
-/****************************************************************************/
-/* DEFINES */
-/****************************************************************************/
-
-/****************************************************************************/
-/* CLASS DECLARATION */
-/****************************************************************************/
-class balloon
-{
-private:
- float dt; //in s
-
- sgVec3 gravity_vector; //in m/s*s
- sgVec3 hpr; //the balloon isn't allways exactly vertical (e.g. during gusts); normalized
- sgVec3 velocity; //current velocity; it gets iterated at each 'update'
- sgVec3 position; //current position in lat/lon/alt
-
- float balloon_envelope_area; //area of the envelope
- float balloon_envelope_volume; //volume of the envelope
-
- float wind_facing_area_of_balloon;
- float wind_facing_area_of_basket;
-
- float cw_envelope; //wind resistance of the envelope
- float cw_basket; //wind resistance of the bakset
-
- //all weights in kg
- float weight_of_total_fuel;
- float weight_of_envelope;
- float weight_of_basket; //weight of all the unmovable stuff such as the basket, the burner and the empty tanks
- float weight_of_cargo; //passengers and anything left (e.g. sand bags that are thrown away to give additional lift)
-
- float fuel_left; //as a percentage
- float max_flow_of_fuel_per_second; //in percent per second
- float current_burner_strength;
-
- float lambda; //waermeuebergangskoeffizient (heat transmission coefficent?!?) for the envelope
- float l_of_the_envelope; //the thickness of the envelope (in m)
-
- float T; //tempereature inside the balloon
-
- float ground_level;
-
-public:
- balloon(); //constructor for initializing the balloon
-
- void update(); //dt = time in seconds since last call
- void set_burner_strength(const float bs);
-
- void getVelocity(sgVec3 v) const;
- void setVelocity(const sgVec3 v);
-
- void getPosition(sgVec3 v) const;
- void setPosition(const sgVec3 v);
-
- void getHPR(sgVec3 angles) const; //the balloon isn't allways exactly vertical
- void setHPR(const sgVec3 angles); //the balloon isn't allways exactly vertical
-
- void setGroundLevel(const float altitude);
-
- float getTemperature(void) const;
- float getFuelLeft(void) const;
-
- void set_dt(const float new_dt) { dt = new_dt; }
-};
-
-/****************************************************************************/
-#endif /*BalloonSim_H*/
+++ /dev/null
-noinst_LIBRARIES = libBalloon.a
-
-libBalloon_a_SOURCES = BalloonSim.cpp BalloonSim.h
-
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
#include <stdio.h> // size_t
-#include STL_STRING
+#include <string>
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <math.h>
-#include STL_FSTREAM
-#include STL_IOSTREAM
+#include <fstream>
+#include <iostream>
#include <Main/fg_props.hxx>
#include <simgear/compiler.h>
#include <math.h>
-#include STL_IOSTREAM
+#include <iostream>
#include "ls_cockpit.h"
#include "ls_generic.h"
+++ /dev/null
-// MagicCarpet.cxx -- interface to the "Magic Carpet" flight model
-//
-// Written by Curtis Olson, started October 1999.
-//
-// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// $Id$
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <simgear/math/sg_geodesy.hxx>
-#include <simgear/math/point3d.hxx>
-#include <simgear/math/polar3d.hxx>
-
-#include <Aircraft/controls.hxx>
-#include <Main/globals.hxx>
-#include <Main/fg_props.hxx>
-
-#include "MagicCarpet.hxx"
-
-
-FGMagicCarpet::FGMagicCarpet( double dt ) {
-// set_delta_t( dt );
-}
-
-
-FGMagicCarpet::~FGMagicCarpet() {
-}
-
-
-// Initialize the Magic Carpet flight model, dt is the time increment
-// for each subsequent iteration through the EOM
-void FGMagicCarpet::init() {
- common_init();
-}
-
-
-// Run an iteration of the EOM (equations of motion)
-void FGMagicCarpet::update( double dt ) {
- // cout << "FGLaRCsim::update()" << endl;
-
- if (is_suspended())
- return;
-
- // int multiloop = _calc_multiloop(dt);
-
- double time_step = dt;
-
- // speed and distance traveled
- double speed = globals->get_controls()->get_throttle( 0 ) * 2000; // meters/sec
- if ( globals->get_controls()->get_brake_left() > 0.0
- || globals->get_controls()->get_brake_right() > 0.0 )
- {
- speed = -speed;
- }
-
- double dist = speed * time_step;
- double kts = speed * SG_METER_TO_NM * 3600.0;
- _set_V_equiv_kts( kts );
- _set_V_calibrated_kts( kts );
- _set_V_ground_speed( kts );
-
- // angle of turn
- double turn_rate = globals->get_controls()->get_aileron() * SGD_PI_4; // radians/sec
- double turn = turn_rate * time_step;
-
- // update euler angles
- _set_Euler_Angles( get_Phi(), get_Theta(),
- fmod(get_Psi() + turn, SGD_2PI) );
- _set_Euler_Rates(0,0,0);
-
- // update (lon/lat) position
- double lat2, lon2, az2;
- if ( fabs( speed ) > SG_EPSILON ) {
- geo_direct_wgs_84 ( get_Altitude(),
- get_Latitude() * SGD_RADIANS_TO_DEGREES,
- get_Longitude() * SGD_RADIANS_TO_DEGREES,
- get_Psi() * SGD_RADIANS_TO_DEGREES,
- dist, &lat2, &lon2, &az2 );
-
- _set_Longitude( lon2 * SGD_DEGREES_TO_RADIANS );
- _set_Latitude( lat2 * SGD_DEGREES_TO_RADIANS );
- }
-
- // cout << "lon error = " << fabs(end.x()*SGD_RADIANS_TO_DEGREES - lon2)
- // << " lat error = " << fabs(end.y()*SGD_RADIANS_TO_DEGREES - lat2)
- // << endl;
-
- double sl_radius, lat_geoc;
- sgGeodToGeoc( get_Latitude(), get_Altitude(), &sl_radius, &lat_geoc );
-
- // update altitude
- double real_climb_rate = -globals->get_controls()->get_elevator() * 5000; // feet/sec
- _set_Climb_Rate( real_climb_rate / 500.0 );
- double climb = real_climb_rate * time_step;
-
- _set_Geocentric_Position( lat_geoc, get_Longitude(),
- sl_radius + get_Altitude() + climb );
- // cout << "sea level radius (ft) = " << sl_radius << endl;
- // cout << "(setto) sea level radius (ft) = " << get_Sea_level_radius() << endl;
- _update_ground_elev_at_pos();
- _set_Sea_level_radius( sl_radius * SG_METER_TO_FEET);
- _set_Altitude( get_Altitude() + climb );
-}
+++ /dev/null
-// MagicCarpet.hxx -- interface to the "Magic Carpet" flight model
-//
-// Written by Curtis Olson, started October 1999.
-//
-// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-// $Id$
-
-
-#ifndef _MAGICCARPET_HXX
-#define _MAGICCARPET_HXX
-
-
-#include "flight.hxx"
-
-
-class FGMagicCarpet: public FGInterface {
-
-public:
- FGMagicCarpet( double dt );
- ~FGMagicCarpet();
-
- // reset flight params to a specific position
- void init();
-
- // update position based on inputs, positions, velocities, etc.
- void update( double dt );
-
-};
-
-
-#endif // _MAGICCARPET_HXX
SP_DIR =
endif
-SUBDIRS = Balloon JSBSim LaRCsim UIUCModel YASim \
+SUBDIRS = JSBSim LaRCsim UIUCModel YASim \
$(SP_DIR) ExternalNet ExternalPipe
noinst_LIBRARIES = libFlight.a
libFlight_a_SOURCES = \
- Balloon.cxx Balloon.h \
flight.cxx flight.hxx \
groundcache.cxx groundcache.hxx \
- MagicCarpet.cxx MagicCarpet.hxx \
UFO.cxx UFO.hxx \
NullFDM.cxx NullFDM.hxx
libSPFDM_a_SOURCES = \
ADA.cxx ADA.hxx \
- ACMS.cxx ACMS.hxx
+ ACMS.cxx ACMS.hxx \
+ Balloon.cxx Balloon.h \
+ BalloonSim.cpp BalloonSim.h \
+ MagicCarpet.cxx MagicCarpet.hxx
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
#include "uiuc_controlInput.h"
-#include STL_IOSTREAM
+#include <iostream>
void uiuc_controlInput()
{
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_CD.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_CL.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_CY.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_Cm.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_Cn.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_Croll.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_controlSurface.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_engine.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_fog.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_gear.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_geometry.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_ice.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_init.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_mass.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_misc.h"
#include <cstdlib>
#include <string>
-#include STL_IOSTREAM
+#include <iostream>
#include "uiuc_menu_record.h"
#include <string>
#include <list>
-#include STL_FSTREAM
+#include <fstream>
SG_USING_STD(list);
SG_USING_STD(string);
#include "Ground.hpp"
#include "Rotor.hpp"
-#include STL_IOSTREAM
-#include STL_IOMANIP
+#include <iostream>
+#include <iomanip>
SG_USING_STD(setprecision);
# include <GL/xmesa.h>
#endif
-#include STL_FSTREAM
-#include STL_STRING
+#include <fstream>
+#include <string>
#include <stdlib.h>
#include <string.h>
# include <GL/xmesa.h>
#endif
-#include STL_STRING
+#include <string>
#include <stdlib.h>
#include <string.h>
#include <simgear/compiler.h>
#include <sstream>
-#include STL_IOMANIP
+#include <iomanip>
#include <iostream>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
using std::cout;
#include <math.h>
-#include STL_IOSTREAM
-#include STL_FSTREAM
-#include STL_STRING
+#include <iostream>
+#include <fstream>
+#include <string>
SG_USING_STD(fstream);
SG_USING_STD(cout);
#include <ctype.h>
#include <sstream>
-#include STL_FSTREAM
-#include STL_STRING
+#include <fstream>
+#include <string>
#include <vector>
#include <simgear/compiler.h>
#include <simgear/compiler.h>
-#include STL_IOSTREAM
+#include <iostream>
SG_USING_STD(cout);
SG_USING_STD(cin);
#include <simgear/compiler.h>
#include <simgear/structure/exception.hxx>
-#include STL_STRING
-#include STL_FSTREAM
+#include <string>
+#include <fstream>
#ifdef HAVE_CONFIG_H
# include <config.h>
#include <vector>
#include <deque>
-#include STL_FSTREAM
+#include <fstream>
SG_USING_STD(deque);
SG_USING_STD(vector);
-SG_USING_NAMESPACE(std);
#include <osg/State>
protected:
void common_draw();
int load(const char *, float x = 320.0f, float y = 240.0f,
- int level = 0, const string& indent = "");
+ int level = 0, const std::string& indent = "");
private:
void draw3D();
void draw_bullet(float, float, float);
HUD *_hud;
- string _name;
+ std::string _name;
int _options;
float _x, _y, _w, _h;
float _center_x, _center_y;
Input _input;
Format _mode;
- string _format;
+ std::string _format;
int _halign; // HUDText alignment
int _blink;
bool _box;
float _label_gap;
bool _pointer;
Format _label_fmt;
- string _format;
+ std::string _format;
int _div_ratio; // _major_divs/_minor_divs
bool _odd_type; // whether to put numbers at 0/2/4 or 1/3/5
#include <simgear/compiler.h>
-#include STL_IOSTREAM
-#include STL_STRING
+#include <iostream>
+#include <string>
#include <sstream>
#include <math.h> // fabs()
// This file is in the Public Domain and comes with no warranty.
#include <simgear/compiler.h>
-#include STL_IOSTREAM
-#include STL_STRING
+#include <iostream>
+#include <string>
#include <sstream>
#include "heading_indicator.hxx"
// This file is in the Public Domain and comes with no warranty.
#include <simgear/compiler.h>
-#include STL_IOSTREAM
-#include STL_STRING
+#include <iostream>
+#include <string>
#include <sstream>
#include <Main/fg_props.hxx>
// This file is in the Public Domain and comes with no warranty.
#include <simgear/compiler.h>
-#include STL_IOSTREAM
-#include STL_STRING
+#include <iostream>
+#include <string>
#include <sstream>
#include "heading_indicator_fg.hxx"
#include <simgear/compiler.h>
-#include STL_IOSTREAM
-#include STL_STRING
+#include <iostream>
+#include <string>
#include <sstream>
#include <math.h> // fabs()
// This file is in the Public Domain and comes with no warranty.
#include <simgear/compiler.h>
-#include STL_IOSTREAM
-#include STL_STRING
+#include <iostream>
+#include <string>
#include <sstream>
#include "turn_indicator.hxx"
#include <simgear/structure/exception.hxx>
#include <simgear/debug/logstream.hxx>
-#include STL_IOSTREAM
+#include <iostream>
SG_USING_STD(cerr);
SG_USING_STD(endl);
#include <simgear/compiler.h>
-#include STL_STRING
-#include STL_FSTREAM
+#include <string>
+#include <fstream>
#include <simgear/sg_inlines.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#ifdef ENABLE_SP_FDM
#include <FDM/SP/ADA.hxx>
#include <FDM/SP/ACMS.hxx>
+#include <FDM/SP/MagicCarpet.hxx>
+#include <FDM/SP/Balloon.h>
#endif
-#include <FDM/Balloon.h>
#include <FDM/ExternalNet/ExternalNet.hxx>
#include <FDM/ExternalPipe/ExternalPipe.hxx>
#include <FDM/JSBSim/JSBSim.hxx>
#include <FDM/LaRCsim/LaRCsim.hxx>
-#include <FDM/MagicCarpet.hxx>
#include <FDM/UFO.hxx>
#include <FDM/NullFDM.hxx>
#include <FDM/YASim/YASim.hxx>
#include <simgear/compiler.h>
#include <simgear/timing/sg_time.hxx>
-#include STL_STRING
+#include <string>
#include <Airports/simple.hxx>
#include <stdlib.h> // atoi()
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/io/iochannel.hxx>
{
}
-#include STL_ALGORITHM
+#include <algorithm>
SG_USING_STD(for_each);
static void delete_ptr( FGProtocol* p ) { delete p; }
#include <simgear/structure/subsystem_mgr.hxx>
#include <vector>
-#include STL_STRING
+#include <string>
SG_USING_STD(vector);
SG_USING_STD(string);
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
#include <plib/pu.h>
#include <osg/GraphicsContext>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/sound/soundmgr_openal.hxx>
-#include STL_IOSTREAM
+#include <iostream>
#include <Aircraft/aircraft.hxx>
#include <Time/tmp.hxx>
#include <simgear/structure/event_mgr.hxx>
#include <vector>
-#include STL_STRING
+#include <string>
SG_USING_STD( vector );
SG_USING_STD( string );
#include "logger.hxx"
-#include STL_FSTREAM
+#include <fstream>
#include <string>
SG_USING_STD(ofstream);
#include <string.h> // strcmp()
#include <algorithm>
-#include STL_STRING
+#include <string>
#include <plib/ul.h>
SG_USING_STD(string);
SG_USING_STD(sort);
-SG_USING_NAMESPACE(std);
#ifndef VERSION
#define VERSION "CVS "__DATE__
# include <config.h>
#endif
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
#include <vector>
SG_USING_STD(vector);
#ifndef _AIRWAYNETWORK_HXX_
#define _AIRWAYNETWORK_HXX_
-#include STL_STRING
+#include <string>
#include <istream>
#include <set>
#include <map>
# include <istream>
-#include STL_STRING
+#include <string>
// SG_USING_STD(cout);
// SG_USING_STD(endl);
#include <map>
#include <vector>
-#include STL_STRING
+#include <string>
#include "fix.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
// #include <map>
// #include <vector>
-// #include STL_STRING
+// #include <string>
#include "navlist.hxx"
#include "fixlist.hxx"
#include <map>
#include <vector>
-#include STL_STRING
+#include <string>
#include "navrecord.hxx"
#include <simgear/structure/SGSharedPtr.hxx>
#include <simgear/structure/SGReferenced.hxx>
-# include <istream>
+#include <istream>
#define FG_NAV_DEFAULT_RANGE 50 // nm
#define FG_LOC_DEFAULT_RANGE 18 // nm
// (degrees) or localizer heading
// (degrees) or dme bias (nm)
- string ident; // navaid ident
- string name; // verbose name in nav database
- string apt_id; // corresponding airport id
+ std::string ident; // navaid ident
+ std::string name; // verbose name in nav database
+ std::string apt_id; // corresponding airport id
bool serviceable; // for failure modeling
- string trans_ident; // for failure modeling
+ std::string trans_ident; // for failure modeling
public:
inline double get_multiuse() const { return multiuse; }
inline void set_multiuse( double m ) { multiuse = m; }
inline const char *get_ident() const { return ident.c_str(); }
- inline const string& get_name() const { return name; }
- inline const string& get_apt_id() const { return apt_id; }
+ inline const std::string& get_name() const { return name; }
+ inline const std::string& get_apt_id() const { return apt_id; }
inline bool get_serviceable() const { return serviceable; }
inline const char *get_trans_ident() const { return trans_ident.c_str(); }
if ( n.type >= 4 && n.type <= 9 ) {
// these types are always associated with an airport id
- string::size_type pos = n.name.find(" ");
+ std::string::size_type pos = n.name.find(" ");
n.apt_id = n.name.substr(0, pos);
}
class FGTACANRecord : public SGReferenced {
- string channel;
+ std::string channel;
int freq;
public:
inline FGTACANRecord(void);
inline ~FGTACANRecord(void) {}
- inline const string& get_channel() const { return channel; }
+ inline const std::string& get_channel() const { return channel; }
inline int get_freq() const { return freq; }
friend std::istream& operator>> ( std::istream&, FGTACANRecord& );
};
#include <errno.h>
#include <math.h>
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
# include <io.h> //lseek, read, write
#endif
-#include STL_STRING
+#include <string>
#include <plib/ul.h>
#include <errno.h>
#include <math.h>
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
#include "AV400.hxx"
-SG_USING_NAMESPACE(std);
-
FGAV400::FGAV400() {
}
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
#include "garmin.hxx"
-SG_USING_NAMESPACE(std);
+using std::string;
FGGarmin::FGGarmin() {
}
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
#include <algorithm> // sort()
#include <stdlib.h> // atoi() atof()
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <FDM/flight.hxx>
#include <stdlib.h> // atoi() atof()
-#include STL_STRING
+#include <string>
#include <simgear/debug/logstream.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <FDM/flight.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <FDM/flight.hxx>
#include <Main/fg_props.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <iostream>
#include <map>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <simgear/props/props.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <FDM/flight.hxx>
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <Aircraft/controls.hxx>
#include "protocol.hxx"
#include "nmea.hxx"
-SG_USING_NAMESPACE(std);
-
-
FGNMEA::FGNMEA() {
}
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <FDM/flight.hxx>
#include <Main/fg_props.hxx>
#define _FG_PROPS_HXX
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(string);
#include <simgear/compiler.h>
#include <simgear/io/iochannel.hxx>
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(string);
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
#include "protocol.hxx"
# include <config.h>
#endif
-#include STL_STRING
+#include <string>
#include <vector>
SG_USING_STD(string);
#include <simgear/compiler.h>
-#include STL_STRING
+#include <string>
SG_USING_STD(string);
#include <simgear/props/props.hxx>
#include SG_GL_H
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cmath>
-#else
-# include <math.h>
-#endif
+#include <cmath>
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
# include <config.h>
#endif
-#ifdef SG_HAVE_STD_INCLUDES
-# include <cmath>
-# include <ctime>
-#else
-# include <math.h>
-# include <time.h>
-#endif
+#include <cmath>
+#include <ctime>
#include <simgear/math/SGMath.hxx>
#include <simgear/ephemeris/ephemeris.hxx>
#include <simgear/compiler.h>
-#ifdef SG_HAVE_STD_INCLUDES
-# include <ctime>
-#else
-# include <time.h>
-#endif
+#include <ctime>
/**
* Given the current unix time in seconds, calculate seconds to the
#include <simgear/compiler.h>
-#include STL_IOSTREAM
+#include <iostream>
#include <plib/sg.h>
#include <simgear/compiler.h>
-#include STL_IOSTREAM
-#include STL_STRING
+#include <iostream>
+#include <string>
#include <plib/netSocket.h>
#include <plib/ul.h>