ICAROUS
|
#include <TcpData.h>
Public Types | |
enum | WayType { Orig , Virtual , AltPreserve , UNKNOWN_WT } |
enum | TrkTcpType { NONE , BOT , EOT , EOTBOT , MOT , UNKNOWN_TRK } |
enum | GsTcpType { NONEg , BGS , EGS , EGSBGS , UNKNOWN_GS } |
enum | VsTcpType { NONEv , BVS , EVS , EVSBVS , UNKNOWN_VS } |
Public Member Functions | |
TcpData (const TcpData &data) | |
std::string | getTypeString () const |
bool | isVirtual () const |
bool | isOriginal () const |
bool | isAltPreserve () const |
void | setType (const std::string &t) |
TcpData | copy () const |
TcpData | setVirtual () |
TcpData | setOriginal () |
TcpData | setAltPreserve () |
void | reset () |
std::string | getTrkTypeString () const |
std::string | getGsTypeString () const |
std::string | getVsTypeString () const |
double | getRadiusSigned () const |
int | turnDir () const |
TcpData | setRadiusSigned (double r) |
Position | turnCenter () const |
TcpData | setTurnCenter (const Position ¢er) |
double | getGsAccel () const |
TcpData | setGsAccel (double ga) |
double | getVsAccel () const |
TcpData | setVsAccel (double va) |
TcpData | setVelocityInit (const Velocity &v) |
std::string | getInformation () const |
void | setInformation (const std::string &info) |
void | appendInformation (const std::string &info) |
void | appendInformationNoDuplication (const std::string &info) |
TcpData | setBOT (double signedRadius, const Position ¢er) |
void | clearTrk () |
TcpData | clearBOT () |
TcpData | clearEOT () |
TcpData | clearBGS () |
TcpData | clearEGS () |
TcpData | clearBVS () |
TcpData | clearEVS () |
TcpData | setEOT () |
TcpData | addBOT (double signedRadius, Position center) |
TcpData | addEOT () |
TcpData | setEOTBOT (double signedRadius, const Position ¢er) |
TcpData | setMOT (bool b) |
TcpData | setBGS (double a) |
TcpData | addEGS () |
void | clearGs () |
TcpData | setEGS () |
TcpData | setEGSBGS (double a) |
TcpData | setBVS (double a) |
void | clearVs () |
TcpData | setEVS () |
TcpData | addEVS () |
TcpData | setEVSBVS (double a) |
bool | isInvalid () const |
bool | isTCP () const |
bool | isTrkTCP () const |
bool | isBOT () const |
bool | isEOT () const |
bool | isMOT () const |
bool | isGsTCP () const |
bool | isEGSBGS () const |
bool | isBGS () const |
bool | isEGS () const |
bool | isEVSBVS () const |
bool | isVsTCP () const |
bool | isBVS () const |
bool | isEVS () const |
bool | isBeginTCP () const |
bool | isEndTCP () const |
bool | isDefined () const |
bool | mergeable (const TcpData &point) const |
TcpData | mergeTCPData (const TcpData &point) const |
std::pair< TcpData, std::string > | parseMetaDataLabel (const std::string &tlabel) |
std::string | tcpTypeString () const |
std::string | metaDataLabel (int precision) const |
std::string | toString () const |
std::string | toStringTcpType () const |
Static Public Member Functions | |
static std::string | toStringWayType (WayType t) |
static TcpData::WayType | valueOfWayType (const std::string &t) |
static std::string | toStringTrkType (TrkTcpType t) |
static TcpData::TrkTcpType | valueOfTrkType (const std::string &t) |
static std::string | toStringGsType (GsTcpType t) |
static TcpData::GsTcpType | valueOfGsType (const std::string &t) |
static std::string | toStringVsType (VsTcpType t) |
static TcpData::VsTcpType | valueOfVsType (const std::string &t) |
static TcpData | makeFull (const std::string &ty, const std::string &tcp_trk, const std::string &tcp_gs, const std::string &tcp_vs, double radiusSigned, const Position ¢er, double accel_gs, double accel_vs) |
static TcpData | makeInvalid () |
static TcpData | makeOrig () |
static std::string | fullName (const NavPoint &p, const TcpData &d) |
static std::pair< NavPoint, TcpData > | parseLL (const std::string &s) |
static std::pair< NavPoint, TcpData > | parseXYZ (const std::string &s) |
static TcpData::TrkTcpType | toTrkTCP (int ty) |
static TcpData::GsTcpType | toGsTCP (int ty) |
static TcpData::VsTcpType | toVsTCP (int ty) |
Static Public Attributes | |
static const int | TCP_OUTPUT_COLUMNS = 20 |
static const int | MIN_OUTPUT_COLUMNS = 5 |
static bool | motFlagInInfo = false |
static std::string | MOTflag = ".<MOT>." |
Private Attributes | |
WayType | ty |
TrkTcpType | tcpTrk |
GsTcpType | tcpGs |
VsTcpType | tcpVs |
double | radiusSigned |
Position | centerTurn |
double | accelGs |
double | accelVs |
std::string | information |
A data structure to maintain certain information related to a trajectory change point (TCP). Typically, this information is associated with a NavPoint through a Plan. The major purpose of this class is to store the relevant TCP information (e.g., status information, acceleration values, etc.).
Possible types of points.
Each point can be a turn point (essentially a horizontal acceleration point), a ground speed acceleration point, or a vertical speed acceleration point. These points are indicated by either being the beginning of an acceleration zone or the end of an acceleration zone. Thus, there are methods to indicate the beginning of a turn (isBOT), or the end of the a turn (isEOT), similarly for ground speed of vertical speed.
UNKNOWN values should ONLY be used when parsing a string representation fails
Major types of NavPoints, UNKNOWN_WT only used when parsing a string representation
Set this point as a "beginning of turn" point.
signedRadius | right turns have a positive radius, left turns have a negative radius |
center | center of turn |
TcpData larcfm::TcpData::addEGS | ( | ) |
Set this point as an "end ground speed" point, either a EGS or an EGSBGS
TcpData larcfm::TcpData::addEOT | ( | ) |
Set this point as an "end of turn" point, either an EOTBOT or an EOT
TcpData larcfm::TcpData::addEVS | ( | ) |
Set this point as an "end vertical speed" point, either a EVS or an EVSBVS
TcpData larcfm::TcpData::copy | ( | ) | const |
double larcfm::TcpData::getRadiusSigned | ( | ) | const |
Get signed radius. Note: a return value of 0 indicates no specified radius
bool larcfm::TcpData::isBeginTCP | ( | ) | const |
true if this point is one of the beginning TCP points, including the combined points (e.g., EOTBOT)
bool larcfm::TcpData::isBGS | ( | ) | const |
true if this point is a beginning of ground speed change point
bool larcfm::TcpData::isBOT | ( | ) | const |
true if this point is the start of a turn
bool larcfm::TcpData::isBVS | ( | ) | const |
true if this point is the start of a vs change
bool larcfm::TcpData::isDefined | ( | ) | const |
Return true if, for the given type, this TcpData has values for the necessary fields
bool larcfm::TcpData::isEGS | ( | ) | const |
true if this point is a end of ground speed change point
bool larcfm::TcpData::isEGSBGS | ( | ) | const |
true if this point is a beginning of ground speed change point
bool larcfm::TcpData::isEndTCP | ( | ) | const |
true if this point is one of the ending TCP points, including the combined points (e.g., EOTBOT)
bool larcfm::TcpData::isEOT | ( | ) | const |
true if this point is the end of a turn
bool larcfm::TcpData::isEVS | ( | ) | const |
true if this point is the end of a vs change
bool larcfm::TcpData::isEVSBVS | ( | ) | const |
true if this point is the start of a vs change
bool larcfm::TcpData::isGsTCP | ( | ) | const |
true if this point is a ground speed point
bool larcfm::TcpData::isTCP | ( | ) | const |
true if this point is a TCP
bool larcfm::TcpData::isTrkTCP | ( | ) | const |
true if this point is part of a turn
bool larcfm::TcpData::isVsTCP | ( | ) | const |
true if this point is part of a vs change
|
static |
bool larcfm::TcpData::mergeable | ( | const TcpData & | point | ) | const |
Can this point be merged with the given point p?
point | the other point |
Can this point be merged with the given point p? Merged points only apply to TCP points.
point | the other point |
Creates a new point that is the merger of the this point and the given point. Assumes that mergeable() on the two points would return true, if not, then approximately the original point is returned.
Merging rules:
point | the other point |
Creates a new point that is the merger of the this point and the given point. Assumes that mergeable() on the two points would return true, if not, then approximately the original point is returned.
Merging rules:
point | the other point |
std::string larcfm::TcpData::metaDataLabel | ( | int | precision | ) | const |
Return a string representation of TCP meta data (or the empty string if none)
t | time of the associated NavPoint |
precision | number of digits of precision |
std::pair< TcpData, std::string > larcfm::TcpData::parseMetaDataLabel | ( | const std::string & | tlabel | ) |
This parses the label generated for TCP types to reconstruct the meta-data of the point.
It returns either the same point (if no significant data is in the label) or a fully reconstructed TCP type. The reconstructed TCP will have a label field that does not contain any TCP metadata – you will need to call name() or tcpLabel() to retrieve the full string. If it is detected that this string uses the old metatdata format, this returns an invalid NavPoint::
void larcfm::TcpData::reset | ( | ) |
Reset the TcpData into a blank configuration, except for the source position, source time, and linear index, these are retained.
TcpData larcfm::TcpData::setAltPreserve | ( | ) |
Set this object to "AltPreserve"
TcpData larcfm::TcpData::setBGS | ( | double | a | ) |
Set this point as a "beginning of ground speed change" point
a | acceleration |
Set this point as a "beginning of turn" point.
signedRadius | right turns have a positive radius, left turns have a negative radius |
center | center of turn |
TcpData larcfm::TcpData::setBVS | ( | double | a | ) |
Set this point as a "beginning of vertical speed change" point
a | acceleration |
TcpData larcfm::TcpData::setEGS | ( | ) |
Set this point as a "ending of ground speed change" point
TcpData larcfm::TcpData::setEGSBGS | ( | double | a | ) |
Set this point as a combined "end of ground speed change and beginning of ground speed change" point
a | acceleration |
TcpData larcfm::TcpData::setEOT | ( | ) |
Set this point as a "end of turn" point.
Set this point as a combined "end of turn and beginning of turn" point.
signedRadius | radius |
center | the center of turn |
TcpData larcfm::TcpData::setEVS | ( | ) |
Set this point as an "ending of vertical speed change" point
TcpData larcfm::TcpData::setEVSBVS | ( | double | a | ) |
Set this point as a combined "ending of vertical speed change and beginning of vertical speed change" point
a | acceleration |
TcpData larcfm::TcpData::setOriginal | ( | ) |
Set this object to "Original"
Set the initial velocity for this TcpData data object to the given value. This must be the correct value for points defining the entry into acceleration zones (BOT, BGSC, BVSC).
TcpData larcfm::TcpData::setVirtual | ( | ) |
Set this object to "Virtual"
TcpData larcfm::TcpData::setVsAccel | ( | double | va | ) |
Set the vertical acceleration rate to the given value
va | vertical acceleration |