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

Static Public Member Functions

static bool LoS (const Vect3 &so, const Vect3 &si, double D, double H)
 
static bool rightOfLine (const Vect2 &so, const Vect2 &vo, const Vect2 &si)
 
static int rightOfLinePoints (const Vect2 &a, const Vect2 &b, const Vect2 &p)
 
static bool collinear (const Vect3 &p0, const Vect3 &p1, const Vect3 &p2)
 
static bool collinear (const Vect2 &p0, const Vect2 &p1, const Vect2 &p2)
 
static Vect2 midPoint (const Vect2 &p0, const Vect2 &p1)
 
static Vect3 midPoint (const Vect3 &p0, const Vect3 &p1)
 
static Vect3 interpolate (const Vect3 &v1, const Vect3 &v2, double f)
 
static Velocity interpolateVelocity (const Velocity &v1, const Velocity &v2, double f)
 
static double angle_between (const Vect2 &v1, const Vect2 &v2)
 
static double angle_between (const Vect2 &v1, const Vect2 &v2, const Vect2 &v3)
 
static bool divergentHorizGt (const Vect2 &s, const Vect2 &vo, const Vect2 &vi, double minRelSpeed)
 
static bool divergentHorizGt (const Vect3 &s, const Vect3 &vo, const Vect3 &vi, double minRelSpeed)
 
static bool divergent (const Vect2 &so, const Vect2 &vo, const Vect2 &si, const Vect2 &vi)
 
static bool divergent (const Vect3 &so, const Velocity &vo, const Vect3 &si, const Velocity &vi)
 
static double rateOfClosureHorizontal (const Vect3 &so, const Velocity &vo, const Vect3 &si, const Velocity &vi)
 
static double rateOfClosureVertical (const Vect3 &so, const Velocity &vo, const Vect3 &si, const Velocity &vi)
 
static double tau (const Vect3 &s, const Vect3 &vo, const Vect3 &vi)
 
static double distAtTau (const Vect3 &s, const Vect3 &vo, const Vect3 &vi, bool futureOnly)
 
static std::pair< Vect3, double > intersection (const Vect3 &so3, const Velocity &vo3, const Vect3 &si3, const Velocity &vi3)
 
static std::pair< Vect2, double > intersection2D (const Vect2 &so, const Vect2 &vo, const Vect2 &si, const Vect2 &vi)
 
static double distanceH (const Vect3 &soA, const Vect3 &soB)
 
static std::pair< Vect3, double > intersectionAvgZ (const Vect3 &so1, const Vect3 &so2, double dto, const Vect3 &si1, const Vect3 &si2)
 
static std::pair< Vect2, double > intersection2D (const Vect2 &so1, const Vect2 &so2, double dto, const Vect2 &si1, const Vect2 &si2)
 
static std::pair< Vect2, double > intersectSegments (const Vect2 &so, const Vect2 &so2, const Vect2 &si, const Vect2 &si2)
 
static Vect3 closestPoint3 (const Vect3 &a, const Vect3 &b, const Vect3 &so)
 
static Vect3 closestPoint (const Vect3 &a, const Vect3 &b, const Vect3 &so)
 
static Vect2 closestPoint (const Vect2 &a, const Vect2 &b, const Vect2 &so)
 
static Vect3 closestPointOnSegment (const Vect3 &a, const Vect3 &b, const Vect3 &so)
 
static Vect2 closestPointOnSegment (const Vect2 &a, const Vect2 &b, const Vect2 &so)
 
static Vect3 closestPointOnSegment3 (const Vect3 &a, const Vect3 &b, const Vect3 &so)
 
static std::pair< Vect3, double > closestPointOnSegment3_extended (const Vect3 &a, const Vect3 &b, const Vect3 &so)
 
static double distanceToSegment (const Vect2 &a, const Vect2 &b, const Vect2 &so)
 
static double timeOfIntersection (const Vect3 &so3, const Velocity &vo3, const Vect3 &si3, const Velocity &vi3)
 
static bool behind (const Vect2 &x, const Vect2 &so, const Vect2 &vo)
 
static int passingDirection (const Vect3 &so, const Velocity &vo, const Vect3 &si, const Velocity &vi)
 
static int dirForBehind (const Vect2 &so, const Vect2 &vo, const Vect2 &si, const Vect2 &vi)
 
static int dirForBehind (const Vect3 &so, const Velocity &vo, const Vect3 &si, const Velocity &vi)
 
static Vect3 parse (const std::string &s)
 

Member Function Documentation

◆ behind()

bool larcfm::VectFuns::behind ( const Vect2 x,
const Vect2 so,
const Vect2 vo 
)
static

Returns true if x is "behind" so , that is, x is within the region behind the perpendicular line to vo through so.

Parameters
xa position
soaircraft position
voaircraft velocity
Returns
true, if x is behind so

Returns true if x is "behind" so , that is, x is within the region behind the perpendicular line to vo through so.

◆ closestPoint()

Vect2 larcfm::VectFuns::closestPoint ( const Vect2 a,
const Vect2 b,
const Vect2 so 
)
static

Return the closest (horizontal) point along line a-b to point so EXPERIMENTAL

Parameters
aa point to define a line
banother point to define a line
soa point
Returns
the closest point

◆ closestPoint3()

Vect3 larcfm::VectFuns::closestPoint3 ( const Vect3 a,
const Vect3 b,
const Vect3 so 
)
static

Return the closest point on the line a-b to point so as a 3D norm EXPERIMENTAL

Parameters
aa point to define a line
banother point to define a line
soa point
Returns
the closest point

◆ distanceH()

double larcfm::VectFuns::distanceH ( const Vect3 soA,
const Vect3 soB 
)
static

Calculate the horizontal distance between two points.

Parameters
soApoint A
soBpoint B
Returns
horizontal distance between points.

◆ distAtTau()

double larcfm::VectFuns::distAtTau ( const Vect3 s,
const Vect3 vo,
const Vect3 vi,
bool  futureOnly 
)
static

distance at time of closest approach

Parameters
srelative position of aircraft
vovelocity of ownship
vivelocity of traffic
futureOnlyif true then in divergent cases use distance now
Returns
distance at time of closest approach

◆ divergent() [1/2]

bool larcfm::VectFuns::divergent ( const Vect2 so,
const Vect2 vo,
const Vect2 si,
const Vect2 vi 
)
static

Return if two aircraft in the given state are divergent in the horizontal plane

◆ divergent() [2/2]

bool larcfm::VectFuns::divergent ( const Vect3 so,
const Velocity vo,
const Vect3 si,
const Velocity vi 
)
static

Return if two aircraft in the given state are divergent in a 3D sense

Parameters
soownship position
voownship velocity
siintruder position
viintruder velocity
Returns
true, if divergent

◆ divergentHorizGt()

bool larcfm::VectFuns::divergentHorizGt ( const Vect2 s,
const Vect2 vo,
const Vect2 vi,
double  minRelSpeed 
)
static

determines if divergent and relative speed is greater than a specified minimum relative speed

Parameters
srelative position of ownship with respect to traffic
voinitial velocity of ownship
viinitial velocity of traffic
minRelSpeedthe desired minimum relative speed
Returns
true iff divergent and relative speed is greater than a specified minimum relative speed

◆ intersection()

std::pair< Vect3, double > larcfm::VectFuns::intersection ( const Vect3 so3,
const Velocity vo3,
const Vect3 si3,
const Velocity vi3 
)
static

Computes 2D intersection point of two lines, but also finds z component (projected by time from line 1)

Parameters
s0starting point of line 1
v0direction vector for line 1
s1starting point of line 2
v1direction vector of line 2
Returns
Pair (2-dimensional point of intersection with 3D projection, relative time of intersection, relative to the so3) If the lines are parallel, this returns the pair (0,NaN).

◆ intersectionAvgZ()

std::pair< Vect3, double > larcfm::VectFuns::intersectionAvgZ ( const Vect3 so1,
const Vect3 so2,
double  dto,
const Vect3 si1,
const Vect3 si2 
)
static

Computes 2D intersection point of two lines, but also finds z component as average of the closest end point of each line) This z-component is constrained to be within the z components of the defining points.

Parameters
so1starting point of line o
so2ending point of line o
si1starting point of line i
vi2ending point of line i
Returns
Pair (2-dimensional point of intersection, relative time of intersection, relative to the so1) This includes the average altitude between the endpoints closest to the point of intersection Note the intersection may be in the past (i.e. negative time) If the lines are parallel, this returns the pair (0,NaN).

◆ LoS()

bool larcfm::VectFuns::LoS ( const Vect3 so,
const Vect3 si,
double  D,
double  H 
)
static

Returns true if aircraft are in loss of separation at time 0.

Parameters
sothe relative position of the ownship aircraft
sithe relative position of the traffic aircraft
Dthe minimum horizontal distance
Hthe minimum vertical distance
Returns
true, if aircraft are in loss of separation

◆ passingDirection()

int larcfm::VectFuns::passingDirection ( const Vect3 so,
const Velocity vo,
const Vect3 si,
const Velocity vi 
)
static

Returns values indicating whether the ownship state will pass in front of or behind the intruder (from a horizontal perspective)

Parameters
soownship position
voownship velocity
siintruder position
viintruder velocity
Returns
1 if ownship will pass in front (or collide, from a horizontal sense), -1 if ownship will pass behind, 0 if divergent or parallel

◆ rateOfClosureHorizontal()

double larcfm::VectFuns::rateOfClosureHorizontal ( const Vect3 so,
const Velocity vo,
const Vect3 si,
const Velocity vi 
)
static

Return the horizontal rate of closure of two aircraft in the given state

Parameters
soposition of first aircraft
vovelocity of first aircraft
siposition of second aircraft
vivelocity of second aircraft
Returns
rate of closure

◆ rateOfClosureVertical()

double larcfm::VectFuns::rateOfClosureVertical ( const Vect3 so,
const Velocity vo,
const Vect3 si,
const Velocity vi 
)
static

Return the vertical rate of closure of two aircraft in the given state

Parameters
soposition of first aircraft
vovelocity of first aircraft
siposition of second aircraft
vivelocity of second aircraft
Returns
rate of closure

◆ rightOfLine()

bool larcfm::VectFuns::rightOfLine ( const Vect2 so,
const Vect2 vo,
const Vect2 si 
)
static

Returns true if si is on the right side of the line (so,vo)

Parameters
soownship position
voownship velocity
sitraffic aircraft position
Returns
true if is to the right of line (so,vo)

◆ rightOfLinePoints()

int larcfm::VectFuns::rightOfLinePoints ( const Vect2 a,
const Vect2 b,
const Vect2 p 
)
static

Return if point p is to the right or left of the line from A to B

Parameters
apoint A
bpoint B
ppoint P
Returns
1 if to the right or collinear, -1 if to the left.

◆ tau()

double larcfm::VectFuns::tau ( const Vect3 s,
const Vect3 vo,
const Vect3 vi 
)
static

time of closest approach, if parallel return Double.MAX_VALUE

Parameters
srelative position of aircraft
vovelocity of ownship
vivelocity of traffic
Returns
time of closest approach (can be negative)

◆ timeOfIntersection()

double larcfm::VectFuns::timeOfIntersection ( const Vect3 so3,
const Velocity vo3,
const Vect3 si3,
const Velocity vi3 
)
static

Computes 2D intersection point of two infinite lines

Parameters
so3starting point of line 1
vo3direction vector for line 1
si3starting point of line 2
vi3direction vector of line 2
Returns
time the OWNSHIP (so3) will reach the point. Note that the intruder (si3) may have already passed this point. If the lines are parallel, this returns NaN.

Computes 2D intersection point of two lines, but also finds z component (projected by time from line 1)

Parameters
s0starting point of line 1
v0direction vector for line 1
s1starting point of line 2
v1direction vector of line 2
Returns
Pair (2-dimensional point of intersection with 3D projection, relative time of intersection, relative to the so3) If the lines are parallel, this returns the pair (0,NaN).

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