15#ifndef WSFWAYPOINT_HPP
16#define WSFWAYPOINT_HPP
18#include "wsf_export.h"
24#include "UtCloneablePtr.hpp"
93 return ((mLat == aRhs.mLat) && (mLon == aRhs.mLon) && (mAlt == aRhs.mAlt));
100 void ExtrapolateAlongHeading(
double aHeading);
102 static std::unique_ptr<UtScriptClass> CreateScriptClass(
const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
104 void GreatCircleHeadingAndDistance(
const WsfWaypoint& aWaypoint,
double& aHeading,
double& aDistance)
const;
106 void Print(ut::log::MessageStream& aStream)
const;
108 void SetCallback(
WsfObject* aCallbackPtr);
130 void SetLat(
double aLat) { mLat = aLat; }
133 void SetLon(
double aLon) { mLon = aLon; }
136 void SetAlt(
double aAlt) { mAlt = aAlt; }
138 void GetLocationLLA(
double& aLat,
double& aLon,
double& aAlt)
const;
139 void SetLocationLLA(
double aLat,
double aLon,
double aAlt);
178 void SetRouteId(
unsigned int aRouteId) { mRouteId = aRouteId; }
199 void SerializeP(T& aBuff);
203 ut::CloneablePtr<WsfObject> mCallbackPtr;
212 int mPointType = cLATITUDE_AND_LONGITUDE;
231 double mDistanceOrTime = 0.0;
234 double mDistanceAlongRoute = 0.0;
264 double mPauseTime = 0.0;
311 unsigned int mRouteId = 0;
320 unsigned int mNodeIdNumber = 0;
323 unsigned int mPositionInRoute = 0;
bool operator==(int aId, const WsfStringInt &aRhs)
Equal relational operator for the case of an integer on the LHS and a StringId on the RHS.
Definition WsfStringId.hpp:69
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
bool ProcessInput(UtInput &aInput)
Definition WsfAuxDataEnabled.cpp:95
WsfAuxDataEnabled()=default
Definition WsfGeoPoint.hpp:29
Definition WsfObject.hpp:40
Definition WsfWaypoint.hpp:57
@ cTIME_TO_POINT
Specifies time duration to reach point.
Definition WsfWaypoint.hpp:72
@ cDURATION_MASK
Utility value to mask off time and distance commands.
Definition WsfWaypoint.hpp:73
@ cABSOLUTE_HEADING
A specified heading is absolute (north-relative).
Definition WsfWaypoint.hpp:66
@ cLATITUDE_AND_LONGITUDE
A (latitude, longitude) waypoint (altitude is optional).
Definition WsfWaypoint.hpp:62
@ cRELATIVE_OFFSET
A WsfWaypoint specified as an (X,Y,Z) relative offset.
Definition WsfWaypoint.hpp:63
@ cLOCATION_MASK
Utility value to mask off location commands.
Definition WsfWaypoint.hpp:64
@ cRELATIVE_HEADING
A specified heading is relative (usually body-relative).
Definition WsfWaypoint.hpp:67
@ cHEADING_MASK
Utility value to mask off heading commands.
Definition WsfWaypoint.hpp:68
@ cTIME
Specifies a target elapsed time value.
Definition WsfWaypoint.hpp:71
@ cDISTANCE
Specifies a target elapsed distance value.
Definition WsfWaypoint.hpp:70
void SetNewModeId(WsfStringId aNewModeId)
Definition WsfWaypoint.hpp:124
WsfWaypoint(WsfWaypoint &&)=default
unsigned int GetRouteId() const
Definition WsfWaypoint.hpp:177
double GetSpeed() const
Definition WsfWaypoint.hpp:157
WsfStringId GetGotoId() const
Definition WsfWaypoint.hpp:120
double GetHeading() const
Definition WsfWaypoint.hpp:141
unsigned int GetPositionInRoute() const
Definition WsfWaypoint.hpp:186
int GetPointType() const
Definition WsfWaypoint.hpp:126
WsfStringId GetScriptId() const
Definition WsfWaypoint.hpp:117
void SetAltRef(WsfPath::AltRef aAltRef)
Definition WsfWaypoint.hpp:166
void SetNodeIdNumber(unsigned int aNodeIdNumber)
Definition WsfWaypoint.hpp:184
void SetRouteId(unsigned int aRouteId)
Definition WsfWaypoint.hpp:178
WsfStringId GetLabelId() const
Definition WsfWaypoint.hpp:114
double GetLinearAccel() const
Definition WsfWaypoint.hpp:144
void SetDistanceOrTime(double aDistanceOrTime)
Definition WsfWaypoint.hpp:163
unsigned int GetNodeIdNumber() const
Definition WsfWaypoint.hpp:183
WsfPath::TurnDirection GetTurnDirection() const
Definition WsfWaypoint.hpp:171
WsfPath::Switch GetSwitch() const
Definition WsfWaypoint.hpp:174
double GetClimbRate() const
Definition WsfWaypoint.hpp:150
void SetLinearAccel(double aLinearAccel)
Definition WsfWaypoint.hpp:145
bool ProcessAllInput(UtInput &aInput)
Definition WsfWaypoint.cpp:119
bool operator==(const WsfWaypoint &aRhs) const
Definition WsfWaypoint.hpp:91
void SetTurnDirection(WsfPath::TurnDirection aTurnDirection)
Definition WsfWaypoint.hpp:172
WsfWaypoint & operator=(WsfWaypoint &&)=default
WsfPath::EndPath GetEndOfPathOption() const
Definition WsfWaypoint.hpp:168
double GetAlt() const
Definition WsfWaypoint.hpp:135
void SetMaximumFlightPathAngle(double aMaximumFlightPathAngle)
Definition WsfWaypoint.hpp:154
void SetSwitch(WsfPath::Switch aSwitch)
Definition WsfWaypoint.hpp:175
double GetRadialAccel() const
Definition WsfWaypoint.hpp:147
void SetLabelId(WsfStringId aLabelId)
Definition WsfWaypoint.hpp:115
double GetLat() const
Definition WsfWaypoint.hpp:129
void SetAlt(double aAlt)
Definition WsfWaypoint.hpp:136
WsfPath::AltRef GetAltRef() const
Definition WsfWaypoint.hpp:165
double GetLon() const
Definition WsfWaypoint.hpp:132
void SetSpeed(double aSpeed)
Definition WsfWaypoint.hpp:156
WsfStringId GetNodeId() const
Definition WsfWaypoint.hpp:180
void SetLon(double aLon)
Definition WsfWaypoint.hpp:133
void SetEndOfPathOption(WsfPath::EndPath aEndOfPathOption)
Definition WsfWaypoint.hpp:169
void SetGotoId(WsfStringId aGotoId)
Definition WsfWaypoint.hpp:121
double GetPauseTime() const
Definition WsfWaypoint.hpp:111
void SetPositionInRoute(unsigned int aPositionInRoute)
Definition WsfWaypoint.hpp:187
void SetDistanceAlongRoute(double aDistanceAlongRoute)
Definition WsfWaypoint.hpp:160
void SetHeading(double aHeading)
Definition WsfWaypoint.hpp:142
WsfWaypoint & operator=(const WsfWaypoint &)=default
bool operator!=(const WsfWaypoint &aRhs) const
Definition WsfWaypoint.hpp:98
WsfStringId GetNewModeId() const
Definition WsfWaypoint.hpp:123
void SetPointType(int aPointType)
Definition WsfWaypoint.hpp:127
void SetScriptId(WsfStringId aScriptId)
Definition WsfWaypoint.hpp:118
void SetRadialAccel(double aRadialAccel)
Definition WsfWaypoint.hpp:148
void SetClimbRate(double aClimbRate)
Definition WsfWaypoint.hpp:151
double GetMaximumFlightPathAngle() const
Definition WsfWaypoint.hpp:153
WsfWaypoint * Clone() const
Clone constructs a new WsfWaypoint equivalent to the (*this) object.
Definition WsfWaypoint.cpp:83
double GetDistanceAlongRoute() const
Definition WsfWaypoint.hpp:159
void SetNodeId(WsfStringId aNodeId)
Definition WsfWaypoint.hpp:181
WsfWaypoint(const WsfWaypoint &)=default
~WsfWaypoint() override=default
void SetLat(double aLat)
Definition WsfWaypoint.hpp:130
double GetDistanceOrTime() const
Definition WsfWaypoint.hpp:162
void SetPauseTime(double aPauseTime)
Definition WsfWaypoint.hpp:112
AltRef
Altitude reference option.
Definition WsfPath.hpp:52
@ cALT_REF_MOVER_DEFAULT
Use the WsfMover altitude reference.
Definition WsfPath.hpp:53
constexpr double cUSE_PREVIOUS
A waypoint parameter with this value is a request to use the previously used value....
Definition WsfPath.hpp:32
TurnDirection
Turn direction for TurnToHeading and TurnToRelativeHeading.
Definition WsfPath.hpp:88
@ cTURN_DIR_SHORTEST
Turn in the direction that results in the shortest turn (DEFAULT).
Definition WsfPath.hpp:90
Switch
Option setting when to react as a WsfWaypoint is approached.
Definition WsfPath.hpp:76
@ cSWITCH_MOVER_DEFAULT
Use the WsfMover switch setting.
Definition WsfPath.hpp:77
EndPath
End of-path option.
Definition WsfPath.hpp:67
@ cEP_MOVER_DEFAULT
Use the WsfMover end-of-path option.
Definition WsfPath.hpp:68