|
WSF
|
#include <WsfPathGuidance.hpp>

Public Types | |
| enum | { cSPEED = 0x0001 , cAXIAL_ACCEL = 0x0002 , cCLIMB_RATE = 0x0004 , cALTITUDE = 0x0008 , cHEADING = 0x0010 , cTURN_RATE = 0x0020 , cRADIAL_ACCEL = 0x0040 , cLAT_LON = 0x0080 , cSEGMENT_TIME = 0x0100 , cSEGMENT_DIST = 0x0200 , cTURN_DETERMINED = 0x8000 } |
Public Member Functions | |
| WsfPathGuidance () | |
| Construct a path guidance object. | |
| virtual | ~WsfPathGuidance () |
| virtual WsfPathGuidance * | Clone () const |
| Clone a path guidance object. | |
| void | SetMover (WsfMover *aMoverPtr) |
| WsfMover * | GetMover () const |
| Get the mover to whom guidance is being provided. | |
| virtual bool | Initialize (double aSimTime) |
| virtual bool | ProcessInput (UtInput &aInput) |
| virtual void | Update (double aSimTime) |
| void | TriggerExtrapolation () |
| bool | IsChanged () const |
| bool | IsOnGround () const |
| bool | IsOnRoad () const |
| bool | IsExtrapolating () const |
| bool | IsStopping () const |
| bool | IsInitialized () const |
| bool | IsPaused () const |
| double | GetPauseTime () const |
| virtual double | GetAltitude () const |
| virtual double | GetSpeed () const |
| double | GetRawHeading () const |
| double | GetClimbRate () const |
| double | GetLatitude () const |
| double | GetLongitude () const |
| double | GetSegmentEndTime () const |
| double | GetSegmentEndDist () const |
| double | GetAxialAccel () const |
| double | GetRadialAccel () const |
| double | GetTurnRate () const |
| WsfPath::AltRef | GetAltRef () const |
| WsfPath::HdgRef | GetHdgRef () const |
| WsfPath::TurnDirection | GetTurnDir () const |
| WsfPath::Switch | GetSwitch () const |
| void | DecrementPauseTime (double aValue) |
| void | SetPauseTime (double aValue) |
| void | SetAltitude (double aAltitude, WsfPath::AltRef aAltRef) |
| void | SetAltitude (double aAltitude, WsfPath::AltRef aMoverDefault, WsfPath::AltRef aAltRefWP_Override) |
| void | SetLatLon (double aLatitude, double aLongitude) |
| void | SetHeading (double aHeading, WsfPath::HdgRef aHdgRef) |
| void | SetClimbRate (double aClimbRate) |
| void | SetLLA (double aLatitude, double aLongitude, double aAltitude, WsfPath::AltRef aMoverDefault, WsfPath::AltRef aAltRefOverride=WsfPath::cALT_REF_MSL) |
| void | SetSpeed (double aSpeed) |
| void | SetAxialAccel (double aAxialAccel) |
| void | SetRadialAccel (double aRadialAccel) |
| void | SetTurnRate (double aTurnRate) |
| void | SetSegmentEndTime (double aSegmentTime) |
| void | SetSegmentEndDist (double aSegmentDist) |
| void | SetHdgRef (WsfPath::HdgRef aHdgRef) |
| void | SetTurnDir (WsfPath::TurnDirection aTurnDir) |
| void | SetSwitch (WsfPath::Switch aMoverDefault, WsfPath::Switch aWP_SwitchOverride) |
| void | ClearValid (int aClearMask) |
| bool | IsSet (int aMask) |
| bool | SpeedIsSet () const |
| bool | AltIsSet () const |
| bool | LatLonIsSet () const |
| bool | HeadingIsSet () const |
| bool | AxialAccelIsSet () const |
| bool | ClimbRateIsSet () const |
| bool | TurnRateIsSet () const |
| bool | RadialAccelIsSet () const |
| bool | SegmentTimeIsSet () const |
| bool | SegmentDistIsSet () const |
| bool | LLA_IsSet () const |
| bool | HdgAndAltSet () const |
| bool | HdgAltAndSpeedSet () const |
| bool | TurnIsDetermined () const |
| double | ChosenHeading () const |
| WsfPath::TurnDirection | ChosenDirection () const |
| void | PrintValidityMap (double aSimTime) const |
| void | GetWPTargetInfo (double aVelNED[3], double &aPlatformHeading, double &aPlatformPitch, double &aPlatformRoll, double &aHeadingChangeMag, double &aHdgChgDirection, double &aGroundSpeed, double &aTotalSpeed, double &aGroundDistTo) |
| virtual double | GetRadialAccelAtPoint (const WsfWaypoint &aPoint) const |
Protected Member Functions | |
| virtual bool | BeginExtrapolation (double aSimTime) |
| virtual bool | SetNewGuidance (double aSimTime) |
| virtual bool | ReviseGuidance (double aSimTime) |
| virtual bool | DetermineTheTurn (double aSimTime) |
| void | ClearChosenDir () |
| void | SetAltRef (WsfPath::AltRef aMoverDefault, WsfPath::AltRef aAltRefOverride=WsfPath::cALT_REF_MSL) |
| const double * | TgtWCS () const |
| void | PrivateSetTurnDir (WsfPath::TurnDirection aTurnDir) |
| std::string | PrintBool (int aMask) const |
| void | SetValid (int aSetMask) |
Protected Attributes | |
| bool | mDebug |
| bool | mInitialized |
| bool | mIsChanged |
| bool | mIsOnGround |
| bool | mIsOnRoad |
| bool | mKeepLevel |
| double | mPauseTime |
A guidance base class used by WsfMovers that follow WsfRoutes. This is a base class that specifies guidance values that may be used to direct a WsfMover in three dimensions, including from one WsfWaypoint to another. Validity flags are kept to allow the implementation to know what guidance is permissible or recommended, based on the information known. A "dirty" flag is kept to indicate when any value has changed, and the implementation will clear this flag after it has reacted to changed guidance. The class may be further derived to augment or fill in missing data. The mover may be constrained in its ability to simul- taneously follow all the guidance given, but should comply as closely as possible. Note: It is generally intended that target Speed, Heading, and Altitude values remain persistent (stay valid), even after crossing waypoints, unless overridden with new values in the WsfWaypoint.
| anonymous enum |
This enum specifies integer bit-mapped "valid" flags for clients to use in deciding what guidance values can be used.
| WsfPathGuidance::WsfPathGuidance | ( | ) |
Construct a path guidance object.
References mDebug, mInitialized, mIsChanged, mIsOnGround, mIsOnRoad, mKeepLevel, and mPauseTime.
Referenced by Clone(), WsfWaypointPathGuidance::Clone(), and WsfWaypointPathGuidance::WsfWaypointPathGuidance().
|
virtual |
|
inline |
References cALTITUDE.
Referenced by WsfWaypointPathGuidance::GetWPTargetInfo(), HdgAltAndSpeedSet(), HdgAndAltSet(), and LLA_IsSet().
|
inline |
References cAXIAL_ACCEL.
|
protectedvirtual |
References WsfPath::cHDG_REF_NORTH, cLAT_LON, ClearValid(), WsfPath::cSWITCH_EXTERNAL, GetMover(), WsfPlatformPart::GetPlatform(), LatLonIsSet(), and SetHeading().
Referenced by GetWPTargetInfo(), and Update().
|
inline |
Referenced by WsfWaypointPathGuidance::GetWPTargetInfo().
| double WsfPathGuidance::ChosenHeading | ( | ) | const |
References WsfPath::cHDG_REF_RELATIVE, GetMover(), and WsfPlatformPart::GetPlatform().
Referenced by DetermineTheTurn(), and WsfWaypointPathGuidance::GetWPTargetInfo().
|
inlineprotected |
References WsfPath::cTURN_DIR_SHORTEST.
Referenced by WsfWaypointPathGuidance::GetWPTargetInfo().
| void WsfPathGuidance::ClearValid | ( | int | aClearMask | ) |
Referenced by BeginExtrapolation(), SetHeading(), SetLatLon(), SetSegmentEndDist(), SetSegmentEndTime(), and SetTurnRate().
|
inline |
References cCLIMB_RATE.
|
virtual |
Clone a path guidance object.
Reimplemented in WsfWaypointPathGuidance.
References WsfPathGuidance().
|
inline |
References mPauseTime.
|
protectedvirtual |
References WsfPath::cHEADING_FUZZ, ChosenHeading(), cTURN_DETERMINED, WsfPath::cTURN_DIR_SHORTEST, GetMover(), WsfPlatformPart::GetPlatform(), HeadingIsSet(), SetValid(), and TurnIsDetermined().
Referenced by GetWPTargetInfo(), SetNewGuidance(), and Update().
|
virtual |
Reimplemented in WsfWaypointPathGuidance.
Referenced by WsfWaypointPathGuidance::GetAltitude().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by WsfWaypointPathGuidance::GetWPTargetInfo().
|
inline |
Referenced by WsfWaypointPathGuidance::GetWPTargetInfo().
|
inline |
Get the mover to whom guidance is being provided.
Referenced by BeginExtrapolation(), ChosenHeading(), DetermineTheTurn(), WsfWaypointPathGuidance::GetRadialAccelAtPoint(), WsfWaypointPathGuidance::GetWPTargetInfo(), and SetLatLon().
|
inline |
References mPauseTime.
|
inline |
Referenced by WsfWaypointPathGuidance::CalcLateralAccelLimit().
|
virtual |
Get the radial acceleration to be used for turning FROM the specified waypoint. This method is typically overridden by a derived class to provide additional constraints on the resultant value.
Reimplemented in WsfWaypointPathGuidance.
References WsfPath::cDOUBLE_NOT_SET, and WsfWaypoint::GetRadialAccel().
Referenced by GetWPTargetInfo().
|
inline |
|
inline |
Referenced by WsfIterativeRouteMover::IsWaypointSwitchTime().
|
inline |
Referenced by WsfIterativeRouteMover::IsWaypointSwitchTime().
|
virtual |
Reimplemented in WsfWaypointPathGuidance.
Referenced by WsfWaypointPathGuidance::GetSpeed(), and WsfIterativeRouteMover::GetTurnLeadDistance().
|
inline |
Referenced by WsfIterativeRouteMover::IsWaypointSwitchTime().
|
inline |
|
inline |
Referenced by WsfWaypointPathGuidance::CalcLateralAccelLimit().
| void WsfPathGuidance::GetWPTargetInfo | ( | double | aVelNED[3], |
| double & | aPlatformHeading, | ||
| double & | aPlatformPitch, | ||
| double & | aPlatformRoll, | ||
| double & | aHeadingChangeMag, | ||
| double & | aHdgChgDirection, | ||
| double & | aGroundSpeed, | ||
| double & | aTotalSpeed, | ||
| double & | aGroundDistTo ) |
References BeginExtrapolation(), DetermineTheTurn(), GetRadialAccelAtPoint(), ReviseGuidance(), and SetNewGuidance().
|
inline |
References AltIsSet(), HeadingIsSet(), and SpeedIsSet().
|
inline |
References AltIsSet(), and HeadingIsSet().
|
inline |
References cHEADING.
Referenced by DetermineTheTurn(), WsfWaypointPathGuidance::GetWPTargetInfo(), HdgAltAndSpeedSet(), HdgAndAltSet(), and SetNewGuidance().
|
virtual |
References mInitialized.
|
inline |
This boolean flag indicates to the client when any guidance has been changed, otherwise, the controls are the same as previous, and need not be re-interpreted.
References mIsChanged.
|
inline |
References WsfPath::cSWITCH_EXTERNAL.
|
inline |
References mInitialized.
|
inline |
References mIsOnGround.
|
inline |
References mIsOnRoad.
|
inline |
References mPauseTime.
Referenced by Update().
| bool WsfPathGuidance::IsSet | ( | int | aMask | ) |
Referenced by SetTurnRate().
|
inline |
|
inline |
References cLAT_LON.
Referenced by BeginExtrapolation(), WsfWaypointPathGuidance::GetWPTargetInfo(), LLA_IsSet(), and SetLatLon().
|
inline |
References AltIsSet(), and LatLonIsSet().
|
protected |
Referenced by PrintValidityMap().
| void WsfPathGuidance::PrintValidityMap | ( | double | aSimTime | ) | const |
References cALTITUDE, cAXIAL_ACCEL, cCLIMB_RATE, cHEADING, cLAT_LON, cRADIAL_ACCEL, cSEGMENT_DIST, cSEGMENT_TIME, cSPEED, cTURN_RATE, and PrintBool().
Referenced by Update().
|
protected |
|
virtual |
Reimplemented in WsfWaypointPathGuidance.
References mDebug.
Referenced by WsfWaypointPathGuidance::ProcessInput().
|
inline |
References cRADIAL_ACCEL.
Referenced by WsfWaypointPathGuidance::CalcLateralAccelLimit().
|
protectedvirtual |
Referenced by GetWPTargetInfo(), and Update().
|
inline |
References cSEGMENT_DIST.
|
inline |
References cSEGMENT_TIME.
| void WsfPathGuidance::SetAltitude | ( | double | aAltitude, |
| WsfPath::AltRef | aAltRef ) |
Referenced by SetLLA().
| void WsfPathGuidance::SetAltitude | ( | double | aAltitude, |
| WsfPath::AltRef | aMoverDefault, | ||
| WsfPath::AltRef | aAltRefWP_Override ) |
References SetAltRef().
|
protected |
References WsfPath::cALT_REF_MOVER_DEFAULT.
Referenced by SetAltitude().
| void WsfPathGuidance::SetAxialAccel | ( | double | aAxialAccel | ) |
References cAXIAL_ACCEL, mIsChanged, and SetValid().
| void WsfPathGuidance::SetClimbRate | ( | double | aClimbRate | ) |
Set a desired climb rate.
| aClimbRate | - Desired climb rate, m/s |
References cCLIMB_RATE, mIsChanged, and SetValid().
| void WsfPathGuidance::SetHdgRef | ( | WsfPath::HdgRef | aHdgRef | ) |
Set the basis for a heading value.
| aHdgRef | - Either cHDG_REF_NORTH, or cHDG_REF_RELATIVE |
References mIsChanged.
Referenced by SetHeading(), and SetTurnRate().
| void WsfPathGuidance::SetHeading | ( | double | aHeading, |
| WsfPath::HdgRef | aHdgRef ) |
Set the heading and basis for that heading value.
| aHeading | - Desired heading, in radians. |
| aHdgRef | - Either cHDG_REF_NORTH, or cHDG_REF_RELATIVE |
References cHEADING, cLAT_LON, ClearValid(), cSEGMENT_DIST, cSEGMENT_TIME, cTURN_DETERMINED, mIsChanged, SetHdgRef(), and SetValid().
Referenced by BeginExtrapolation().
| void WsfPathGuidance::SetLatLon | ( | double | aLatitude, |
| double | aLongitude ) |
References cHEADING, cLAT_LON, ClearValid(), cSEGMENT_DIST, cSEGMENT_TIME, GetMover(), WsfPlatformPart::GetPlatform(), LatLonIsSet(), mInitialized, mIsChanged, and SetValid().
Referenced by SetLLA().
| void WsfPathGuidance::SetLLA | ( | double | aLatitude, |
| double | aLongitude, | ||
| double | aAltitude, | ||
| WsfPath::AltRef | aMoverDefault, | ||
| WsfPath::AltRef | aAltRefOverride = WsfPath::cALT_REF_MSL ) |
Set a target destination location.
| aLatitude | - Desired latitude, deg. |
| aLongitude | - Desired longitude, deg. |
| aAltitude | - Desired altitude, m. |
| aMoverDefault | - Desired altitude reference, cALT_REF_MOVER_DEFAULT, cALT_REF_MSL, cALT_REF_AGLdeg. |
| aAltRefOverride | - Desired altitude reference (as above). |
References SetAltitude(), and SetLatLon().
|
inline |
Set the mover to whom guidance is being provided.
|
protectedvirtual |
References DetermineTheTurn(), HeadingIsSet(), success, and TurnIsDetermined().
Referenced by GetWPTargetInfo(), and Update().
|
inline |
References mPauseTime.
| void WsfPathGuidance::SetRadialAccel | ( | double | aRadialAccel | ) |
References cRADIAL_ACCEL, mIsChanged, and SetValid().
| void WsfPathGuidance::SetSegmentEndDist | ( | double | aSegmentDist | ) |
Set the distance basis for a path segment.
| aSegmentDist | - Desired distance to travel before waypoint switch, m. |
References cHEADING, cLAT_LON, ClearValid(), cSEGMENT_DIST, cSEGMENT_TIME, WsfPath::cSWITCH_ON_DISTANCE, mIsChanged, and SetValid().
Referenced by SetTurnRate().
| void WsfPathGuidance::SetSegmentEndTime | ( | double | aSegmentTime | ) |
Set the time basis for a path segment.
| aSegmentTime | - Desired time to travel before waypoint switch, sec. |
References cHEADING, cLAT_LON, ClearValid(), cSEGMENT_DIST, cSEGMENT_TIME, WsfPath::cSWITCH_ON_TIME, mIsChanged, and SetValid().
Referenced by SetTurnRate().
| void WsfPathGuidance::SetSpeed | ( | double | aSpeed | ) |
References cSPEED, mIsChanged, and SetValid().
| void WsfPathGuidance::SetSwitch | ( | WsfPath::Switch | aMoverDefault, |
| WsfPath::Switch | aWP_SwitchOverride ) |
References WsfPath::cSWITCH_EXTERNAL, and WsfPath::cSWITCH_MOVER_DEFAULT.
Referenced by SetTurnRate().
| void WsfPathGuidance::SetTurnDir | ( | WsfPath::TurnDirection | aTurnDir | ) |
References mIsChanged.
Referenced by SetTurnRate().
| void WsfPathGuidance::SetTurnRate | ( | double | aTurnRate | ) |
References ClearValid(), IsSet(), SetHdgRef(), SetSegmentEndDist(), SetSegmentEndTime(), SetSwitch(), and SetTurnDir().
|
protected |
References mIsChanged.
Referenced by DetermineTheTurn(), SetAxialAccel(), SetClimbRate(), SetHeading(), SetLatLon(), SetRadialAccel(), SetSegmentEndDist(), SetSegmentEndTime(), and SetSpeed().
|
inline |
References cSPEED.
Referenced by WsfWaypointPathGuidance::GetSpeed(), and HdgAltAndSpeedSet().
|
inlineprotected |
| void WsfPathGuidance::TriggerExtrapolation | ( | ) |
References mIsChanged.
|
inline |
References cTURN_DETERMINED.
Referenced by DetermineTheTurn(), WsfWaypointPathGuidance::GetWPTargetInfo(), and SetNewGuidance().
|
inline |
References cTURN_RATE.
Referenced by WsfWaypointPathGuidance::CalcLateralAccelLimit().
|
virtual |
This virtual method may be overridden if needed to accomplish the processing needed for a specific WsfMover. Three distinct guidance modes are intrinsic to the class, triggering a new guidance type, begin extrapolating existing guidance, and revising guidance already in-progress.
References BeginExtrapolation(), DetermineTheTurn(), IsPaused(), mDebug, mInitialized, mIsChanged, PrintValidityMap(), ReviseGuidance(), and SetNewGuidance().
|
protected |
Referenced by ProcessInput(), Update(), and WsfPathGuidance().
|
protected |
Referenced by Initialize(), IsInitialized(), SetLatLon(), Update(), and WsfPathGuidance().
|
protected |
|
protected |
Referenced by IsOnGround(), and WsfPathGuidance().
|
protected |
Referenced by IsOnRoad(), and WsfPathGuidance().
|
protected |
Referenced by WsfPathGuidance().
|
protected |
Referenced by DecrementPauseTime(), GetPauseTime(), IsPaused(), SetPauseTime(), and WsfPathGuidance().