Sync with JSBSim CVS again
This commit is contained in:
parent
f07a83c73a
commit
48cad71a70
97 changed files with 143 additions and 114 deletions
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -35,17 +35,18 @@ SENTRY
|
|||
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"
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@ Date started: 1998
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@ Header: FGColumnVector3.h
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@ Author: Jon Berndt
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@ Header: FGFunction.h
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@ Header: FGMatrix33.h
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@ Header: FGParameter.h
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@ Author: Jon Berndt
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@ Header: FGPropertyValue.h
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@ Author: Jon Berndt
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@ Header: FGRealValue.h
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
@ -377,6 +377,9 @@ void FGAuxiliary::bind(void)
|
|||
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);
|
||||
}
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
@ -55,6 +55,7 @@ INCLUDES
|
|||
#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 {
|
||||
|
||||
|
@ -642,6 +643,8 @@ bool FGFCS::Load(Element* el, SystemType systype)
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
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
|
||||
|
@ -280,7 +280,7 @@ FGColumnVector3& FGLGear::Force(void)
|
|||
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;
|
||||
|
@ -392,13 +392,6 @@ FGColumnVector3& FGLGear::Force(void)
|
|||
|
||||
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:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
@ -333,7 +333,7 @@ void FGOutput::DelimitedOutput(string fname)
|
|||
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);
|
||||
|
@ -445,7 +445,7 @@ void FGOutput::DelimitedOutput(string fname)
|
|||
outstream.precision(14);
|
||||
outstream << Inertial->GetEarthPositionAngleDeg() << delimeter;
|
||||
outstream << Propagate->GetDistanceAGL() << delimeter;
|
||||
outstream << Propagate->GetLocalTerrainRadius();
|
||||
outstream << Propagate->GetTerrainElevation();
|
||||
outstream.precision(10);
|
||||
}
|
||||
if (SubSystems & ssCoefficients) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -48,11 +48,11 @@ static const char *IdHdr = ID_ACCELEROMETER;
|
|||
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");
|
||||
|
@ -99,10 +99,17 @@ bool FGAccelerometer::Run(void )
|
|||
|
||||
vRadius = MassBalance->StructuralToBody(vLocation);
|
||||
|
||||
vAccel = mT * (Propagate->GetUVWdot()
|
||||
//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;
|
||||
|
||||
Input = vAccel(axis);
|
||||
|
||||
Output = Input; // perfect accelerometer
|
||||
|
@ -118,6 +125,7 @@ bool FGAccelerometer::Run(void )
|
|||
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;
|
||||
|
|
|
@ -41,6 +41,7 @@ INCLUDES
|
|||
#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"
|
||||
|
||||
|
@ -126,6 +127,7 @@ public:
|
|||
private:
|
||||
FGPropagate* Propagate;
|
||||
FGMassBalance* MassBalance;
|
||||
FGInertial* Inertial;
|
||||
FGColumnVector3 vLocation;
|
||||
FGColumnVector3 vOrient;
|
||||
FGColumnVector3 vRadius;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -91,6 +91,8 @@ FGFCSComponent::FGFCSComponent(FGFCS* _fcs, Element* element) : fcs(_fcs)
|
|||
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
|
||||
|
|
|
@ -78,6 +78,9 @@ CLASS DOCUMENTATION
|
|||
- FGSensor
|
||||
- FGFCSFunction
|
||||
- FGPID
|
||||
- FGAccelerometer
|
||||
- FGGyro
|
||||
- FGActuator
|
||||
|
||||
@author Jon S. Berndt
|
||||
@version $Id$
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -58,7 +58,7 @@ FGSensor::FGSensor(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element)
|
|||
|
||||
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;
|
||||
|
@ -82,6 +82,9 @@ FGSensor::FGSensor(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element)
|
|||
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");
|
||||
}
|
||||
|
@ -152,6 +155,7 @@ bool FGSensor::Run(void )
|
|||
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
|
||||
|
||||
|
@ -196,6 +200,13 @@ void FGSensor::Bias(void)
|
|||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
void FGSensor::Gain(void)
|
||||
{
|
||||
Output *= gain;
|
||||
}
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
void FGSensor::Drift(void)
|
||||
{
|
||||
drift += drift_rate*dt;
|
||||
|
@ -304,6 +315,7 @@ void FGSensor::Debug(int from)
|
|||
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) {
|
||||
|
|
|
@ -139,6 +139,7 @@ protected:
|
|||
double min, max;
|
||||
double span;
|
||||
double bias;
|
||||
double gain;
|
||||
double drift_rate;
|
||||
double drift;
|
||||
double noise_variance;
|
||||
|
@ -166,6 +167,7 @@ protected:
|
|||
void Quantize(void);
|
||||
void Lag(void);
|
||||
void Delay(void);
|
||||
void Gain(void);
|
||||
|
||||
void bind(void);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -3,10 +3,10 @@ noinst_LIBRARIES = libFlightControl.a
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue