WSF
WsfPathComputer Class Reference

WsfPathComputer computes a WsfPathList for a platform to reach a target state. More...

#include <WsfPathComputer.hpp>

Collaboration diagram for WsfPathComputer:

Classes

struct  SpeedAltitudeBreakpoint

Public Member Functions

 WsfPathComputer (ut::Random *aRandomPtr=nullptr)
WsfPathConstraintsGetConstraints ()
void ComputePath (const WsfPathState &aState, const WsfPathTarget &aTarget, WsfPathList &aPathList)
void CreateTarget (const WsfPathState &aCurrentState, WsfPathConstraints &aCurrentConstraints, const WsfPathConstraints &aMoverConstraints, const WsfWaypoint &aTargetPoint, const WsfWaypoint *aNextPointPtr, WsfPathTarget &aTarget)
void ConstrainTarget (WsfPathTarget &aTarget, const WsfPathConstraints &aConstraints)
 Bind target to a valid altitude/speed.
void RevisePathHitPointAtTime (WsfPathTarget &aTarget, WsfPathList &aPath)
void SetMaximumTurn (double aMaxTurn)
double GetMaximumTurn () const
void SetPathVarianceRadius (double aPathVarianceRadius)
void SetSpeedVariancePct (double aSpeedVariancePct)
void SetDefaultSwitch (WsfPath::Switch aDefaultSwitch)
void SetRandom (ut::Random *aRandomPtr)
double GetTurnRadius (double aSpeed)
void TurnToHeading (const WsfPathState &aState, const WsfPathTarget &aTarget, WsfPathList &aPathList, WsfPathTarget::TurnDirection aTurnDirection)
void TurnRelative (const WsfPathState &aState, const WsfPathTarget &aTarget, WsfPathList &aPathList, double aTurnAngle, double aTurnRadius=-1.0)
bool TurnToPointHeading (const WsfPathState &aState, const WsfPathTarget &aTarget, WsfPathList &aPath)
void StraightToPoint (const WsfPathState &aState, const WsfPathTarget &aTarget, WsfPathList &aPath, bool aAllowHeadingChange)
void Rotate (UtVec3d aRotationAxis, double aArcLength, double aTime, const WsfPathTarget &aTarget, const WsfPathState &aState, WsfPathList &aPath, double aRotationRadius, double aTargetRoll=0.0)
void StraightOnHeading (const WsfPathState &aState, const WsfPathTarget &aTarget, WsfPathList &aPath)
bool ComputeSpeedAltitudeTargets (const WsfPathState &aState, const WsfPathTarget &aTarget, SpeedAltitudeBreakpoint &aBreakpoint)
bool UsingComputedClimbRate ()
void SetUsingComputedClimbRate (bool aBool)
void ForceFlyFlightPath (bool aBool)

Public Attributes

ut::Random * mRandomPtr
WsfPathConstraints mConstraints
double mSimTime
double mIntegrationTime
double mMaximumTurn
double mPathVarianceRadius
double mSpeedVariancePct
WsfPath::Switch mDefaultSwitch
bool mUsingComputedClimbRate
 'true' if the current target has a computed flight angle
bool mUsingComputedLinearAcceleration
 'true' if the current target has a computed linear acceleration
bool mUsingComputedSpeed
 'true' if the current target has a computed speed.
bool mFlyFlightPathToTarget
 'true' use calculated flight path constraints to fly along slope to next target point

Detailed Description

WsfPathComputer computes a WsfPathList for a platform to reach a target state.

Constructor & Destructor Documentation

◆ WsfPathComputer()

Member Function Documentation

◆ ComputePath()

◆ ComputeSpeedAltitudeTargets()

◆ ConstrainTarget()

◆ CreateTarget()

void WsfPathComputer::CreateTarget ( const WsfPathState & aCurrentState,
WsfPathConstraints & aCurrentConstraints,
const WsfPathConstraints & aMoverConstraints,
const WsfWaypoint & aTargetPoint,
const WsfWaypoint * aNextPointPtr,
WsfPathTarget & aTarget )

Given the current state, the next waypoint and the waypoint after, create the 'path target' for ComputePath.

Parameters
aCurrentState[input] The current state.
aCurrentConstraints[input] The current path constraints.
aMoverConstraints[input] The constraints defined in the mover by the user.
aTargetPoint[input] A reference to the target waypoint.
aNextPointPtr[input] A pointer to the waypoint that follows the target waypoint. This is only used if the target waypoint specifies 'turn on approach', and may be 0.
aTarget[output] The created path target.
Note
This is intended to be used in an iterative fashion as one traverses a route as it maintains a persistent state.

Routes are sometimes set up to loop on 1 point. Handle this case explicitly with a 360 turn.

References WsfPathTarget::cALTITUDE, WsfPathConstraints::cDEFAULT_MAX_FLIGHT_ANGLE, WsfPathConstraints::cDEFAULT_MAX_LINEAR_ACCEL, WsfWaypoint::cDISTANCE, WsfPath::cDOUBLE_NOT_SET, WsfPathTarget::cHEADING, WsfPathConstraints::cLARGE_DOUBLE, WsfWaypoint::cLATITUDE_AND_LONGITUDE, WsfPathTarget::cLOCATION, ConstrainTarget(), WsfWaypoint::cRELATIVE_HEADING, WsfPathTarget::cRELATIVE_TURN, WsfPathTarget::cSPEED, WsfPath::cSWITCH_MOVER_DEFAULT, WsfPath::cSWITCH_ON_APPROACH, WsfWaypoint::cTIME, WsfWaypoint::cTIME_TO_POINT, WsfPath::cTURN_DIR_RIGHT, WsfPathTarget::cTURN_ON_APPROACH, WsfPath::cUSE_PREVIOUS, WsfGeoPoint::Extrapolate(), GetConstraints(), WsfWaypoint::GetDistanceOrTime(), WsfWaypoint::GetHeading(), WsfGeoPoint::GetLat(), WsfWaypoint::GetLat(), WsfPathState::GetLocationLLA(), WsfGeoPoint::GetLon(), WsfWaypoint::GetLon(), WsfWaypoint::GetPointType(), WsfWaypoint::GetRadialAccel(), WsfPathState::GetSpeed(), WsfWaypoint::GetSwitch(), WsfWaypoint::GetTurnDirection(), WsfPathTarget::mAltitude, mConstraints, mDefaultSwitch, WsfPathTarget::mDistance, mFlyFlightPathToTarget, WsfPathTarget::mHeading, WsfPathTarget::mLatitude, WsfPathTarget::mLongitude, WsfPathConstraints::mMaxClimbRate, WsfPathConstraints::mMaxFlightPathAngle, WsfPathConstraints::mMaxLinearAccel, WsfPathConstraints::mMaxRadialAccel, WsfPathTarget::mNextPointLat, WsfPathTarget::mNextPointLon, WsfPathTarget::mNextPointRadialAccel, mPathVarianceRadius, mRandomPtr, WsfPathTarget::mSpeed, mSpeedVariancePct, WsfPathTarget::mTargetType, WsfPathTarget::mTime, WsfPathTarget::mTurnDirection, mUsingComputedClimbRate, mUsingComputedLinearAcceleration, and mUsingComputedSpeed.

Referenced by WsfWaypointMover::GetFutureLocationWCS().

◆ ForceFlyFlightPath()

void WsfPathComputer::ForceFlyFlightPath ( bool aBool)
inline

◆ GetConstraints()

WsfPathConstraints & WsfPathComputer::GetConstraints ( )
inline

References mConstraints.

Referenced by CreateTarget(), and RevisePathHitPointAtTime().

◆ GetMaximumTurn()

double WsfPathComputer::GetMaximumTurn ( ) const
inline

References mMaximumTurn.

◆ GetTurnRadius()

double WsfPathComputer::GetTurnRadius ( double aSpeed)

Get the turn radius calculated based on current path constraints.

Parameters
aSpeedSpeed to use in turn radius calculations. (m/s)
Returns
The turn radius. (meters) (default = 0.0 m)

References mConstraints.

Referenced by WsfWaypointMover::TurnRadius(), WsfWaypointMover::TurnRadius(), and TurnRelative().

◆ RevisePathHitPointAtTime()

◆ Rotate()

◆ SetDefaultSwitch()

void WsfPathComputer::SetDefaultSwitch ( WsfPath::Switch aDefaultSwitch)
inline

References mDefaultSwitch.

◆ SetMaximumTurn()

void WsfPathComputer::SetMaximumTurn ( double aMaxTurn)
inline

Sets the maximum turn (radians). Turns greater than the maximum turn are ignored. Determines how hard we'll try to get to points behind us.

References mMaximumTurn.

◆ SetPathVarianceRadius()

void WsfPathComputer::SetPathVarianceRadius ( double aPathVarianceRadius)
inline

References mPathVarianceRadius.

◆ SetRandom()

void WsfPathComputer::SetRandom ( ut::Random * aRandomPtr)
inline

Sets the random device for computation of 'variance' to routes The random device must remain valid until the path computer is destroyed.

References mRandomPtr.

◆ SetSpeedVariancePct()

void WsfPathComputer::SetSpeedVariancePct ( double aSpeedVariancePct)
inline

References mSpeedVariancePct.

◆ SetUsingComputedClimbRate()

void WsfPathComputer::SetUsingComputedClimbRate ( bool aBool)
inline

◆ StraightOnHeading()

◆ StraightToPoint()

◆ TurnRelative()

◆ TurnToHeading()

void WsfPathComputer::TurnToHeading ( const WsfPathState & aState,
const WsfPathTarget & aTarget,
WsfPathList & aPathList,
WsfPathTarget::TurnDirection aTurnDirection )

◆ TurnToPointHeading()

bool WsfPathComputer::TurnToPointHeading ( const WsfPathState & aState,
const WsfPathTarget & aTarget,
WsfPathList & aPath )

◆ UsingComputedClimbRate()

bool WsfPathComputer::UsingComputedClimbRate ( )
inline

Member Data Documentation

◆ mConstraints

◆ mDefaultSwitch

WsfPath::Switch WsfPathComputer::mDefaultSwitch

The default criteria used to determine when a waypoint switch should occur if the waypoint does not specify a switch criteria.

Referenced by CreateTarget(), SetDefaultSwitch(), and WsfPathComputer().

◆ mFlyFlightPathToTarget

bool WsfPathComputer::mFlyFlightPathToTarget

'true' use calculated flight path constraints to fly along slope to next target point

Referenced by CreateTarget(), ForceFlyFlightPath(), and WsfPathComputer().

◆ mIntegrationTime

double WsfPathComputer::mIntegrationTime

Referenced by WsfPathComputer().

◆ mMaximumTurn

double WsfPathComputer::mMaximumTurn

◆ mPathVarianceRadius

double WsfPathComputer::mPathVarianceRadius

◆ mRandomPtr

ut::Random* WsfPathComputer::mRandomPtr

◆ mSimTime

double WsfPathComputer::mSimTime

Referenced by WsfPathComputer().

◆ mSpeedVariancePct

double WsfPathComputer::mSpeedVariancePct

◆ mUsingComputedClimbRate

bool WsfPathComputer::mUsingComputedClimbRate

'true' if the current target has a computed flight angle

Referenced by CreateTarget(), SetUsingComputedClimbRate(), UsingComputedClimbRate(), and WsfPathComputer().

◆ mUsingComputedLinearAcceleration

bool WsfPathComputer::mUsingComputedLinearAcceleration

'true' if the current target has a computed linear acceleration

Referenced by CreateTarget(), and WsfPathComputer().

◆ mUsingComputedSpeed

bool WsfPathComputer::mUsingComputedSpeed

'true' if the current target has a computed speed.

Referenced by CreateTarget(), RevisePathHitPointAtTime(), and WsfPathComputer().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved