JSBSim Flight Dynamics Model  1.1.11 (13 Feb 2022)
An Open Source Flight Dynamics and Control Software Library in C++
FGGroundCallback Class Referenceabstract

Detailed Description

This class provides callback slots to get ground specific data.

The default implementation returns values for a ball formed earth with an adjustable terrain elevation.

Author
Mathias Froehlich

Definition at line 62 of file FGGroundCallback.h.

#include <FGGroundCallback.h>

+ Inheritance diagram for FGGroundCallback:

Public Member Functions

virtual double GetAGLevel (const FGLocation &location, FGLocation &contact, FGColumnVector3 &normal, FGColumnVector3 &v, FGColumnVector3 &w) const
 Compute the altitude above ground. More...
 
virtual double GetAGLevel (double t, const FGLocation &location, FGLocation &contact, FGColumnVector3 &normal, FGColumnVector3 &v, FGColumnVector3 &w) const =0
 Compute the altitude above ground. More...
 
virtual void SetEllipse (double semimajor, double semiminor)
 Set the planet semimajor and semiminor axes. More...
 
virtual void SetTerrainElevation (double h)
 Set the terrain elevation. More...
 
void SetTime (double _time)
 Set the simulation time. More...
 

Protected Attributes

double time
 

Member Function Documentation

◆ GetAGLevel() [1/2]

virtual double GetAGLevel ( const FGLocation location,
FGLocation contact,
FGColumnVector3 normal,
FGColumnVector3 v,
FGColumnVector3 w 
) const
inlinevirtual

Compute the altitude above ground.

The altitude depends on location l.

Parameters
llocation
contactContact point location below the location l
normalNormal vector at the contact point
vLinear velocity at the contact point
wAngular velocity at the contact point
Returns
altitude above ground

Definition at line 93 of file FGGroundCallback.h.

96  { return GetAGLevel(time, location, contact, normal, v, w); }
+ Here is the call graph for this function:

◆ GetAGLevel() [2/2]

virtual double GetAGLevel ( double  t,
const FGLocation location,
FGLocation contact,
FGColumnVector3 normal,
FGColumnVector3 v,
FGColumnVector3 w 
) const
pure virtual

Compute the altitude above ground.

The altitude depends on time t and location l.

Parameters
tsimulation time
llocation
contactContact point location below the location l
normalNormal vector at the contact point
vLinear velocity at the contact point
wAngular velocity at the contact point
Returns
altitude above ground

Implemented in FGDefaultGroundCallback.

+ Here is the caller graph for this function:

◆ SetEllipse()

virtual void SetEllipse ( double  semimajor,
double  semiminor 
)
inlinevirtual

Set the planet semimajor and semiminor axes.

Only needs to be implemented if JSBSim should be allowed to modify the planet dimensions.

Reimplemented in FGDefaultGroundCallback.

Definition at line 108 of file FGGroundCallback.h.

108 {}

◆ SetTerrainElevation()

virtual void SetTerrainElevation ( double  h)
inlinevirtual

Set the terrain elevation.

Only needs to be implemented if JSBSim should be allowed to modify the local terrain radius (see the default implementation)

Reimplemented in FGDefaultGroundCallback.

Definition at line 102 of file FGGroundCallback.h.

102 {}

◆ SetTime()

void SetTime ( double  _time)
inline

Set the simulation time.

The elapsed time can be used by the ground callbck to assess the planet rotation or the movement of objects.

Parameters
_timeelapsed time in seconds since the simulation started.

Definition at line 115 of file FGGroundCallback.h.

115 { time = _time; }

The documentation for this class was generated from the following file:
JSBSim::FGGroundCallback::GetAGLevel
virtual double GetAGLevel(double t, const FGLocation &location, FGLocation &contact, FGColumnVector3 &normal, FGColumnVector3 &v, FGColumnVector3 &w) const =0
Compute the altitude above ground.