JSBSim Flight Dynamics Model 1.0 (23 February 2013)
An Open Source Flight Dynamics and Control Software Library in C++

FGDefaultGroundCallback Class Reference

Inheritance diagram for FGDefaultGroundCallback:
Collaboration diagram for FGDefaultGroundCallback:

List of all members.

Public Member Functions

 FGDefaultGroundCallback (double referenceRadius=20925650.0)
double GetAGLevel (double t, const FGLocation &location, FGLocation &contact, FGColumnVector3 &normal, FGColumnVector3 &v, FGColumnVector3 &w) const
 Compute the altitude above ground.
double GetAltitude (const FGLocation &l) const
 Compute the altitude above sealevel.
double GetSeaLevelRadius (const FGLocation &location) const
 Return the sea level radius.
double GetTerrainGeoCentRadius (double t, const FGLocation &location) const
 Compute the local terrain radius.
void SetSeaLevelRadius (double radius)
 Set the sea level radius.
void SetTerrainGeoCentRadius (double radius)
 Set the local terrain radius.

Detailed Description

Definition at line 131 of file FGGroundCallback.h.


Member Function Documentation

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

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 58 of file FGGroundCallback.cpp.

References FGLocation::GetRadius(), and FGColumnVector3::Normalize().

{
  vel = FGColumnVector3(0.0, 0.0, 0.0);
  angularVel = FGColumnVector3(0.0, 0.0, 0.0);
  normal = FGColumnVector3(loc).Normalize();
  double loc_radius = loc.GetRadius();  // Get the radius of the given location
                                        // (e.g. the CG)
  double agl = loc_radius - mTerrainLevelRadius;
  contact = (mTerrainLevelRadius/loc_radius)*FGColumnVector3(loc);
  return agl;
}

Here is the call graph for this function:

double GetAltitude ( const FGLocation l) const [virtual]
Parameters:
llocation

Implements FGGroundCallback.

Definition at line 51 of file FGGroundCallback.cpp.

{
  return loc.GetRadius() - mSeaLevelRadius;
}

double GetSeaLevelRadius ( const FGLocation location) const [inline, virtual]
Parameters:
tsimulation time
locationlocation

Implements FGGroundCallback.

Definition at line 149 of file FGGroundCallback.h.

   {return mSeaLevelRadius; }
double GetTerrainGeoCentRadius ( double  t,
const FGLocation location 
) const [inline, virtual]
Parameters:
tsimulation time
locationlocation

Implements FGGroundCallback.

Definition at line 145 of file FGGroundCallback.h.

   { return mTerrainLevelRadius; }
void SetSeaLevelRadius ( double  radius) [inline, virtual]

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 148 of file FGGroundCallback.h.

{ mSeaLevelRadius = radius;   }
void SetTerrainGeoCentRadius ( double  radius) [inline, virtual]

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 144 of file FGGroundCallback.h.

{  mTerrainLevelRadius = radius;}

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