Date started: 11/17/98
Purpose: Schedules and runs the model routines.
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 11/17/98
file The header file for the JSBSim executive.
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 07/01/01
Purpose: Encapsulates the JSBBase object
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 07/01/01
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 11/17/98
Called by: FGFDMExec and accessed by all models.
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 11/17/98
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+// This is needed by MSVC9 when included in FlightGear because of
+// the new Vec4d class in props.hxx
+#if defined( HAVE_CONFIG_H )
+# include <config.h>
+#endif
+
#include <string>
#include <iostream>
+#include <simgear/props/props.hxx>
#if !PROPS_STANDALONE
- // This is needed by MSVC9 when included in FlightGear because of
- // the new Vec4d class in props.hxx
-# if defined( HAVE_CONFIG_H )
-# include <config.h>
-# endif
# include <simgear/math/SGMath.hxx>
#endif
-#include <simgear/props/props.hxx>
#include "FGJSBBase.h"
Date started: 12/21/01
Purpose: Loads and runs JSBSim scripts.
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: 12/21/2001
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: XML element class
Called by: FGXMLParse
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 9/28/04
- ------------- Copyright (C) 2004 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2004 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 02/04/07
Purpose: Shared base class that wraps the XML file reading logic
- ------------- Copyright (C) 2007 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2007 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Config file read-in class and XML parser
Called by: Various
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 8/20/04
- ------------- Copyright (C) 2004 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2004 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Encapsulates a socket
Called by: FGOutput, et. al.
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 11/08/99
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: FGColumnVector3 class
Called by: Various
- ------------- Copyright (C) 1998 Tony Peden and Jon S. Berndt (jsb@hal-pc.org) -
+ ------------- Copyright (C) 1998 Tony Peden and Jon S. Berndt (jon@jsbsim.org) -
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Originally by Tony Peden [formatted and adapted here by Jon Berndt]
Date started: Unknown
- ------------- Copyright (C) 2001 by Tony Peden and Jon S. Berndt (jsb@hal-pc.org)
+ ------------- Copyright (C) 2001 by Tony Peden and Jon S. Berndt (jon@jsbsim.org)
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 1/2/2003
- -------------- Copyright (C) 2003 Jon S. Berndt (jsb@hal-pc.org) --------------
+ -------------- Copyright (C) 2003 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 8/25/2004
Purpose: Stores various parameter types for functions
- ------------- Copyright (C) 2004 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2004 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: August 25 2004
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 04/04/2004
Purpose: Store an arbitrary location on the globe
- ------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) ------------------
+ ------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) ------------------
------- (C) 2004 Mathias Froehlich (Mathias.Froehlich@web.de) ----
This program is free software; you can redistribute it and/or modify it under
Author: Jon S. Berndt, Mathias Froehlich
Date started: 04/04/2004
- ------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) ------------------
+ ------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) ------------------
------- (C) 2004 Mathias Froehlich (Mathias.Froehlich@web.de) ----
This program is free software; you can redistribute it and/or modify it under
Author: Tony Peden, Jon Berndt, Mathias Frolich
Date started: Unknown
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: August 25 2004
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 12/10/2004
Purpose: Stores property values
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: December 10 2004
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt, Mathias Froehlich
Date started: 12/02/98
- ------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) ------------------
+ ------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) ------------------
------- (C) 2004 Mathias Froehlich (Mathias.Froehlich@web.de) ----
This program is free software; you can redistribute it and/or modify it under
Author: Jon Berndt, Mathis Froehlich
Date started: 12/02/98
- ------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) ------------------
+ ------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) ------------------
------- (C) 2004 Mathias Froehlich (Mathias.Froehlich@web.de) ----
This program is free software; you can redistribute it and/or modify it under
Date started: 12/10/2004
Purpose: Stores real values
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: December 10 2004
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 1/9/2001
Purpose: Models a lookup table
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 1/9/2001
- ------------- Copyright (C) 2001 Jon S. Berndt (jsb@hal-pc.org) --------------
+ ------------- Copyright (C) 2001 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 09/13/00
Purpose: Encapsulates the aerodynamic forces
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 09/13/00
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Encapsulates an aircraft
Called by: FGFDMExec
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 12/12/98
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Models the atmosphere
Called by: FGSimExec
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Implementation of 1959 Standard Atmosphere added by Tony Peden
Date started: 11/24/98
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Calculates additional parameters needed by the visual system, etc.
Called by: FGSimExec
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
PropertyManager->Tie("position/distance-from-start-lon-mt", this, &FGAuxiliary::GetLongitudeRelativePosition);
PropertyManager->Tie("position/distance-from-start-lat-mt", this, &FGAuxiliary::GetLatitudeRelativePosition);
PropertyManager->Tie("position/distance-from-start-mag-mt", this, &FGAuxiliary::GetDistanceRelativePosition);
+ PropertyManager->Tie("position/vrp-gc-latitude_deg", &vLocationVRP, &FGLocation::GetLatitudeDeg);
+ PropertyManager->Tie("position/vrp-longitude_deg", &vLocationVRP, &FGLocation::GetLongitudeDeg);
+ PropertyManager->Tie("position/vrp-radius-ft", &vLocationVRP, &FGLocation::GetRadius);
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Author: Jon Berndt
Date started: 01/26/99
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Encapsulates the buoyant forces
------------- Copyright (C) 2008 - 2009 Anders Gidenstam -------------
- ------------- Copyright (C) 2008 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2008 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 01/21/08
------------- Copyright (C) 2008 Anders Gidenstam -------------
- ------------- Copyright (C) 2008 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2008 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt, Dave Culp
Date started: 9/21/07
- ------------- Copyright (C) 2007 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2007 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt, Dave Culp
Date started: 9/21/07
- ------------- Copyright (C) 2007 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2007 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Model the flight controls
Called by: FDMExec
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
#include <models/flight_control/FGSensor.h>
#include <models/flight_control/FGActuator.h>
#include <models/flight_control/FGAccelerometer.h>
+#include <models/flight_control/FGGyro.h>
namespace JSBSim {
Components->push_back(new FGSensor(this, component_element));
} else if (component_element->GetName() == string("accelerometer")) {
Components->push_back(new FGAccelerometer(this, component_element));
+ } else if (component_element->GetName() == string("gyro")) {
+ Components->push_back(new FGGyro(this, component_element));
} else {
cerr << "Unknown FCS component: " << component_element->GetName() << endl;
}
Author: Jon S. Berndt
Date started: 12/12/98
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 09/13/00
Purpose: Encapsulates the ground reaction forces (gear and collision)
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 09/13/00
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 09/13/00
Purpose: Encapsulates the inertial frame forces (coriolis and centrifugal)
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 09/13/00
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Manage output of sim parameters to file or stdout
Called by: FGSimExec
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: 12/2/98
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Encapsulates the landing gear elements
Called by: FGAircraft
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
vLocalGear = Propagate->GetTb2l() * vWhlBodyVec; // Get local frame wheel location
gearLoc = Propagate->GetLocation().LocalToLocation(vLocalGear);
- // Compute the height of the theoritical location of the wheel (if struct was not compressed) with
+ // Compute the height of the theoretical location of the wheel (if strut is not compressed) with
// respect to the ground level
double height = Exec->GetGroundCallback()->GetAGLevel(t, gearLoc, contact, normal, cvel);
vGroundNormal = -1. * Propagate->GetTec2b() * normal;
void FGLGear::ComputeGroundCoordSys(void)
{
- if( fabs(vGroundNormal(eZ)) < 1e-3 ) {
- cout << "BOMB: ";
- cout << vGroundNormal(eX) << "/" << vGroundNormal(eY) << "/" <<
- vGroundNormal(eZ) << " - " << SteerAngle << endl;
- return;
- }
-
// Compute the rolling direction projected on the ground
// It consists in finding a vector 'r' such that 'r' lies in the plane (w,z) and r.n = 0 (scalar
// product) where:
Author: Jon S. Berndt
Date started: 11/18/99
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 09/12/2000
Purpose: This module models weight and balance
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) --------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 09/12/2000
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) --------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Base class for all models
Called by: FGSimExec, et. al.
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: 11/21/98
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Manage output of sim parameters to file or stdout
Called by: FGSimExec
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
outstream << "ECEF X (ft)" + delimeter + "ECEF Y (ft)" + delimeter + "ECEF Z (ft)" + delimeter;
outstream << "EPA (deg)" + delimeter;
outstream << "Distance AGL (ft)" + delimeter;
- outstream << "Terrain Radius (ft)";
+ outstream << "Terrain Elevation (ft)";
}
if (SubSystems & ssCoefficients) {
scratch = Aerodynamics->GetCoefficientStrings(delimeter);
outstream.precision(14);
outstream << Inertial->GetEarthPositionAngleDeg() << delimeter;
outstream << Propagate->GetDistanceAGL() << delimeter;
- outstream << Propagate->GetLocalTerrainRadius();
+ outstream << Propagate->GetTerrainElevation();
outstream.precision(10);
}
if (SubSystems & ssCoefficients) {
Author: Jon Berndt
Date started: 12/2/98
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Integrate the EOM to determine instantaneous position
Called by: FGFDMExec
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 1/5/99
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Encapsulates the set of engines and tanks associated
with this aircraft
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 08/20/00
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Purpose: Models the Martian atmosphere very simply
Called by: FGFDMExec
- ------------- Copyright (C) 2004 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2004 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: 01/05/2004
- ------------- Copyright (C) 2004 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2004 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-
FGAccelerometer::FGAccelerometer(FGFCS* fcs, Element* element) : FGSensor(fcs, element)
{
Propagate = fcs->GetExec()->GetPropagate();
MassBalance = fcs->GetExec()->GetMassBalance();
+ Inertial = fcs->GetExec()->GetInertial();
Element* location_element = element->FindElement("location");
if (location_element) vLocation = location_element->FindElementTripletConvertTo("IN");
// There is no input assumed. This is a dedicated acceleration sensor.
vRadius = MassBalance->StructuralToBody(vLocation);
+
+ //gravitational forces
+ vAccel = Propagate->GetTl2b() * FGColumnVector3(0, 0, Inertial->gravity());
+
+ //aircraft forces
+ vAccel += (Propagate->GetUVWdot()
+ + Propagate->GetPQRdot() * vRadius
+ + Propagate->GetPQR() * (Propagate->GetPQR() * vRadius));
+
+ // transform to the specified orientation
+ vAccel = mT * vAccel;
- vAccel = mT * (Propagate->GetUVWdot()
- + Propagate->GetPQRdot() * vRadius
- + Propagate->GetPQR() * (Propagate->GetPQR() * vRadius));
-
Input = vAccel(axis);
Output = Input; // perfect accelerometer
if (noise_variance != 0.0) Noise(); // models noise
if (drift_rate != 0.0) Drift(); // models drift over time
if (bias != 0.0) Bias(); // models a finite bias
+ if (gain != 0.0) Gain(); // models a gain
if (fail_low) Output = -HUGE_VAL;
if (fail_high) Output = HUGE_VAL;
mT(3,1) = cr*sp*cy + sr*sy;
mT(3,2) = cr*sp*sy - sr*cy;
mT(3,3) = cr*cp;
-
+
// This transform is different than for FGForce, where we want a native nozzle
// force in body frame. Here we calculate the body frame accel and want it in
// the transformed accelerometer frame. So, the next line is commented out.
#include <input_output/FGXMLElement.h>
#include "models/FGPropagate.h"
#include "models/FGMassBalance.h"
+#include "models/FGInertial.h"
#include "math/FGColumnVector3.h"
#include "math/FGMatrix33.h"
private:
FGPropagate* Propagate;
FGMassBalance* MassBalance;
+ FGInertial* Inertial;
FGColumnVector3 vLocation;
FGColumnVector3 vOrient;
FGColumnVector3 vRadius;
Author: Jon Berndt
Date started: 21 February 2006
- ------------- Copyright (C) 2007 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2007 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: 21 February 2007
- ------------- Copyright (C) 2006 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2006 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Type = "SENSOR";
} else if (element->GetName() == string("accelerometer")) {
Type = "ACCELEROMETER";
+ } else if (element->GetName() == string("gyro")) {
+ Type = "GYRO";
} else if (element->GetName() == string("actuator")) {
Type = "ACTUATOR";
} else { // illegal component in this channel
- FGSensor
- FGFCSFunction
- FGPID
+ - FGAccelerometer
+ - FGGyro
+ - FGActuator
@author Jon S. Berndt
@version $Id$
Author: Jon S. Berndt
Date started: 4/2000
- ------------- Copyright (C) 2000 Jon S. Berndt jsb@hal-pc.org -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt jon@jsbsim.org -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: 1998 ?
- ------------- Copyright (C) 1998 by Jon S. Berndt, jsb@hal-pc.org -------------
+ ------------- Copyright (C) 1998 by Jon S. Berndt, jon@jsbsim.org -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 6/17/2006
- ------------- Copyright (C) 2006 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2006 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon Berndt
Date started: 6/17/2006
- ------------- Copyright (C) 2006 by Jon S. Berndt, jsb@hal-pc.org -------------
+ ------------- Copyright (C) 2006 by Jon S. Berndt, jon@jsbsim.org -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
bits = quantized = divisions = index = delay = 0;
PreviousInput = PreviousOutput = 0.0;
- min = max = bias = noise_variance = lag = drift_rate = drift = span = 0.0;
+ min = max = bias = gain = noise_variance = lag = drift_rate = drift = span = 0.0;
granularity = 0.0;
noise_type = 0;
fail_low = fail_high = fail_stuck = false;
if ( element->FindElement("bias") ) {
bias = element->FindElementValueAsNumber("bias");
}
+ if ( element->FindElement("gain") ) {
+ gain = element->FindElementValueAsNumber("gain");
+ }
if ( element->FindElement("drift_rate") ) {
drift_rate = element->FindElementValueAsNumber("drift_rate");
}
if (noise_variance != 0.0) Noise(); // models noise
if (drift_rate != 0.0) Drift(); // models drift over time
if (bias != 0.0) Bias(); // models a finite bias
+ if (gain != 0.0) Gain(); // models a finite gain
if (delay != 0.0) Delay(); // models system signal transport latencies
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+void FGSensor::Gain(void)
+{
+ Output *= gain;
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
void FGSensor::Drift(void)
{
drift += drift_rate*dt;
cout << " (span: " << span << ", granularity: " << granularity << ")" << endl;
}
if (bias != 0.0) cout << " Bias: " << bias << endl;
+ if (gain != 0.0) cout << " Gain: " << gain << endl;
if (drift_rate != 0) cout << " Sensor drift rate: " << drift_rate << endl;
if (lag != 0) cout << " Sensor lag: " << lag << endl;
if (noise_variance != 0) {
double min, max;
double span;
double bias;
+ double gain;
double drift_rate;
double drift;
double noise_variance;
void Quantize(void);
void Lag(void);
void Delay(void);
+ void Gain(void);
void bind(void);
Author: Jon S. Berndt
Date started: 12/23/2002
- ------------- Copyright (C) 2002 jsb@hal-pc.org -------------
+ ------------- Copyright (C) 2002 jon@jsbsim.org -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
libFlightControl_a_SOURCES = FGPID.cpp FGDeadBand.cpp FGFCSComponent.cpp \
FGFilter.cpp FGGain.cpp FGGradient.cpp FGKinemat.cpp \
FGSummer.cpp FGSwitch.cpp FGFCSFunction.cpp FGSensor.cpp \
- FGActuator.cpp FGAccelerometer.cpp
+ FGActuator.cpp FGAccelerometer.cpp FGGyro.cpp
noinst_HEADERS = FGPID.h FGDeadBand.h FGFCSComponent.h FGFilter.h \
FGGain.h FGGradient.h FGKinemat.h FGSummer.h FGSwitch.h FGFCSFunction.h \
- FGSensor.h FGActuator.h FGAccelerometer.h
+ FGSensor.h FGActuator.h FGAccelerometer.h FGGyro.h
INCLUDES = -I$(top_srcdir)/src/FDM/JSBSim
Date started: 01/21/99
Called by: FGAircraft
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 01/21/99
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 08/24/00
Purpose: Encapsulates the nozzle object
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 08/24/00
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 09/12/2000
Purpose: This module models a Piston engine
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) --------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 09/12/2000
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) --------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 08/24/00
Purpose: Encapsulates the propeller object
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 08/24/00
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 09/12/2000
Purpose: This module models a rocket engine
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) --------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 09/12/2000
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) --------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) --------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 08/24/00
Purpose: Encapsulates the rotor object
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 08/24/00
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 01/21/99
Called by: FGAircraft
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 01/21/99
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Date started: 08/23/00
Purpose: Encapsulates the thruster object
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Author: Jon S. Berndt
Date started: 08/23/00
- ------------- Copyright (C) 2000 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2000 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software