ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
larcfm::CDSIPolygon Class Reference

#include <CDSIPolygon.h>

Inheritance diagram for larcfm::CDSIPolygon:
larcfm::ErrorReporter larcfm::DetectionPolygonAcceptor

Public Member Functions

 CDSIPolygon (DetectionPolygon *d)
 
int size () const
 
bool conflict () const
 
double getTimeIn (int i) const
 
double getTimeOut (int i) const
 
double getTimeClosest (int i) const
 
double getDistanceClosest (int i) const
 
bool violation (const Position &so, const Velocity &vo, const PolyPath &intent, double tm) const
 
bool detection (const Position &so, const Velocity &vo, double t0, double state_horizon, PolyPath &intent, double B, double T)
 
bool detectionXYZ (Vect3 so, const Velocity &vo, double t0, double state_horizon, PolyPath &intent, double B, double T)
 
bool detectionLL (const LatLonAlt &so, const Velocity &vo, double t0, double state_horizon, PolyPath &intent, double B, double T)
 
bool conflictOnlyXYZ (const Vect3 &so, const Velocity &vo, double t0, double state_horizon, PolyPath &intent, double B, double T) const
 
bool conflictOnlyLL (const LatLonAlt &so, const Velocity &vo, double t0, double state_horizon, PolyPath &intent, double B, double T) const
 
std::string toString () const
 
bool hasError () const
 
bool hasMessage () const
 
std::string getMessage ()
 
std::string getMessageNoClear () const
 
void setCorePolygonDetectionPtr (const DetectionPolygon *d)
 
void setCorePolygonDetectionRef (const DetectionPolygon &d)
 
DetectionPolygongetCorePolygonDetectionPtr () const
 
DetectionPolygongetCorePolygonDetectionRef () const
 

Static Public Member Functions

static bool cdsicore (const Position &so, const Velocity &vo, double t0, double state_horizon, PolyPath &intent, double B, double T)
 

Private Member Functions

void captureOutput (double t_base, int conf, DetectionPolygon *cd)
 
void merge ()
 

Private Attributes

std::vector< double > tin
 
std::vector< double > tout
 
std::vector< double > tca
 
std::vector< double > dist_tca
 
DetectionPolygoncdss
 
ErrorLog error
 

Static Private Attributes

static CDSIPolygon def = CDSIPolygon(new CDPolyIter())
 

Detailed Description

This class implements the core algorithms for conflict detection between an ownship (modeled with a state vector) and a traffic aircraft trajectory (modeled with a intent). This class assumes all inputs are in internal units. As such, this class is most appropriate to be part of a larger system, not as a stand-alone conflict detection algorithm. For that functionality, see the class CDSI.

This class can be used two ways: through an object or through a static method. The static method approach has the advantage that an object does not need to be created. The object approach has the advantage that more information is available. Specifically, the start and end times for every conflict are available in the object approach.

In addition, for each of these types of use, the aircraft can be specified in two different coordinate systems: a Euclidean space and a latitude and longitude reference frame.

Constructor & Destructor Documentation

◆ CDSIPolygon()

larcfm::CDSIPolygon::CDSIPolygon ( DetectionPolygon d)
explicit

Create a new conflict detection (state information for the ownship and intent information for the traffic) object with the given parameters for the minimum horizontal distance and the minimum vertical information.

Member Function Documentation

◆ cdsicore()

bool larcfm::CDSIPolygon::cdsicore ( const Position so,
const Velocity vo,
double  t0,
double  state_horizon,
PolyPath intent,
double  B,
double  T 
)
static

Returns if there is a conflict between two aircraft: the state aircraft and the intent aircraft. The state aircraft is assumed to move linearly from it position. The intent aircraft is assumed to move according to the given flight plan.

Parameters
sothe Position of the state aircraft
vothe velocity of the state aircraft
t0the time of the state aircraft when located at so with respect to the traffic intent. This can be 0.0 to represent "now"
state_horizonthe largest time where the state aircraft's position can be predicted.
intentthe flight plan of the intent aircraft
Dthe minimum horizontal separation distance
Hthe minimum vertical separation distance
Bthe time to start looking for conflicts relative to t0. This can be 0.0.
Tthe time to end looking for conflicts relative to t0
Returns
true if there is a conflict

◆ conflict()

bool larcfm::CDSIPolygon::conflict ( ) const

Returns if there were any conflicts

◆ conflictOnlyLL()

bool larcfm::CDSIPolygon::conflictOnlyLL ( const LatLonAlt so,
const Velocity vo,
double  t0,
double  state_horizon,
PolyPath intent,
double  B,
double  T 
) const

EXPERIMENTAL

Parameters
so
vo
t0
state_horizon
intent
B
T
Returns
true if conflict

◆ detection()

bool larcfm::CDSIPolygon::detection ( const Position so,
const Velocity vo,
double  t0,
double  state_horizon,
PolyPath intent,
double  B,
double  T 
)

Returns if there is a conflict between two aircraft: the state aircraft and the intent aircraft. The state aircraft is assumed to move linearly from it position. The intent aircraft is assumed to move according to the given flight plan.

Parameters
sothe position of the state aircraft
vovelocity of the state aircraft
t0the time of the state aircraft when located at so with respect to the traffic intent. This can be 0.0 to represent "now"
state_horizonthe maximum amount of time after t0 that the position of the state aircraft's position can be predicted
intentthe flight plan of the intent aircraft
Bthe time to start looking for conflicts relative to t0. This can be 0.0.
Tthe time to end looking for conflicts relative to t0
Returns
true if there is a conflict

◆ detectionLL()

bool larcfm::CDSIPolygon::detectionLL ( const LatLonAlt so,
const Velocity vo,
double  t0,
double  state_horizon,
PolyPath intent,
double  B,
double  T 
)

Returns if there is a conflict between two aircraft: the state aircraft and the intent aircraft. The state aircraft is assumed to move linearly from it position. The intent aircraft is assumed to move according to the given flight plan. Both aircraft are assumed to be represented in a latitude/longitude reference frame.

Parameters
sothe latitude/longitude/altitude of the state aircraft
vovelocity of the state aircraft
t0the time of the state aircraft when located at (lat, lon, alt). This can be 0.0 to represent "now"
state_horizonthe maximum amount of time after t0 that the position of the state aircraft's position can be predicted
intentthe flight plan of the intent aircraft
Bthe time to start looking for conflicts relative to t0. This can be 0.0.
Tthe time to end looking for conflicts relative to t0
Returns
true if there is a conflict

◆ detectionXYZ()

bool larcfm::CDSIPolygon::detectionXYZ ( Vect3  so,
const Velocity vo,
double  t0,
double  state_horizon,
PolyPath intent,
double  B,
double  T 
)

Returns if there is a conflict between two aircraft: the state aircraft and the intent aircraft. The state aircraft is assumed to move linearly from it position. The intent aircraft is assumed to move according to the given flight plan. Both aircraft are assumed to be represented in a Euclidean reference frame at the time t0.

Parameters
sothe position of the state aircraft
vovelocity of the state aircraft
t0the time of the state aircraft when located at (so.x,so.y,so.z). This can be 0.0 to represent "now"
state_horizonthe maximum amount of time after t0 that the position of the state aircraft's position can be predicted
intentthe flight plan of the intent aircraft
Bthe time to start looking for conflicts relative to t0. This can be 0.0.
Tthe time to end looking for conflicts relative to t0
Returns
true if there is a conflict

◆ getCorePolygonDetectionPtr()

DetectionPolygon * larcfm::CDSIPolygon::getCorePolygonDetectionPtr ( ) const
virtual

Return a pointer to this object's Detection3D instance.

Implements larcfm::DetectionPolygonAcceptor.

◆ getCorePolygonDetectionRef()

DetectionPolygon & larcfm::CDSIPolygon::getCorePolygonDetectionRef ( ) const
virtual

Return a reference to this object's Detection3D instance.

Implements larcfm::DetectionPolygonAcceptor.

◆ getDistanceClosest()

double larcfm::CDSIPolygon::getDistanceClosest ( int  i) const

Returns the cylindrical distance at the time of closest approach.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ getMessage()

std::string larcfm::CDSIPolygon::getMessage ( )
virtual

Return a string representation of any errors or warnings. Calling this method will clear any messages and reset both the error and warning status to none.

Returns
error and warning messages. If there are no messages, an empty string is returned.

Implements larcfm::ErrorReporter.

◆ getMessageNoClear()

std::string larcfm::CDSIPolygon::getMessageNoClear ( ) const
virtual

Return a string representation of any errors or warnings. Calling this method will not clear the error or warning status (i.e., hasError() will return the same value before and after this call.)

Returns
error and warning messages. If there are no messages, an empty string is returned.

Implements larcfm::ErrorReporter.

◆ getTimeClosest()

double larcfm::CDSIPolygon::getTimeClosest ( int  i) const

Returns an estimate of the time of closest approach. This value is in absolute time (not relative from a waypoint). This point approximates the point where the two aircraft are closest. The definition of closest is not simple. Specifically, space in the vertical dimension counts more than space in the horizontal dimension: encroaching in the protected zone 100 vertically is much more serious than encroaching 100 ft. horizontally.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ getTimeIn()

double larcfm::CDSIPolygon::getTimeIn ( int  i) const

Returns the start time of the conflict. This value is in absolute time. If there was not a conflict, then this value is meaningless.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ getTimeOut()

double larcfm::CDSIPolygon::getTimeOut ( int  i) const

Returns the end time of the conflict. This value is in absolute time. If there was not a conflict, then this value is meaningless.

Parameters
ithe i-th conflict, must be between 0..size()-1

◆ hasError()

bool larcfm::CDSIPolygon::hasError ( ) const
virtual

Does this object have an error?

Returns
true if there is an error.

Implements larcfm::ErrorReporter.

◆ hasMessage()

bool larcfm::CDSIPolygon::hasMessage ( ) const
virtual

Does this object have an error or a warning?

Returns
true if there is an error or warning.

Implements larcfm::ErrorReporter.

◆ setCorePolygonDetectionPtr()

void larcfm::CDSIPolygon::setCorePolygonDetectionPtr ( const DetectionPolygon cd)
virtual

Apply a deep copy of the Detection3D object pointed to to this object at the lowest level. The user is responsible for cleaning up the original instance.

Implements larcfm::DetectionPolygonAcceptor.

◆ setCorePolygonDetectionRef()

void larcfm::CDSIPolygon::setCorePolygonDetectionRef ( const DetectionPolygon cd)
virtual

Apply a deep copy of the referenced Detection3D object to this object at the lowest level. The user is responsible for cleaning up the original instance.

Implements larcfm::DetectionPolygonAcceptor.

◆ size()

int larcfm::CDSIPolygon::size ( ) const

Returns the number of conflicts

◆ violation()

bool larcfm::CDSIPolygon::violation ( const Position so,
const Velocity vo,
const PolyPath intent,
double  tm 
) const

Return true if the given position and velocity are in violation with the intent aircraft at time tm. If tm is outisde the intent information, return false;

Parameters
so
vo
intent
tm
Returns
true if violation

Return true if the given position and velocity are in violation with the intent aircraft at time tm. If tm is outisde the intent information, return false;

Parameters
so
vo
intent
tm
Returns

Member Data Documentation

◆ def

CDSIPolygon larcfm::CDSIPolygon::def = CDSIPolygon(new CDPolyIter())
staticprivate

This class implements the core algorithms for conflict detection between an ownship (modeled with a state vector) and a traffic aircraft trajectory (modeled with a intent). This class assumes all inputs are in internal units. As such, this class is most appropriate to be part of a larger system, not as a stand-alone conflict detection algorithm. For that functionality, see the class CDSI.

This class can be used two ways: through an object or through a static method. The static method approach has the advantage that an object does not need to be created. The object approach has the advantage that more information is available. Specifically, the start and end times for every conflict are available in the object approach.

In addition, for each of these types of use, the aircraft can be specified in two different coordinate systems: a Euclidean space and a latitude and longitude reference frame.


The documentation for this class was generated from the following files: