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

#include <Kinematics.h>

Static Public Member Functions

static double turnRadius (double speed, double bank, double g)
 
static double turnRadius (double speed, double bank)
 
static double turnRadiusByRate (double speed, double omega)
 
static double speedOfTurn (double R, double bank)
 
static double turnRate (double speed, double bankAngle)
 
static double bankAngleRadius (double R, double speed)
 
static double bankAngleRadius (double speed, double R, bool turnRight)
 
static double bankAngle (double speed, double turnRate)
 
static double bankAngleGoal (double track, double goalTrack, double maxBank)
 
static double turnRateGoal (const Velocity &vo, double goalTrack, double maxBank)
 
static bool turnDone (double currentTrack, double targetTrack, bool turnRight)
 
static double turnTime (const Velocity &v0, double goalTrack, double maxBank, bool turnRight)
 
static double turnTime (const Velocity &v0, double goalTrack, double maxBank)
 
static double turnTime (double groundSpeed, double deltaTrack, double bankAngle)
 
static double turnTime (double deltaTrack, double trackRate)
 
static bool turnRight (const Velocity &v0, double goalTrack)
 
static std::pair< Vect3, Velocitylinear (const std::pair< Vect3, Velocity > &sv0, double t)
 
static std::pair< Vect3, Velocitylinear (Vect3 so, Velocity vo, double t)
 
static std::pair< Vect3, VelocityturnOmega (const Vect3 &s0, const Velocity &v0, double t, double omega)
 
static Vect2 center (const Vect3 &s0, const Velocity &v0, double omega)
 
static std::pair< Vect3, VelocityturnByDist2D (const Vect3 &so, const Vect3 &center, int dir, double d, double gsAt_d)
 ‍** *** EXPERIMENTAL *** More...
 
static Vect3 turnByDist2D (const Vect3 &so, const Vect3 &center, int dir, double d)
 
static Vect3 turnByAngle2D (const Vect3 &so, const Vect3 &center, double alpha)
 
static std::pair< Vect3, VelocityturnOmega (const std::pair< Vect3, Velocity > &sv0, double t, double omega)
 
static std::pair< Vect3, Velocityturn (const Vect3 &s0, const Velocity &v0, double t, double R, bool turnRight)
 
static std::pair< Vect3, Velocityturn (const std::pair< Vect3, Velocity > &sv0, double t, double R, bool turnRight)
 
static std::pair< Vect3, Velocityturn (const Vect3 &s0, const Velocity &v0, double t, double bank)
 
static std::pair< Vect3, VelocityturnUntil (const Vect3 &so, const Velocity &vo, double t, double goalTrack, double maxBank)
 
static std::pair< Vect3, VelocityturnUntil (const std::pair< Vect3, Velocity > &sv0, double t, double goalTrack, double maxBank)
 
static std::pair< Vect3, VelocityturnUntilTimeRadius (std::pair< Vect3, Velocity > svo, double t, double turnTime, double R, bool turnRight)
 
static std::pair< Vect3, VelocityturnUntilTimeOmega (const Vect3 &so, const Velocity &vo, double t, double turnTime, double omega)
 
static std::pair< Vect3, VelocityturnUntilTimeOmega (const std::pair< Vect3, Velocity > &svo, double t, double turnTime, double omega)
 
static Vect3 positionAfterTurn (const Vect3 &so, const Velocity &vo, double goalTrack, double bankAngle)
 
static double closestTimeOnTurn (const Vect3 &s0, const Velocity &v0, double omega, const Vect3 &x, double endTime)
 
static double closestDistOnTurn (const Vect3 &s0, const Velocity &v0, double R, int dir, const Vect3 &x, double maxDist)
 
static std::pair< Vect2, Vect2directTo (const Vect2 &bot, const Vect2 &v0, const Vect2 &goal, double R)
 
static Quad< Vect3, Velocity, double, int > directToPoint (const Vect3 &so, const Velocity &vo, const Vect3 &wp, double R)
 
static Triple< Vect3, double, double > genDirectToVertex (const Vect3 &so, const Velocity &vo, const Vect3 &wp, double bankAngle, double timeBeforeTurn)
 
static Vect2 centerOfTurn (const Vect2 &so, const Vect2 &vo, double R, int dir)
 
static Vect2 centerOfTurn (const Vect2 &so, const Vect2 &vo, double bankAngle, bool turnRight)
 
static bool testLoSTrk (const Vect3 &so, const Velocity &vo, const Velocity &nvo, const Vect3 &si, const Velocity &vi, double bankAngleOwn, double stopTime, double D, double H)
 
static Vect3 gsAccelPos (const Vect3 &so3, const Velocity &vo3, double t, double a)
 
static std::pair< Vect3, VelocitygsAccel (const Vect3 &so3, const Velocity &vo3, double t, double a)
 
static double gsAccelTime (double gs0, double goalGs, double gsAccel)
 
static double gsAccelTime (const Velocity &vo, double goalGs, double gsAccel)
 
static Triple< Vect3, Velocity, double > gsAccelGoal (const Vect3 &so, const Velocity &vo, double goalGs, double gsAccel)
 
static std::pair< Vect3, VelocitygsAccelUntilRWB (const Vect3 &so3, const Velocity &vo3, double t, double goalGS, double gsAccel)
 
static std::pair< Vect3, VelocitygsAccelUntil (const Vect3 &so3, const Velocity &vo3, double t, double goalGS, double gsAccel)
 
static std::pair< Vect3, VelocitygsAccelUntil (const std::pair< Vect3, Velocity > &sv0, double t, double goalGS, double gsAccel)
 
static std::pair< double, double > gsAccelToRTA (double gsIn, double dist, double rta, double gsAccel)
 
static std::pair< double, double > gsAccelToDist (double gsIn, double dist, double gsAccel)
 
static double distanceToGsAccelTime (double gs, double gsAccel, double dist)
 
static std::pair< double, double > distanceWithGsAccel (double gs0, double gsTarget, double gsAccel, double dt)
 
static double neededDistGsAccel (double gsIn, double gsTarget, double gsAccel)
 
static double gsAccelDist (double gs1, double gs2, double a)
 
static bool testLoSGs (const Vect3 &so, const Velocity &vo, const Velocity &nvo, const Vect3 &si, const Velocity &vi, double gsAccelOwn, double stopTime, double D, double H)
 
static double elevationAngle (Velocity v)
 
static Vect3 vsAccelPos (const Vect3 &so3, const Velocity &vo3, double t, double a)
 
static std::pair< Vect3, VelocityvsAccel (const Vect3 &so3, const Velocity &vo3, double t, double a)
 
static std::pair< Vect3, VelocityvsAccel (const std::pair< Vect3, Velocity > &sv0, double t, double a)
 
static double vsAccelTime (double vs, double goalVs, double vsAccel)
 
static double vsAccelTime (const Velocity &vo, double goalVs, double vsAccel)
 
static Triple< Vect3, Velocity, double > vsAccelGoal (const Vect3 &so, const Velocity &vo, double goalVs, double vsAccel)
 
static std::pair< Vect3, VelocityvsAccelUntil (const Vect3 &so, const Velocity &vo, double t, double goalVs, double vsAccel)
 
static std::pair< Vect3, VelocityvsAccelUntil (const std::pair< Vect3, Velocity > &sv0, double t, double goalVs, double vsAccel)
 
static bool testLoSVs (const Vect3 &so, const Velocity &vo, const Velocity &nvo, const Vect3 &si, const Velocity &vi, double vsAccelOwn, double stopTime, double D, double H)
 
static StateVector vsLevelOutFinal (const std::pair< Vect3, Velocity > &sv0, double climbRate, double targetAlt, double a, bool allowClimbRateChange)
 
static StateVector vsLevelOutFinal (const std::pair< Vect3, Velocity > &sv0, double climbRate, double targetAlt, double a)
 
static bool overShoot (const std::pair< Vect3, Velocity > &svo, double climbRate, double targetAlt, double accelup, double acceldown, bool allowClimbRateChange)
 
static Tuple5< double, double, double, double, double > vsLevelOutTimes (double s0z, double v0z, double climbRate, double targetAlt, double accelup, double acceldown, bool allowClimbRateChange)
 
static Tuple5< double, double, double, double, double > vsLevelOutTimes (const std::pair< Vect3, Velocity > &svo, double climbRate, double targetAlt, double accelup, double acceldown, bool allowClimbRateChange)
 
static Tuple5< double, double, double, double, double > vsLevelOutTimes (const std::pair< Vect3, Velocity > &svo, double climbRate, double targetAlt, double a, bool allowClimbRateChange)
 
static Tuple5< double, double, double, double, double > vsLevelOutTimes (const std::pair< Vect3, Velocity > &svo, double climbRate, double targetAlt, double a)
 
static double vsLevelOutClimbRate (const std::pair< Vect3, Velocity > &svo, double climbRate, double targetAlt, double accelup, double acceldown, bool allowClimbRateChange)
 
static double vsLevelOutTime (const std::pair< Vect3, Velocity > &sv0, double climbRate, double targetAlt, double a, bool allowClimbRateChange)
 
static double vsLevelOutTime (const std::pair< Vect3, Velocity > &sv0, double climbRate, double targetAlt, double a)
 
static std::pair< double, double > vsLevelOutCalc (double soz, double voz, double targetAlt, double a1, double a2, double t1, double t2, double t3, double t)
 
static std::pair< Vect3, VelocityvsLevelOutCalculation (const std::pair< Vect3, Velocity > &sv0, double targetAlt, double a1, double a2, double t1, double t2, double t3, double t)
 
static std::pair< Vect3, VelocityvsLevelOut (const std::pair< Vect3, Velocity > &sv0, double t, double climbRate, double targetAlt, double accelUp, double accelDown, bool allowClimbRateChange)
 
static std::pair< Vect3, VelocityvsLevelOut (const std::pair< Vect3, Velocity > &sv0, double t, double climbRate, double targetAlt, double a, bool allowClimbRateChange)
 
static std::pair< Vect3, VelocityvsLevelOut (const std::pair< Vect3, Velocity > &sv0, double t, double climbRate, double targetAlt, double a)
 
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 Private Member Functions

static double dirSign (bool turnRight)
 
static std::pair< Vect3, VelocityvsLevelOutCalculation (const std::pair< Vect3, Velocity > &sv0, double t, double T1, double T2, double T3, double climbRate, double targetAlt, double a1, double a2)
 
static Tuple5< double, double, double, double, double > vsLevelOutTimesBase (double s0z, double v0z, double climbRate, double targetAlt, double accelup, double acceldown, bool allowClimbRateChange)
 ‍** More...
 

Detailed Description

A library of functions to aid the computation of the kinematics of an aircraft. This library is currently under development and is far from complete. The majority of the functions handle constant velocity turns and movement with constant ground speed acceleration.

Unless otherwise noted, all kinematics function parameters are in internal units – angles are in radians, linear speeds are in m/s, distances are in meters, time is in seconds.

Member Function Documentation

◆ bankAngle()

double larcfm::Kinematics::bankAngle ( double  speed,
double  turnRate 
)
static

Returns the calculated bank angle for a turn that has specified turnRate. Assumes sea-level gravity.

Parameters
speedground speed (speed ≥ 0.0)
turnRate(positive is a right turn)
Returns
bank angle (positive = turn right, negative = turn left)

◆ bankAngleGoal()

double larcfm::Kinematics::bankAngleGoal ( double  track,
double  goalTrack,
double  maxBank 
)
static

Find the minimum turn for the to reach the goal and returns the maxBank angle, with the correct sign to achieve that goal. Assumes sea-level gravity.

Parameters
trackthe current track
goalTrackthe goal track angle
maxBankthe maximum bank angle, must be in (0,pi/2)
Returns
bank angle (positive = turn right, negative = turn left)

◆ bankAngleRadius() [1/2]

double larcfm::Kinematics::bankAngleRadius ( double  R,
double  speed 
)
static

Calculates the bank angle used for a given turn radius and ground speed.
Because this method does not have enough information, it always returns a positive bank angle (indicating a right hand turn). Assumes sea-level gravity. If R <= 0.0, this returns 0.

Parameters
speedground speed
Rradius
Returns
bank angle (positive)

◆ bankAngleRadius() [2/2]

double larcfm::Kinematics::bankAngleRadius ( double  speed,
double  R,
bool  turnRight 
)
static

Calculates the bank angle used for a given turn radius and ground speed. Assumes sea-level gravity.

Parameters
speedground speed (speed ≥ 0.0)
Rradius (R > 0.0)
turnRighttrue, if a right turn is desired
Returns
bank angle (positive = turn right, negative = turn left)

◆ centerOfTurn() [1/2]

Vect2 larcfm::Kinematics::centerOfTurn ( const Vect2 so,
const Vect2 vo,
double  bankAng,
bool  turnRight 
)
static

find center of turn determined by line (so,vo) with bankAngle and direction (turnRight)

Parameters
soposition
vovelocity
bankAnglebank angle
turnRightright turn (left otherwise)
Returns
two dimensional position of turn

find center of turn determined by line (so,vo) with bankAngle and direction TurnRight

Parameters
so
vo
R
dirdirection: 1 = right, -1 = left
Returns

◆ centerOfTurn() [2/2]

Vect2 larcfm::Kinematics::centerOfTurn ( const Vect2 so,
const Vect2 vo,
double  R,
int  dir 
)
static

find center of turn determined by line (so,vo) with radius R and direction dir

Parameters
soposition
vovelocity
Rradius of turn
dirdirection: 1 = right, -1 = left
Returns
two dimensional position of turn

find center of turn determined by line (so,vo) with radius R and direction dir

Parameters
so
vo
R
dirdirection: 1 = right, -1 = left
Returns

◆ closestDistOnTurn()

double larcfm::Kinematics::closestDistOnTurn ( const Vect3 s0,
const Velocity v0,
double  R,
int  dir,
const Vect3 x,
double  maxDist 
)
static

Calculate when during the turn we will be closest to the given point.

Parameters
s0turn start position
v0turn start velocity
Rturn radius
dirdirection of turn
xpoint of interest
maxDistdistance at which turn finishes. If ≤ 0, assume a full turn is allowed.
Returns
distance on turn when we are closest to the given point x, or -1 if we are precisely at the turn's center This will be bounded by [0,maxDist]

◆ closestTimeOnTurn()

double larcfm::Kinematics::closestTimeOnTurn ( const Vect3 s0,
const Velocity v0,
double  omega,
const Vect3 x,
double  endTime 
)
static

Calculate when during the turn we will be closest to the given point.

Parameters
s0turn start position
v0turn start velocity
omegarate of turn (+ = right, - = left)
xpoint of interest
endTimetime at which turn finishes. If ≤ 0, assume a full turn is allowed.
Returns
time on turn when we are closest to the given point x (in seconds), or -1 if we are precisely at the turn's center This will be bounded by [0,endTime]

◆ directTo()

std::pair< Vect2, Vect2 > larcfm::Kinematics::directTo ( const Vect2 bot,
const Vect2 v0,
const Vect2 goal,
double  R 
)
static

Given an initial position, initial velocity, and goal position (outside of the turn radius) calculate the end of turn and center of turn

Parameters
botinitial position (i.e. beginning of turn)
v0initial velocity
goalgoal position
Rturn radius
Returns
end of turn, center of turn

◆ distanceToGsAccelTime()

double larcfm::Kinematics::distanceToGsAccelTime ( double  gs,
double  gsAccel,
double  dist 
)
static

The time required to cover distance "dist" if initial speed is "gs" and acceleration is "gsAccel"

Parameters
gsinitial ground speed
gsAccelsigned ground speed acceleration
distnon-negative distance
Returns
time required to cover distance

Warning: This function can return NaN

◆ distanceWithGsAccel()

std::pair< double, double > larcfm::Kinematics::distanceWithGsAccel ( double  gs0,
double  gsTarget,
double  gsAccel,
double  dt 
)
static

distance traveled when accelerating from gs0 to gsTarget for time dt (acceleration stops after gsTarget is reached)

Parameters
gs0initial ground speed
gsTargettarget ground speed
gsAccelpositive ground speed acceleration
dttotal time traveling
Returns
total distance traveled

Note: if gsAccel = 0 it returns gs0*dt

◆ distAtTau()

static double larcfm::Kinematics::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

◆ elevationAngle()

double larcfm::Kinematics::elevationAngle ( Velocity  v)
static

Return the elevation angle (alternatively the negative glide-slope angle) for a climb (descent)

Parameters
vvelocity
Returns
elevation angle [radians]

Return the elevation angle (alternatively the negative glide-slope angle) for a climb (descent)

Returns
elevation angle [radians]

◆ gsAccel()

std::pair< Vect3, Velocity > larcfm::Kinematics::gsAccel ( const Vect3 so3,
const Velocity vo3,
double  t,
double  a 
)
static

Position/Velocity after a constant GS acceleration for t seconds

Parameters
so3current position
vo3current velocity
tamount of time accelerating
aacceleration, i.e. a positive or negative acceleration
Returns
position/velocity at time t

◆ gsAccelDist()

double larcfm::Kinematics::gsAccelDist ( double  gs1,
double  gs2,
double  a 
)
static

Distance traveled when accelerating from gs1 to gs2

Parameters
gs1starting ground speed
gs2ending ground speed
aacceleration value (unsigned)
Returns
distance needed to accelerate from gs1 to gs2 with acceleration a. This returns 0 if a=0 or gs1=gs2.

Distance traveled when accelerating from gs1 to gs2

Parameters
gs1starting gs
gs2ending gs
aacceleration value (unsigned)
Returns
distance needed to accelerate from gs1 to gs2 with acceleration a. This returns 0 if a=0 or gs1=gs2.

◆ gsAccelPos()

Vect3 larcfm::Kinematics::gsAccelPos ( const Vect3 so3,
const Velocity vo3,
double  t,
double  a 
)
static

Final 3D position after a constant GS acceleration for t seconds

Parameters
so3current position
vo3current velocity
aacceleration, i.e. a positive or negative acceleration
tamount of time accelerating
Returns
final position

◆ gsAccelTime() [1/2]

double larcfm::Kinematics::gsAccelTime ( const Velocity vo,
double  goalGs,
double  gsAccel 
)
static

returns time required to accelerate to target ground speed GoalGs

Parameters
vocurrent velocity
goalGsground speed where the acceleration stops
gsAccelground speed acceleration (a positive value)
Returns
acceleration time

◆ gsAccelTime() [2/2]

double larcfm::Kinematics::gsAccelTime ( double  gs0,
double  goalGs,
double  gsAccel 
)
static

returns time required to accelerate to target ground speed GoalGs

Parameters
gs0current ground speed
goalGsground speed where the acceleration stops
gsAccelground speed acceleration (a positive value)
Returns
acceleration time

◆ gsAccelToDist()

std::pair< double, double > larcfm::Kinematics::gsAccelToDist ( double  gsIn,
double  dist,
double  gsAccel 
)
static

Accelerate for a given distance. Return the end gs and time. Negative time indicates an error.

◆ gsAccelToRTA()

std::pair< double, double > larcfm::Kinematics::gsAccelToRTA ( double  gsIn,
double  dist,
double  rta,
double  gsAccel 
)
static

Compute the goal ground speed and time needed to accelerate in order to reach a point at a given required time of arrival.

Parameters
gsInCurrent ground speed (m/s)
distCurrent horizontal distance to goal point (m)
rta(relative) required time of arrival (s)
gsAccelmaximum ground speed acceleration or deceleration (positive, m/s^2)
Returns
the goal ground speed and acceleration duration needed in order to cover the given distance in the given time. The time will be negative if the rta is not attainable.

◆ gsAccelUntilRWB()

static std::pair< Vect3, Velocity > larcfm::Kinematics::gsAccelUntilRWB ( const Vect3 so3,
const Velocity vo3,
double  t,
double  goalGS,
double  gsAccel 
)
static

Position after t time units where there is first an acceleration or deceleration to the target ground speed goalGS and then continuing at that speed for the remainder of the time, if any.

Parameters
sostarting position
voinitial velocity
goalGSthe ground speed where the acceleration stops
gsAccelthe ground speed acceleration (a positive value)
ttime of acceleration [secs]
Returns
Position after time t

◆ linear()

std::pair< Vect3, Velocity > larcfm::Kinematics::linear ( const std::pair< Vect3, Velocity > &  sv0,
double  t 
)
static
Parameters
sv0Pair (initial position, initial velocity)
ttime of travel
Returns
new position after traveling straight for t units of time

◆ neededDistGsAccel()

double larcfm::Kinematics::neededDistGsAccel ( double  gsIn,
double  gsTarget,
double  gsAccel 
)
static

distance traveled when accelerating from gsIn to gsTarget

Parameters
gsIninitial ground speed
gsTargettarget ground speed
gsAccelpositive ground speed acceleration

See also gsAccelDist will give same answer

Returns
total distance traveled when accelerating from gs0 to gsTarget

◆ positionAfterTurn()

Vect3 larcfm::Kinematics::positionAfterTurn ( const Vect3 so,
const Velocity vo,
double  goalTrack,
double  bankAngle 
)
static

Position after turning to track goalTrack, assumes less than 180 degree turn

Parameters
sostarting position
voinitial velocity
goalTrackthe track angle where the turn stops
bankAnglethe bank angle of the aircraft making the turn
Returns
Position after time t

◆ speedOfTurn()

double larcfm::Kinematics::speedOfTurn ( double  R,
double  bank 
)
static

Calculates ground speed of the vehicle from radius R and the bank angle. Assumes sea-level gravity.

Parameters
Rradius, must be non-negative
bankbank angle, must be in (-pi/2,pi/2)
Returns
speed

◆ tau()

static double larcfm::Kinematics::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)

◆ testLoSGs()

bool larcfm::Kinematics::testLoSGs ( const Vect3 so,
const Velocity vo,
const Velocity nvo,
const Vect3 si,
const Velocity vi,
double  gsAccelOwn,
double  stopTime,
double  D,
double  H 
)
static

Test for LoS(D,H) between two aircraft when only ownship gs accelerates, compute trajectories up to time stopTime

Parameters
soinitial position of ownship
voinitial velocity of ownship
nvothe target velocity of ownship (i.e. after turn maneuver complete)
siinitial position of traffic
viinitial velocity of traffic
gsAccelOwnground speed acceleration of the ownship
stopTimethe duration of the turns
Dhorizontal distance
Hvertical distance
Returns
minimum distance data packed in a Vect4

◆ testLoSTrk()

bool larcfm::Kinematics::testLoSTrk ( const Vect3 so,
const Velocity vo,
const Velocity nvo,
const Vect3 si,
const Velocity vi,
double  bankAngleOwn,
double  stopTime,
double  D,
double  H 
)
static

Test for LoS(D,H) between two aircraft when only ownship turns, compute trajectories up to time stopTime

Parameters
soinitial position of ownship
voinitial velocity of ownship
nvothe target velocity of ownship (i.e. after turn maneuver complete)
siinitial position of traffic
viinitial velocity of traffic
bankAngleOwnthe bank angle of the ownship
turnRightOwnthe turn direction of ownship
stopTimethe duration of the turns
Dhorizontal distance
Hvertical distance
Returns
minimum distance data packed in a Vect4

◆ testLoSVs()

bool larcfm::Kinematics::testLoSVs ( const Vect3 so,
const Velocity vo,
const Velocity nvo,
const Vect3 si,
const Velocity vi,
double  vsAccelOwn,
double  stopTime,
double  D,
double  H 
)
static

Test for LoS(D,H) between two aircraft when only ownship gs accelerates, compute trajectories up to time stopTime

Parameters
soinitial position of ownship
voinitial velocity of ownship
nvothe target velocity of ownship (i.e. after turn maneuver complete)
siinitial position of traffic
viinitial velocity of traffic
vsAccelOwnground speed acceleration of the ownship
stopTimethe duration of the turns
Dhorizontal distance
Hvertical distance
Returns
minimum distance data packed in a Vect4

◆ turn() [1/3]

std::pair< Vect3, Velocity > larcfm::Kinematics::turn ( const std::pair< Vect3, Velocity > &  sv0,
double  t,
double  R,
bool  turnRight 
)
static

Position/Velocity after turning t time units right or left with bank angle bank

Parameters
sv0Pair (initial position, initial velocity)
ttime of turn
Rturn radius
turnRighttrue iff only turn direction is to the right
Returns
Position/Velocity pair after t time

◆ turn() [2/3]

std::pair< Vect3, Velocity > larcfm::Kinematics::turn ( const Vect3 s0,
const Velocity v0,
double  t,
double  bank 
)
static

Position/Velocity after turning t time with bank angle bank, direction of turn determined by sign of bank

Parameters
sv0Pair (initial position, initial velocity)
ttime of turn
bankbank angle (-pi,pi) (positive = right turn, negative = left turn)
Returns
Position/Velocity after t time

◆ turn() [3/3]

std::pair< Vect3, Velocity > larcfm::Kinematics::turn ( const Vect3 s0,
const Velocity v0,
double  t,
double  R,
bool  turnRight 
)
static

Position/Velocity after turning t time units right or left with bank angle bank

Parameters
s0starting position
v0initial velocity
ttime of turn
Rturn radius
turnRighttrue iff only turn direction is to the right
Returns
Position/Velocity after t time

◆ turnByAngle2D()

Vect3 larcfm::Kinematics::turnByAngle2D ( const Vect3 so,
const Vect3 center,
double  alpha 
)
static

Position after turning (does not compute altitude!!)

Note: will be used in a context where altitude is computing subsequently

Parameters
sostarting position
centercenter of turn
alphaturn angle
Returns
position after turn

◆ turnByDist2D() [1/2]

Vect3 larcfm::Kinematics::turnByDist2D ( const Vect3 so,
const Vect3 center,
int  dir,
double  d 
)
static

Position after turning (does not compute altitude!!)

Note: will be used in a context where altitude is computing subsequently

Parameters
sostarting position
centercenter of turn
dirdirection of turnb
ddistance into turn (sign indicates direction)
Returns
Position after turning distance d

◆ turnByDist2D() [2/2]

std::pair< Vect3, Velocity > larcfm::Kinematics::turnByDist2D ( const Vect3 so,
const Vect3 center,
int  dir,
double  d,
double  gsAt_d 
)
static

Position/Velocity

Parameters
s0starting position
center
ddistance into turn
gsAt_d
Returns
Position/Velocity after t time

◆ turnDone()

bool larcfm::Kinematics::turnDone ( double  currentTrack,
double  targetTrack,
bool  turnRight 
)
static

Has the turn completed? Specifically, is the currentTrack at least the targetTrack given that currentTrack is roughly moving in the direction indicated by the parameter turnRight.

Parameters
currentTrackinitial track angle (radians clockwise from true north)
targetTracktarget track angle
turnRighttrue iff only turn direction is to the right
Returns
true iff turn has passed Target

◆ turnOmega() [1/2]

std::pair< Vect3, Velocity > larcfm::Kinematics::turnOmega ( const std::pair< Vect3, Velocity > &  sv0,
double  t,
double  omega 
)
static

Position/Velocity after turning t time units according to track rate omega

Parameters
sv0initial position and velocity
ttime of turn
omegarate of change of track, sign indicates direction
Returns
Position/Velocity after t time

◆ turnOmega() [2/2]

std::pair< Vect3, Velocity > larcfm::Kinematics::turnOmega ( const Vect3 s0,
const Velocity v0,
double  t,
double  omega 
)
static

Position/Velocity after turning t time units according to track rate omega

Parameters
s0starting position
v0initial velocity
ttime of turn
omegarate of change of track, sign indicates direction
Returns
Position/Velocity after t time

◆ turnRadius() [1/2]

double larcfm::Kinematics::turnRadius ( double  speed,
double  bank 
)
static

Calculates turn radius from ground speed and bank angle. The function assumes standard sea-level gravity, see Units.gn.

Parameters
speedground speed
bankbank angle (positive is clockwise looking out the nose of the aircraft), must be in (-pi/2,pi/2).
Returns
radius (always non-negative)

◆ turnRadius() [2/2]

double larcfm::Kinematics::turnRadius ( double  speed,
double  bank,
double  g 
)
static

Calculates turn radius from ground speed and bank angle.

Parameters
speedground speed
bankbank angle (positive is clockwise looking out the nose of the aircraft), must be in (-pi/2,pi/2).
glocal gravitational acceleration (must be positive)
Returns
radius (always non-negative)

◆ turnRate()

double larcfm::Kinematics::turnRate ( double  speed,
double  bankAngle 
)
static

Calculates turn rate (or track-rate) from ground speed and bank angle. Assumes sea-level gravity.

Parameters
speedground speed
bankAnglebank angle, must be in (-pi/2,pi/2)
Returns
turn rate (ie. omega or track rate), positive turn rate is right hand turn.

◆ turnRateGoal()

double larcfm::Kinematics::turnRateGoal ( const Velocity vo,
double  goalTrack,
double  maxBank 
)
static

Calculates turn rate (or track-rate) for the minimum turn to the goal track angle. Assumes sea-level gravity.

Parameters
vothe initial velocity
goalTrackthe goal track angle
maxBankthe maximum bank angle, must be in (0,pi/2)
Returns
turn rate (ie. omega or track rate), positive turn rate is right hand turn.

◆ turnRight()

bool larcfm::Kinematics::turnRight ( const Velocity v0,
double  goalTrack 
)
static

Returns true if the minimal (i.e. less than 180 deg) turn to goalTrack is tp the right

Parameters
v0initial velocity vector
goalTracktarget velocity track [rad]

◆ turnTime() [1/3]

double larcfm::Kinematics::turnTime ( const Velocity v0,
double  goalTrack,
double  maxBank 
)
static

Returns the time it takes to achieve the goal track when making the minimum turn

Parameters
v0initial velocity vector
goalTracktarget velocity track [rad]
maxBankmaximum bank angle, must be in (0,pi/2) [rad]
Returns
time to achieve turn

◆ turnTime() [2/3]

double larcfm::Kinematics::turnTime ( const Velocity v0,
double  goalTrack,
double  maxBank,
bool  turnRight 
)
static

Returns the time it takes to achieve the goal track angle

Parameters
v0initial velocity vector
goalTracktarget velocity track [rad]
maxBankmaximum bank angle, must be in (0,pi/2) [rad]
turnRighttrue iff only turn direction is to the right
Returns
time to achieve turn

◆ turnTime() [3/3]

double larcfm::Kinematics::turnTime ( double  groundSpeed,
double  deltaTrack,
double  bankAngle 
)
static

Returns the time it takes to turn the given angle (deltaTrack). Depending on the signs of deltaTrack and bankAngle, this turn can be more than 180 degrees.

Parameters
groundSpeedground speed of aircraft
deltaTrackgiven angle of turn [rad]
bankAnglebank angle (-pi/2,pi/2) [rad]
Returns
time to achieve turn

◆ turnUntil() [1/2]

std::pair< Vect3, Velocity > larcfm::Kinematics::turnUntil ( const std::pair< Vect3, Velocity > &  sv0,
double  t,
double  goalTrack,
double  maxBank 
)
static

Position/Velocity after t time units turning in minimal direction until goalTrack is reached, after that continue in a straight line

Parameters
sv0initial position and velocity
ttime of turn [s]
goalTrackthe track angle where the turn stops
maxBankthe maximum bank angle
Returns
Position/Velocity after time t

◆ turnUntil() [2/2]

std::pair< Vect3, Velocity > larcfm::Kinematics::turnUntil ( const Vect3 so,
const Velocity vo,
double  t,
double  goalTrack,
double  maxBank 
)
static

Position/Velocity after t time units turning in minimal direction until goalTrack is reached, after that continue in a straight line

Parameters
sostarting position
voinitial velocity
goalTrackthe track angle where the turn stops
bankAnglethe bank angle of the aircraft making the turn
ttime of turn [secs]
turnRighttrue iff only turn direction is to the right
Returns
Position/Velocity after time t

◆ turnUntilTimeOmega() [1/2]

std::pair< Vect3, Velocity > larcfm::Kinematics::turnUntilTimeOmega ( const std::pair< Vect3, Velocity > &  svo,
double  t,
double  turnTime,
double  omega 
)
static

Position/Velocity after t time units turning at the rate of "omega," after that continue in a straight line. This function can make a turn greater than 180 deg

Parameters
soinitial position and velocity
ttime point of interest
turnTimetotal time of turn [secs]
omegaturn rate
Returns
Position/Velocity after time t

◆ turnUntilTimeOmega() [2/2]

std::pair< Vect3, Velocity > larcfm::Kinematics::turnUntilTimeOmega ( const Vect3 so,
const Velocity vo,
double  t,
double  turnTime,
double  omega 
)
static

Position/Velocity after t time units turning in direction "turnRight" for a total of turnTime secs, after that continue in a straight line. This function can make a turn greater than 180 deg

Parameters
sostarting position
voinitial velocity
ttime point of interest
turnTimetotal time of turn [secs]
Rturn radius (positive)
turnRighttrue iff only turn direction is to the right
Returns
Position/Velocity after time t

◆ turnUntilTimeRadius()

std::pair< Vect3, Velocity > larcfm::Kinematics::turnUntilTimeRadius ( std::pair< Vect3, Velocity svo,
double  t,
double  turnTime,
double  R,
bool  turnRight 
)
static

Position/Velocity after t time units turning in direction "turnRight" for a total of turnTime, after that continue in a straight line. This function can make a turn greater than 180 deg

Parameters
sostarting position
voinitial velocity
ttime point of interest
turnTimetotal time of turn [secs]
Rturn radius (positive)
turnRighttrue iff only turn direction is to the right
Returns
Position/Velocity after time t

◆ vsAccel()

std::pair< Vect3, Velocity > larcfm::Kinematics::vsAccel ( const Vect3 so3,
const Velocity vo3,
double  t,
double  a 
)
static

Position/Velocity after a constant vertical speed acceleration for t seconds

Parameters
so3current position
vo3current velocity
tamount of time accelerating
aacceleration, i.e. a positive or negative acceleration
Returns
position/velocity at time t

◆ vsAccelPos()

Vect3 larcfm::Kinematics::vsAccelPos ( const Vect3 so3,
const Velocity vo3,
double  t,
double  a 
)
static

Final 3D position after a constant VS acceleration for t seconds

Parameters
so3current position
vo3current velocity
aacceleration, i.e. a positive or negative acceleration
tamount of time accelerating
Returns
final position

◆ vsAccelTime() [1/2]

double larcfm::Kinematics::vsAccelTime ( const Velocity vo,
double  goalVs,
double  vsAccel 
)
static

returns time required to vertically accelerate to target GoalVS

Parameters
vocurrent velocity
goalVsvertical speed where the acceleration stops
vsAccelvertical speed acceleration (a positive value)
Returns
acceleration time

◆ vsAccelTime() [2/2]

double larcfm::Kinematics::vsAccelTime ( double  vs,
double  goalVs,
double  vsAccel 
)
static

returns time required to vertically accelerate to target GoalVS

Parameters
vscurrent vertical speed
goalVsvertical speed where the acceleration stops
vsAccelvertical speed acceleration (a positive value)
Returns
acceleration time

◆ vsAccelUntil()

std::pair< Vect3, Velocity > larcfm::Kinematics::vsAccelUntil ( const Vect3 so,
const Velocity vo,
double  t,
double  goalVs,
double  vsAccel 
)
static

Position after t time units where there is first an acceleration or deceleration to the target vertical speed goalVs and then continuing at that speed for the remainder of the time, if any.

Parameters
voinitial velocity
goalVsthe vertical speed where the acceleration stops
vsAccelthe vertical speed acceleration (a positive value)
ttime of acceleration [secs]
Returns
Position after time t

◆ vsLevelOutCalculation()

std::pair< Vect3, Velocity > larcfm::Kinematics::vsLevelOutCalculation ( const std::pair< Vect3, Velocity > &  sv0,
double  targetAlt,
double  a1,
double  a2,
double  t1,
double  t2,
double  t3,
double  t 
)
static

returns Pair that contains position and velocity at time t due to level out maneuver based on vsLevelOutTimesAD

Parameters
sv0current position and velocity vectors
ttime point of interest
climbRateclimb rate
targetAlttarget altitude
a1first acceleration
a2second acceleration
allowClimbRateChangeallows climbRate to change to initial velocity if it can help.
Returns

◆ vsLevelOutFinal()

StateVector larcfm::Kinematics::vsLevelOutFinal ( const std::pair< Vect3, Velocity > &  sv0,
double  climbRate,
double  targetAlt,
double  a,
bool  allowClimbRateChange 
)
static

Returns a statevector that holds position, velocity and relative time at final level out position

Parameters
sv0
climbRate
targetAlt
a
allowClimbRateChange
Returns

◆ vsLevelOutTimesBase()

Tuple5< double, double, double, double, double > larcfm::Kinematics::vsLevelOutTimesBase ( double  s0z,
double  v0z,
double  climbRate,
double  targetAlt,
double  accelup,
double  acceldown,
bool  allowClimbRateChange 
)
staticprivate

Helper function for vsLevelOutTimesAD. Note: This could be integrated into the function vsLevelOutTimesAD as a recursive call if desired.

Parameters
s0zinitial vertical position
v0zinitial vertical velocity
climbRatedesired vertical speed for the climb/descent (positive), sign calculated in code
targetAlttarget altitude
accelupmaximum positive acceleration
acceldownmaximum negative acceleration
allowClimbRateChangeif true, if the current velocity is of greater magnitude than the specified climb rate, then continue at the current velocity (prioritize achieving the desired altitude). If false, first achieve the goal climb rate (prioritize achieving the indicated vs)
Returns
<T1 = end of first accel ,T2 = end of constant vertical speed phase, T3 = end of deceleration, a1 = acceleration for phase 1, a2 =acceleration for phase 2>

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