ICAROUS
|
#include <CDIIPolygon.h>
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) |
DetectionPolygon * | getCorePolygonDetectionPtr () const |
DetectionPolygon & | getCorePolygonDetectionRef () 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()) |
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.
|
explicit |
Create a new conflict detection (intent information for both the ownship and traffic) object.
distance | the minimum horizontal separation distance |
height | the minimum vertical separation height |
|
static |
Returns if there is a conflict between two aircraft: the ownship and the traffic aircraft.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
D | the minimum horizontal separation distance |
H | the minimum vertical separation distance |
B | the absolute time to start looking for conflicts |
T | the absolute time to end looking for conflicts |
bool larcfm::CDIIPolygon::conflict | ( | ) | const |
Returns if there were any conflicts.
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.
start | the time to begin looking for conflicts |
end | the time to end looking for conflicts |
bool larcfm::CDIIPolygon::conflictDetectionOnly | ( | const Plan & | ownship, |
PolyPath & | traffic, | ||
double | B, | ||
double | T | ||
) | const |
EXPERIMENTAL Perform a "quick" conflict-only check without storing statistics
ownship | |
traffic | |
B | |
T |
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.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
B | the absolute time to start looking for conflicts (no time information will be returned prior to the start of the ownship segment containing B) |
T | the absolute time to end looking for conflicts |
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.
|
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.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
B | the absolute time to start looking for conflicts. |
T | the absolute time to end looking for conflicts. |
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.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
B | the absolute time to start looking for conflicts. |
T | the absolute time to end looking for conflicts. |
|
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.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
B | the absolute time to start looking for conflicts. |
T | the absolute time to end looking for conflicts. |
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.
ownship | the trajectory intent of the ownship |
traffic | the trajectory intent of the traffic |
B | the absolute time to start looking for conflicts. |
T | the absolute time to end looking for conflicts. |
|
virtual |
Return a pointer to this object's Detection3D instance.
Implements larcfm::DetectionPolygonAcceptor.
|
virtual |
Return a reference to this object's Detection3D instance.
Implements larcfm::DetectionPolygonAcceptor.
double larcfm::CDIIPolygon::getDistanceClosest | ( | int | i | ) | const |
Returns the distance index at the time of closest approach.
i | the i-th conflict, must be between 0..size()-1 |
|
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.
Implements larcfm::ErrorReporter.
|
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.)
Implements larcfm::ErrorReporter.
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.
i | the i-th conflict, must be between 0..size()-1 |
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.
i | the i-th conflict, must be between 0..size()-1 |
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.
i | the i-th conflict, must be between 0..size()-1 |
|
virtual |
|
virtual |
Does this object have an error or a warning?
Implements larcfm::ErrorReporter.
|
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.
|
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.
int larcfm::CDIIPolygon::size | ( | ) | const |
Returns the number of conflicts
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.
ownship | |
traffic | |
tm |
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.
ownship | |
traffic | |
tm |