FlightGear next
JSBSim::FGGroundCallback Class Referenceabstract

This class provides callback slots to get ground specific data. More...

#include <FGGroundCallback.h>

Inherited by FGFSGroundCallback, and JSBSim::FGDefaultGroundCallback.

Public Member Functions

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

Protected Attributes

double time
 

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.

Constructor & Destructor Documentation

◆ FGGroundCallback()

JSBSim::FGGroundCallback::FGGroundCallback ( )
inline

Definition at line 66 of file FGGroundCallback.h.

◆ ~FGGroundCallback()

virtual JSBSim::FGGroundCallback::~FGGroundCallback ( )
inlinevirtual

Definition at line 67 of file FGGroundCallback.h.

Member Function Documentation

◆ GetAGLevel() [1/2]

virtual double JSBSim::FGGroundCallback::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.

◆ GetAGLevel() [2/2]

virtual double JSBSim::FGGroundCallback::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 FGFSGroundCallback, and JSBSim::FGDefaultGroundCallback.

◆ SetEllipse()

virtual void JSBSim::FGGroundCallback::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 JSBSim::FGDefaultGroundCallback.

Definition at line 108 of file FGGroundCallback.h.

◆ SetTerrainElevation()

virtual void JSBSim::FGGroundCallback::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 JSBSim::FGDefaultGroundCallback.

Definition at line 102 of file FGGroundCallback.h.

◆ SetTime()

void JSBSim::FGGroundCallback::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.

Member Data Documentation

◆ time

double JSBSim::FGGroundCallback::time
protected

Definition at line 118 of file FGGroundCallback.h.


The documentation for this class was generated from the following file: