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::CDIIPolygon Class Reference

#include <CDIIPolygon.h>

Inheritance diagram for larcfm::CDIIPolygon:
larcfm::ErrorReporter larcfm::DetectionPolygonAcceptor

Public Member Functions

 CDIIPolygon (DetectionPolygon *cd)
 
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 conflictBetween (double start, double end) const
 
bool violation (const Plan &ownship, const PolyPath &traffic, double tm) const
 
bool detection (const Plan &ownship, PolyPath &traffic, double B, double T)
 
bool detectionExtended (const Plan &ownship, PolyPath &traffic, double B, double T)
 
bool conflictDetectionOnly (const Plan &ownship, PolyPath &traffic, double B, double T) const
 
bool conflictOnlyXYZ (const Plan &ownship, PolyPath &traffic, double B, double T) const
 
bool conflictOnlyLL (const Plan &ownship, PolyPath &traffic, 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 cdiicore (const Plan &ownship, PolyPath &traffic, double B, double T)
 

Private Member Functions

bool detectionXYZ (const Plan &ownship, PolyPath &pp, double B, double T)
 
bool detectionLL (const Plan &ownship, PolyPath &pp, double B, double T)
 
void captureOutput (CDSIPolygon cdsi)
 
void merge ()
 

Private Attributes

std::vector< double > tin
 
std::vector< double > tout
 
std::vector< double > tcpa
 
std::vector< double > dist_tca
 
CDSIPolygon cdsi
 

Static Private Attributes

static CDIIPolygon def = CDIIPolygon(new CDPolyIter())
 

Detailed Description

This class implements the core algorithms for conflict detection between an ownship and a traffic aircraft trajectory, where both trajectories include intent information. 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 CDII.

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.

When using the object method, all method getTimeIn(), etc, assume that the detection() method has been called first.

Constructor & Destructor Documentation

◆ CDIIPolygon()

larcfm::CDIIPolygon::CDIIPolygon ( DetectionPolygon cd)
explicit

Create a new conflict detection (intent information for both the ownship and traffic) object.

Parameters
distancethe minimum horizontal separation distance
heightthe minimum vertical separation height

Member Function Documentation

◆ cdiicore()

bool larcfm::CDIIPolygon::cdiicore ( const Plan ownship,
PolyPath traffic,
double  B,
double  T 
)
static

Returns if there is a conflict between two aircraft: the ownship and the traffic aircraft.

Parameters
ownshipthe trajectory intent of the ownship
trafficthe trajectory intent of the traffic
Dthe minimum horizontal separation distance
Hthe minimum vertical separation distance
Bthe absolute time to start looking for conflicts
Tthe absolute time to end looking for conflicts
Returns
true if there is a conflict

◆ conflict()

bool larcfm::CDIIPolygon::conflict ( ) const

Returns if there were any conflicts.

◆ conflictBetween()

bool larcfm::CDIIPolygon::conflictBetween ( double  start,
double  end 
) const

Is there a conflict at any time in the interval from start to end (inclusive). This method assumes that the detection() method has been called first.

Parameters
startthe time to begin looking for conflicts
endthe time to end looking for conflicts
Returns
true if there is a conflict

◆ conflictDetectionOnly()

bool larcfm::CDIIPolygon::conflictDetectionOnly ( const Plan ownship,
PolyPath traffic,
double  B,
double  T 
) const

EXPERIMENTAL Perform a "quick" conflict-only check without storing statistics

Parameters
ownship
traffic
B
T
Returns
true if conflict

◆ detection()

bool larcfm::CDIIPolygon::detection ( const Plan ownship,
PolyPath traffic,
double  B,
double  T 
)

Returns if there is a conflict between two aircraft: the ownship and the traffic aircraft.

Parameters
ownshipthe trajectory intent of the ownship
trafficthe trajectory intent of the traffic
Bthe absolute time to start looking for conflicts (no time information will be returned prior to the start of the ownship segment containing B)
Tthe absolute time to end looking for conflicts
Returns
true if there is a conflict

◆ detectionExtended()

bool larcfm::CDIIPolygon::detectionExtended ( const Plan ownship,
PolyPath traffic,
double  B,
double  T 
)

This version calculates the "true" time in and time out for all conflicts that overlap with [B,T]. It is less efficient than the normal detection() algorithm and should only be called if accurate time in information is necessary when B might be within a loss of separation region.

◆ detectionLL()

bool larcfm::CDIIPolygon::detectionLL ( const Plan ownship,
PolyPath traffic,
double  B,
double  T 
)
private

Returns if there is a conflict between the ownship aircraft and the PolyPath pp.

This will not return any timing information prior to the ownship segment containing B.

Parameters
ownshipthe trajectory intent of the ownship
trafficthe trajectory intent of the traffic
Bthe absolute time to start looking for conflicts.
Tthe absolute time to end looking for conflicts.
Returns
true if there is a conflict

Returns if there is a conflict between two aircraft: the ownship and the traffic aircraft.

This will not return any timing information prior to the ownship segment containing B.

Parameters
ownshipthe trajectory intent of the ownship
trafficthe trajectory intent of the traffic
Bthe absolute time to start looking for conflicts.
Tthe absolute time to end looking for conflicts.
Returns
true if there is a conflict

◆ detectionXYZ()

bool larcfm::CDIIPolygon::detectionXYZ ( const Plan ownship,
PolyPath pp,
double  B,
double  T 
)
private

Returns if there is a conflict between the ownship aircraft and the PolyPath pp.

This will not return any timing information prior to the owhship segment containing B.

Parameters
ownshipthe trajectory intent of the ownship
trafficthe trajectory intent of the traffic
Bthe absolute time to start looking for conflicts.
Tthe absolute time to end looking for conflicts.
Returns
true if there is a conflict

Returns if there is a conflict between two aircraft: the ownship and the traffic aircraft.

This will not return any timing information prior to the owhship segment containing B.

Parameters
ownshipthe trajectory intent of the ownship
trafficthe trajectory intent of the traffic
Bthe absolute time to start looking for conflicts.
Tthe absolute time to end looking for conflicts.
Returns
true if there is a conflict

◆ getCorePolygonDetectionPtr()

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

Return a pointer to this object's Detection3D instance.

Implements larcfm::DetectionPolygonAcceptor.

◆ getCorePolygonDetectionRef()

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

Return a reference to this object's Detection3D instance.

Implements larcfm::DetectionPolygonAcceptor.

◆ getDistanceClosest()

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

Returns the distance index at the time of closest approach.

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

◆ getMessage()

std::string larcfm::CDIIPolygon::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::CDIIPolygon::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::CDIIPolygon::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::CDIIPolygon::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::CDIIPolygon::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::CDIIPolygon::hasError ( ) const
virtual

Does this object have an error?

Returns
true if there is an error.

Implements larcfm::ErrorReporter.

◆ hasMessage()

bool larcfm::CDIIPolygon::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::CDIIPolygon::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::CDIIPolygon::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::CDIIPolygon::size ( ) const

Returns the number of conflicts

◆ violation()

bool larcfm::CDIIPolygon::violation ( const Plan ownship,
const PolyPath traffic,
double  tm 
) const

Return true if there is a violation between two aircraft at time tm. If tm is outside either of the plans' times, this will return false.

Parameters
ownship
traffic
tm
Returns
true if violation

Return true if there is a violation between two aircraft at time tm. If tm is outside either of the plans' times, this will return false.

Parameters
ownship
traffic
tm
Returns

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