ICAROUS
|
#include <TrafficState.h>
Public Types | |
typedef std::vector< TrafficState >::size_type | nat |
Public Member Functions | |
TrafficState () | |
void | setAirVelocity (const Velocity &new_avel) |
void | setPosition (const Position &new_pos) |
void | setAsOwnship () |
void | setAsIntruderOf (const TrafficState &ownship) |
TrafficState | makeIntruder (const std::string &id, const Position &pos, const Velocity &vel) const |
void | setAlerterIndex (int alerter) |
int | getAlerterIndex () const |
void | applyWindVector (const Velocity &wind_vector) |
Velocity | windVector () const |
const EuclideanProjection & | getEuclideanProjection () const |
const Vect3 & | get_s () const |
const Velocity & | get_v () const |
Vect3 | pos_to_s (const Position &p) const |
Velocity | vel_to_v (const Position &p, const Velocity &v) const |
Velocity | inverseVelocity (const Velocity &v) const |
TrafficState | linearProjection (double offset) const |
std::string | formattedHeader (const std::string &utrk, const std::string &uxy, const std::string &ualt, const std::string &ugs, const std::string &uvs) const |
std::string | formattedTrafficState (const std::string &utrk, const std::string &uxy, const std::string &ualt, const std::string &ugs, const std::string &uvs, double time) const |
std::string | formattedTraffic (const std::vector< TrafficState > &traffic, const std::string &utrk, const std::string &uxy, const std::string &ualt, const std::string &ugs, const std::string &uvs, double time) const |
std::string | toPVS () const |
std::string | listToPVSAircraftList (const std::vector< TrafficState > &traffic) const |
bool | isValid () const |
bool | isLatLon () const |
const std::string & | getId () const |
const Position & | getPosition () const |
const Velocity & | getAirVelocity () const |
const Velocity & | getGroundVelocity () const |
const Velocity & | getVelocity () const |
const Position & | positionXYZ () const |
const Velocity & | velocityXYZ () const |
double | horizontalDirection () const |
double | horizontalDirection (const std::string &utrk) const |
double | horizontalSpeed () const |
double | horizontalSpeed (const std::string &ugs) const |
double | verticalSpeed () const |
double | verticalSpeed (const std::string &uvs) const |
double | altitude () const |
double | altitude (const std::string &ualt) const |
const SUMData & | sum () const |
void | setHorizontalPositionUncertainty (double s_EW_std, double s_NS_std, double s_EN_std) |
void | setVerticalPositionUncertainty (double sz_std) |
void | setHorizontalVelocityUncertainty (double v_EW_std, double v_NS_std, double v_EN_std) |
void | setVerticalSpeedUncertainty (double vz_std) |
void | resetUncertainty () |
bool | sameId (const TrafficState &ac) const |
std::string | toString () const |
Static Public Member Functions | |
static const TrafficState & | INVALID () |
static TrafficState | makeOwnship (const std::string &id, const Position &pos, const Velocity &vel) |
static int | findAircraftIndex (const std::vector< TrafficState > &traffic, const std::string &id) |
static std::string | listToString (const std::vector< std::string > &traffic) |
static std::string | formattedTrafficList (const std::vector< TrafficState > &traffic, const std::string &utrk, const std::string &uxy, const std::string &ualt, const std::string &ugs, const std::string &uvs, double time) |
static std::string | listToPVSStringList (const std::vector< std::string > &traffic) |
Private Member Functions | |
TrafficState (const std::string &id, const Position &pos, const Velocity &vel) | |
TrafficState (const std::string &id, const Position &pos, const Velocity &vel, EuclideanProjection eprj, int alerter) | |
void | applyEuclideanProjection () |
Private Attributes | |
std::string | id_ |
Position | pos_ |
Velocity | gvel_ |
Velocity | avel_ |
EuclideanProjection | eprj_ |
int | alerter_ |
SUMData | sum_ |
Position | posxyz_ |
Vect3 | sxyz_ |
Velocity | velxyz_ |
Horizontal solution
larcfm::TrafficState::TrafficState | ( | ) |
Create an non-valid aircraft state
|
private |
Create a traffic state that is not lat/lon
id | Aircraft's identifier |
pos | Aircraft's position |
vel | Aircraft's ground velocity |
|
private |
Create a traffic state
id | Aircraft's identifier |
pos | Aircraft's position |
vel | Aircraft's ground velocity |
eprj | Euclidean projection |
double larcfm::TrafficState::altitude | ( | ) | const |
Returns current altitude in internal units
double larcfm::TrafficState::altitude | ( | const std::string & | ualt | ) | const |
Returns current altitude in given units
|
private |
Apply Euclidean projection. Requires aircraft's position in lat/lon
eprj |
Apply Euclidean projection. Requires aircraft's position in lat/lon
void larcfm::TrafficState::applyWindVector | ( | const Velocity & | wind_vector | ) |
Set wind velocity
wind_vector | Wind velocity specified in the TO direction |
|
static |
Index of aircraft id in traffic list. If aircraft is not in the list, returns -1
traffic | |
id |
const Velocity & larcfm::TrafficState::getAirVelocity | ( | ) | const |
int larcfm::TrafficState::getAlerterIndex | ( | ) | const |
const EuclideanProjection & larcfm::TrafficState::getEuclideanProjection | ( | ) | const |
Return Euclidean projection
const Velocity & larcfm::TrafficState::getGroundVelocity | ( | ) | const |
const std::string & larcfm::TrafficState::getId | ( | ) | const |
const Position & larcfm::TrafficState::getPosition | ( | ) | const |
const Velocity & larcfm::TrafficState::getVelocity | ( | ) | const |
double larcfm::TrafficState::horizontalDirection | ( | ) | const |
Returns current horizontal direction in internal units [0 - 2pi] [rad] (clock-wise with respect to North) Direction may be heading or track, depending on whether a wind vector was provided or not.
double larcfm::TrafficState::horizontalDirection | ( | const std::string & | utrk | ) | const |
Returns current direction in given units [0 - 2pi] [u] (clock wise with respect to North) Direction may be heading or track, depending on whether a wind vector was provided or not.
double larcfm::TrafficState::horizontalSpeed | ( | ) | const |
Returns current horizontal speed in internal units. Horizontal speed may be air speed or group speed, depending on whether a wind vector was provided or not.
double larcfm::TrafficState::horizontalSpeed | ( | const std::string & | ugs | ) | const |
Returns current horizontal speed in given units. Horizontal speed may be air speed or group speed, depending on whether a wind vector was provided or not.
bool larcfm::TrafficState::isLatLon | ( | ) | const |
bool larcfm::TrafficState::isValid | ( | ) | const |
TrafficState larcfm::TrafficState::linearProjection | ( | double | offset | ) | const |
Project aircraft state offset time, which can be positive or negative, in the direction of the air velocity. This methods doesn't change ownship, i.e., the resulting aircraft is considered as another intruder.
offset | Offset time. |
TrafficState larcfm::TrafficState::makeIntruder | ( | const std::string & | id, |
const Position & | pos, | ||
const Velocity & | vel | ||
) | const |
Make intruder aircraft
id | Intruder's identifier |
pos | Intruder's position |
vel | Intruder's ground velocity |
|
static |
Make an ownship's aircraft
id | Ownship's identifier |
pos | Ownship's position |
vel | Ownship's ground velocity |
void larcfm::TrafficState::resetUncertainty | ( | ) |
Set all uncertainties to 0
void larcfm::TrafficState::setAlerterIndex | ( | int | alerter | ) |
Set alerter index for this aircraft
alerter |
void larcfm::TrafficState::setAsIntruderOf | ( | const TrafficState & | ownship | ) |
Set aircraft as intruder of ownship
void larcfm::TrafficState::setAsOwnship | ( | ) |
Set aircraft as ownship
void larcfm::TrafficState::setHorizontalPositionUncertainty | ( | double | s_EW_std, |
double | s_NS_std, | ||
double | s_EN_std | ||
) |
s_EW_std: East/West position standard deviation in internal units s_NS_std: North/South position standard deviation in internal units s_EN_std: East/North position standard deviation in internal units
void larcfm::TrafficState::setHorizontalVelocityUncertainty | ( | double | v_EW_std, |
double | v_NS_std, | ||
double | v_EN_std | ||
) |
v_EW_std: East/West velocity standard deviation in internal units v_NS_std: North/South velocity standard deviation in internal units v_EN_std: East/North velocity standard deviation in internal units
void larcfm::TrafficState::setVerticalPositionUncertainty | ( | double | sz_std | ) |
sz_std : Vertical position standard deviation in internal units
void larcfm::TrafficState::setVerticalSpeedUncertainty | ( | double | vz_std | ) |
vz_std : Vertical velocity standard deviation in internal units
const SUMData & larcfm::TrafficState::sum | ( | ) | const |
double larcfm::TrafficState::verticalSpeed | ( | ) | const |
Returns current vertical speed in internal units
double larcfm::TrafficState::verticalSpeed | ( | const std::string & | uvs | ) | const |
Returns current vertical speed in given units
Velocity larcfm::TrafficState::windVector | ( | ) | const |
Return wind velocity in the to direction