JSBSim Flight Dynamics Model  1.0 (02 March 2017)
An Open Source Flight Dynamics and Control Software Library in C++
FGDefaultGroundCallback Class Reference
+ Inheritance diagram for FGDefaultGroundCallback:
+ Collaboration diagram for FGDefaultGroundCallback:

Public Member Functions

 FGDefaultGroundCallback (double referenceRadius)
 
double GetAGLevel (double t, const FGLocation &location, FGLocation &contact, FGColumnVector3 &normal, FGColumnVector3 &v, FGColumnVector3 &w) const
 Compute the altitude above ground. More...
 
double GetAltitude (const FGLocation &l) const
 Compute the altitude above sealevel. More...
 
double GetSeaLevelRadius (const FGLocation &location) const
 Return the sea level radius. More...
 
double GetTerrainGeoCentRadius (double t, const FGLocation &location) const
 Compute the local terrain radius. More...
 
void SetSeaLevelRadius (double radius)
 Set the sea level radius. More...
 
void SetTerrainGeoCentRadius (double radius)
 Set the local terrain radius. More...
 
- Public Member Functions inherited from FGGroundCallback
virtual double GetAGLevel (const FGLocation &location, FGLocation &contact, FGColumnVector3 &normal, FGColumnVector3 &v, FGColumnVector3 &w) const
 Compute the altitude above ground. More...
 
virtual double GetTerrainGeoCentRadius (const FGLocation &location) const
 Compute the local terrain radius. More...
 
void SetTime (double _time)
 

Detailed Description

Definition at line 154 of file FGGroundCallback.h.

Member Function Documentation

◆ GetAGLevel()

double GetAGLevel ( double  t,
const FGLocation location,
FGLocation contact,
FGColumnVector3 normal,
FGColumnVector3 v,
FGColumnVector3 w 
) const
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

Implements FGGroundCallback.

Definition at line 57 of file FGGroundCallback.cpp.

60 {
61  vel = FGColumnVector3(0.0, 0.0, 0.0);
62  angularVel = FGColumnVector3(0.0, 0.0, 0.0);
63  normal = FGColumnVector3(loc).Normalize();
64  double loc_radius = loc.GetRadius(); // Get the radius of the given location
65  // (e.g. the CG)
66  double agl = loc_radius - mTerrainLevelRadius;
67  contact = (mTerrainLevelRadius/loc_radius)*FGColumnVector3(loc);
68  return agl;
69 }
+ Here is the call graph for this function:

◆ GetAltitude()

double GetAltitude ( const FGLocation l) const
virtual

Compute the altitude above sealevel.

Parameters
llocation

Implements FGGroundCallback.

Definition at line 50 of file FGGroundCallback.cpp.

51 {
52  return loc.GetRadius() - mSeaLevelRadius;
53 }
+ Here is the call graph for this function:

◆ GetSeaLevelRadius()

double GetSeaLevelRadius ( const FGLocation location) const
inlinevirtual

Return the sea level radius.

Parameters
locationlocation

Implements FGGroundCallback.

Definition at line 173 of file FGGroundCallback.h.

174  {return mSeaLevelRadius; }

◆ GetTerrainGeoCentRadius()

double GetTerrainGeoCentRadius ( double  t,
const FGLocation location 
) const
inlinevirtual

Compute the local terrain radius.

Parameters
tsimulation time
locationlocation

Implements FGGroundCallback.

Definition at line 169 of file FGGroundCallback.h.

170  { return mTerrainLevelRadius; }

◆ SetSeaLevelRadius()

void SetSeaLevelRadius ( double  radius)
inlinevirtual

Set the sea level radius.

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

Reimplemented from FGGroundCallback.

Definition at line 172 of file FGGroundCallback.h.

172 { mSeaLevelRadius = radius; }

◆ SetTerrainGeoCentRadius()

void SetTerrainGeoCentRadius ( double  radius)
inlinevirtual

Set the local terrain radius.

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

Reimplemented from FGGroundCallback.

Definition at line 168 of file FGGroundCallback.h.

168 { mTerrainLevelRadius = radius;}

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