ICAROUS
|
Classes | |
class | SIComparator |
Static Public Member Functions | |
static SimplePoly | convexHull (const std::vector< Position > &plist, double bottom, double top) |
static SimplePoly | convexHull (const SimplePoly &p) |
static SimplePoly | convexHull (const std::vector< SimplePoly > &p) |
static SimplePoly | convexHull (const SimplePoly &p, double buffer) |
static Position | pushOut (SimplePoly &poly, const Position &p, double buffer) |
static Position | pushOut (SimplePoly &poly, int i, double buffer) |
static SimplePoly | simplify2 (SimplePoly &p, double buffer) |
static SimplePoly | simplify (SimplePoly &p, double buffer) |
static SimplePoly | simplify (SimplePoly &p) |
static SimplePoly | simplifyToSize (SimplePoly &p, int num) |
static SimplePoly | stretchOverTime (const SimplePoly &sp, const Velocity &v, double timeBefore, double timeAfter) |
static PolyPath | stretchOverTime (const PolyPath &pbase, double timeBefore, double timeAfter) |
static SimplePoly | bufferedConvexHull (SimplePoly &p, double hbuff, double vbuff) |
static PolyPath | bufferedConvexHull (const PolyPath &pbase, double hbuff, double vbuff) |
static double | intersectsPolygon2D (const Plan &p, PolyPath &pp, double B, double T, double incr) |
static Plan | reducePlanAgainstPolys (const Plan &plan, double gs, std::vector< PolyPath > &paths, double incr, bool leadInsPresent, const std::vector< PolyPath > &containment) |
static Plan | reducePlanAgainstPolys (const Plan &pln, double gs, std::vector< PolyPath > &paths, double incr, bool leadInsPresent) |
static std::pair< double, std::string > | isPlanInConflictWx (const Plan &plan, std::vector< PolyPath > &paths, double start, double end, double incr) |
static std::pair< double, std::string > | isPlanInConflictWx (const Plan &plan, std::vector< PolyPath > &paths, double incr) |
static std::pair< double, std::string > | isPlanInConflictWx (const Plan &plan, std::vector< PolyPath > &paths, double incr, double fromTime) |
static bool | isPlanContained (const Plan &plan, const std::vector< PolyPath > &paths, double B, double T, double incr) |
static double | calculateWxExitTime (const Plan &plan, std::vector< PolyPath > &paths, double incr, double entryTime) |
|
static |
Return a path where polygons are replaced by convex hulls that have been expanded by hbuff and vbuff.
pbase | base polygon path |
hbuff | size of horizontal buffer (approx) |
vbuff | size of vertical buffer |
|
static |
Return a convex hull that has been expanded by hbuff and vbuff. This extends the polygons around points, both perpendicular to the segments and directly away from vertices, approximating a round join. There may be points outside the resulting hull (near vertices) that are slightly closer to the original than the requested buffer.
p | base polygon |
hbuff | size of horizontal buffer (approx) |
vbuff | size of vertical buffer |
|
static |
Given that plan is in loss with paths at time entryTime, then this function returns the exit time
plan | plan |
paths | polygon paths |
incr | increment |
entryTime | time |
|
static |
Returns the convex hull of a polygon that has been expanded by (approximately) the given buffer size. This is done by adding additional points around each polygon point and taking the convex hull of them all. This assumes that the resulting hull will not include the north or south poles.
p | polygon |
buffer | buffer |
|
static |
Return a polygon that is the convex hull of the listed points. This uses the Graham scan algorithm. For purposes of this algorithm, we only consider x, y values of positions (since all calculations are relative and no points are moved). This uses the NE-most point as the origin, to allow for our track computations (0 is north) and proceeds in a clockwise fashion This assumes that the resulting hull will not include the north or south poles (for lat lon positions)
plist | list of positions |
bottom | lower altitude |
top | top altitude |
|
static |
Returns the convex hull of a set of polygons. This assumes that the resulting hull will not include the north or south poles.
p | list of polygons |
|
static |
This is a SLOW, APPROXIMATE test for 2D intersection between a moving polygon and a moving point. For more accurate (and verified) tests for this property, see polygon functions in the ACCoRD framework, specifically classes that implement the DetectionPolygon interface and CDIIPolygon.
p | plan describing point-mass trajectory |
pp | path describing polygon movement |
B | start time to check (absolute) |
T | end time to check (absolute) |
incr | time increment for search (> 0) |
Note: the return time will be at an interior point, and the name of the polygon
|
static |
Returns time of intersection if the plan is NOT free of polygons from time start to time end. This may miss intrusions of up to incr sec so it may not detect
plan | plan to test |
paths | set of polygons |
B | start time of search |
T | end time of search |
incr | search increment |
Returns time of intersection if the plan is NOT free of polygons from time start to time end. This may miss intrusions of up to incr sec so it may not detect
plan | plan to test |
paths | set of polygons |
start | start time of search |
end | end time of search |
incr | search increment |
|
static |
Return a position that is buffer distance further away from the poly's centroid
poly | polygon |
p | position |
buffer | buffer |
|
static |
Return a position that is buffer distance further away from the poly's centroid at vertex i
poly | polygon |
i | index |
buffer | buffer |
|
static |
Attempt to minimize a given plan (by removing points) such that new segments do not intersect with any polygons. This uses the intersectsPolygon2D() check, and so has the limitations associated with it. Use ACCoRD calls instead for better performance and/or more accuracy. Returns a new plan that is hopefully smaller than the original plan.
p | plan |
paths | paths |
incr | increment |
fpln(" !!! reducePlanAgainstPolys: WARNING: input plan is not conflict free!!!");
|
static |
Attempt to (over) approximate the given polygon with one with fewer edges.
p | original polygon |
buffer | approximate increase in size in any dimension. |
|
static |
Attempt to over-approximate a polygons with one with the specified number of vertices. This will automatically increase the buffer by up to 30% of the original's max radius value, and either stop there or when we have no more than the desired number of vertices.
p | original polygon |
num | desired number of vertices |
|
static |
Given a polypath, expand the polygons on it so they at least cover the areas that they would when over a longer time. Note: this does not work for MORPHING paths, and will convert them instead to USER_VEL_FINITE paths. Polygons are expanded to a new convex hull, meaning this will be an over-approximation. This may also not be accurate for paths with very long legs in geodetic coordinates. This may also overestimate the polygons at the start and end of each leg in the path.
pbase | starting path |
timeBefore | time before the base path time to cover (relative, in seconds) |
timeAfter | time after the base path time to cover (relative, in seconds) |
|
static |
Stretch a polygon so that it covers (at least) what the original would as it moves over a given time range. The uses a convex hull, so will be an over-approximation. There may be inaccuracies for very long periods of time if using geodesic coordinates.
Example: Given a polygon W and an aircraft A with a timeAfter of 100 seconds, a conflict detection for A against the stretched polygon W' is approximately equivalent to the disjunction of conflict detections (any positive is a positive) of the set A' against the original W, where A' is the set A plus all of "echos" timeshifted up to 100 seconds into the past, modulo distortion from geodetic projections and convex hull expansions. Effectively this is saying that if the conflict detection of A vs. W' is clear, then A will be clear of W and any aircraft that precisely follow A will also be clear of W for up to 100 seconds. (If it were not clear for 100 seconds, then A would have impacted the extended W', which "arrives" 100 seconds earlier than W would.)
Similarly for timeBefore.
If A is clear of W', then it is also clear of the original W, which is a subset of W'.
Note this technique does not necessarily work for morphing polygons.
sp | base polygon |
v | average velocity of polygon |
timeBefore | time before stated position to cover (in sec) |
timeAfter | time after stated position to cover (in sec) |