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

#include <KinematicsLatLon.h>

Static Public Member Functions

static std::pair< LatLonAlt, Velocitylinear (const LatLonAlt &so, const Velocity &vo, double t)
 
static std::pair< LatLonAlt, Velocitylinear (std::pair< LatLonAlt, Velocity > sv0, double t)
 
static double turnRadiusByRate (double speed, double omega)
 
static std::pair< LatLonAlt, VelocityturnOmega (const LatLonAlt &so, const Velocity &vo, double t, double omega)
 
static std::pair< LatLonAlt, VelocityturnOmega (std::pair< LatLonAlt, Velocity > sv0, double t, double omega)
 
static std::pair< LatLonAlt, VelocityturnByDist2D (const LatLonAlt &so, const LatLonAlt &center, int dir, double d, double gsAtd)
 
static LatLonAlt turnByDist2D (const LatLonAlt &so, const LatLonAlt &center, int dir, double d)
 
static LatLonAlt turnByAngle2D (const LatLonAlt &so, const LatLonAlt &center, double alpha)
 
static std::pair< LatLonAlt, Velocityturn (LatLonAlt s0, Velocity v0, double t, double R, bool turnRight)
 
static std::pair< LatLonAlt, Velocityturn (std::pair< LatLonAlt, Velocity > sv0, double t, double R, bool turnRight)
 
static std::pair< LatLonAlt, VelocityturnUntilTimeOmega (std::pair< LatLonAlt, Velocity > svo, double t, double turnTime, double omega)
 
static std::pair< LatLonAlt, VelocityturnUntilTimeOmega (const LatLonAlt &so, const Velocity &vo, double t, double turnTime, double omega)
 
static std::pair< LatLonAlt, VelocityturnUntil (std::pair< LatLonAlt, Velocity > svo, double t, double goalTrack, double maxBank)
 
static std::pair< LatLonAlt, VelocityturnUntil (const LatLonAlt &so, const Velocity &vo, double t, double goalTrack, double maxBank)
 
static std::pair< LatLonAlt, VelocityturnUntilTimeRadius (const std::pair< LatLonAlt, Velocity > &svo, double t, double turnTime, double R, bool turnRight)
 
static LatLonAlt center (const LatLonAlt &s0, double trk, double radius, int dir)
 
static LatLonAlt center (const LatLonAlt &s0, const Velocity &v0, double omega)
 
static double closestTimeOnTurn (const LatLonAlt &s0, const Velocity &v0, double omega, const LatLonAlt &x, double endTime)
 
static double closestDistOnTurn (const LatLonAlt &s0, const Velocity &v0, double R, int dir, const LatLonAlt &x, double maxDist)
 
static std::pair< LatLonAlt, VelocitygsAccel (const LatLonAlt &so, const Velocity &vo, double t, double a)
 
static std::pair< LatLonAlt, VelocitygsAccelUntil (const LatLonAlt &so, const Velocity &vo, double t, double goalGS, double gsAccel_d)
 
static std::pair< LatLonAlt, VelocitygsAccelUntil (std::pair< LatLonAlt, Velocity > sv0, double t, double goalGs, double gsAccel)
 
static std::pair< LatLonAlt, VelocityvsAccel (const LatLonAlt &so, const Velocity &vo, double t, double a)
 
static std::pair< LatLonAlt, VelocityvsAccel (std::pair< LatLonAlt, Velocity > svo, double t, double a)
 
static std::pair< LatLonAlt, VelocityvsAccelUntil (const LatLonAlt &so, const Velocity &vo, double t, double goalVs, double vsAccel)
 
static std::pair< LatLonAlt, VelocityvsAccelUntil (std::pair< LatLonAlt, Velocity > sv0, double t, double goalVs, double vsAccel)
 
static std::pair< LatLonAlt, VelocityvsLevelOut (std::pair< LatLonAlt, Velocity > sv0, double t, double climbRate, double targetAlt, double accelUp, double accelDown, bool allowClimbRateChange)
 
static std::pair< LatLonAlt, VelocityvsLevelOut (std::pair< LatLonAlt, Velocity > sv0, double t, double climbRate, double targetAlt, double a, bool allowClimbRateChange)
 
static std::pair< LatLonAlt, VelocityvsLevelOut (std::pair< LatLonAlt, Velocity > sv0, double t, double climbRate, double targetAlt, double a)
 

Static Public Attributes

static bool chordalSemantics = false
 

Static Private Member Functions

static std::pair< LatLonAlt, VelocityvsLevelOutCalculation (std::pair< LatLonAlt, Velocity > sv0, double targetAlt, double a1, double a2, double t1, double t2, double t3, double t)
 

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

◆ center() [1/2]

LatLonAlt larcfm::KinematicsLatLon::center ( const LatLonAlt s0,
const Velocity v0,
double  omega 
)
static

center of turn

Parameters
s0point on turn
v0velocity at point
omegaturn rate
Returns
turn center

◆ center() [2/2]

LatLonAlt larcfm::KinematicsLatLon::center ( const LatLonAlt s0,
double  trk,
double  radius,
int  dir 
)
static

return center of turn from position on turn (and it track) and radius

Parameters
s0point on turn
trktrack at point
radiusradius of turn
dir+1 clockwise, -1 counterclockwise
Returns
turn center

◆ closestDistOnTurn()

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

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

Parameters
s0turn start position
v0turn start velocity
Rradius
dirdirection of turn
xpoint of interest
maxDisttime at which turn finishes. If ≤ 0, assume a full turn is allowed.
Returns
dist 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::KinematicsLatLon::closestTimeOnTurn ( const LatLonAlt s0,
const Velocity v0,
double  omega,
const LatLonAlt x,
double  endTime 
)
static

EXPERMENTAL 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]

◆ gsAccel()

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::gsAccel ( const LatLonAlt so,
const Velocity vo,
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

◆ gsAccelUntil() [1/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::gsAccelUntil ( const LatLonAlt so,
const Velocity vo,
double  t,
double  goalGS,
double  gsAccel_d 
)
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
socurrent position
vocurrent velocity
goalGsthe ground speed where the acceleration stops
gsAccelthe ground speed acceleration (a positive value)
ttime point of interest
Returns
Position-Velocity pair after time t

◆ gsAccelUntil() [2/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::gsAccelUntil ( std::pair< LatLonAlt, Velocity sv0,
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
svoinitial position and velocity
goalGsthe ground speed where the acceleration stops
gsAccelthe ground speed acceleration (a positive value)
ttime point of interest
Returns
Position-Velocity pair after time t

◆ linear() [1/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::linear ( const LatLonAlt so,
const Velocity vo,
double  t 
)
static

Linearly project the given position and velocity to a new position and velocity

Parameters
sv0initial position and velocity
ttime
Returns
linear projection of sv0 to time t

◆ linear() [2/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::linear ( std::pair< LatLonAlt, Velocity sv0,
double  t 
)
static

Linearly project the given position and velocity to a new position and velocity

Parameters
sv0initial position and velocity
ttime
Returns
linear projection of sv0 to time t

◆ turn() [1/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turn ( LatLonAlt  s0,
Velocity  v0,
double  t,
double  R,
bool  turnRight 
)
static

Position/Velocity after turning t time units right or left with radius R in the direction turnRight

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

◆ turn() [2/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turn ( std::pair< LatLonAlt, Velocity sv0,
double  t,
double  R,
bool  turnRight 
)
static

Position/Velocity after turning t time units right or left with with radius R in the direction turnRight

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

◆ turnByAngle2D()

LatLonAlt larcfm::KinematicsLatLon::turnByAngle2D ( const LatLonAlt so,
const LatLonAlt center,
double  alpha 
)
static

Position/Velocity after turning (does not compute altitude!!)

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

Parameters
sostarting position
centercenter of turn
alphaangle
Returns
Position/Velocity after turning distance d

◆ turnByDist2D() [1/2]

LatLonAlt larcfm::KinematicsLatLon::turnByDist2D ( const LatLonAlt so,
const LatLonAlt center,
int  dir,
double  d 
)
static

Position/Velocity 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 turn
ddistance into turn (non-negative)
Returns
Position/Velocity after turning distance d

◆ turnByDist2D() [2/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnByDist2D ( const LatLonAlt so,
const LatLonAlt center,
int  dir,
double  d,
double  gsAtd 
)
static

Position/Velocity after turning (does not compute altitude!!)

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

Parameters
sostarting position
centercenter of turn
Rradius
ddistance into turn (sign indicates direction)
Returns
Position/Velocity after turning distance d

◆ turnOmega() [1/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnOmega ( const LatLonAlt so,
const Velocity vo,
double  t,
double  omega 
)
static

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

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

◆ turnOmega() [2/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnOmega ( std::pair< LatLonAlt, Velocity sv0,
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

◆ turnRadiusByRate()

double larcfm::KinematicsLatLon::turnRadiusByRate ( double  speed,
double  omega 
)
static

Determine the earth-surface radius of a turn given the ground speed and omega (angular velocity).

Parameters
speed
omega
Returns
turn radius

◆ turnUntil() [1/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnUntil ( const LatLonAlt 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
tmaneuver time [s]
goalTrackthe track angle where the turn stops
maxBankthe bank angle of the aircraft making the turn (positive)
Returns
Position/Velocity after time t

◆ turnUntil() [2/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnUntil ( std::pair< LatLonAlt, Velocity svo,
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. The the time t is not long enough to complete the turn, then a position/velocity towards the goal track is returned.

Parameters
svostarting position and velocity
tmaneuver time [s]
goalTrackthe track angle where the turn stops
maxBankthe maximum bank angle of the aircraft, must be in (0,pi/2)
Returns
Position and Velocity after time t

◆ turnUntilTimeOmega() [1/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnUntilTimeOmega ( const LatLonAlt so,
const Velocity vo,
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
sostarting position
voinitial velocity
ttime point of interest
turnTimetotal time of turn [secs]
omegaturn rate
Returns
Position/Velocity after time t

◆ turnUntilTimeOmega() [2/2]

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnUntilTimeOmega ( std::pair< LatLonAlt, 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

◆ turnUntilTimeRadius()

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::turnUntilTimeRadius ( const std::pair< LatLonAlt, 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< LatLonAlt, Velocity > larcfm::KinematicsLatLon::vsAccel ( const LatLonAlt so,
const Velocity vo,
double  t,
double  a 
)
static

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

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

◆ vsAccelUntil()

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

Position/Velocity 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
sostarting position
voinitial velocity
goalVsvertical speed where the acceleration stops
vsAccelvertical speed acceleration (a positive value)
ttime of the point of interest
Returns
Position after time t

◆ vsLevelOut()

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::vsLevelOut ( std::pair< LatLonAlt, Velocity sv0,
double  t,
double  climbRate,
double  targetAlt,
double  accelUp,
double  accelDown,
bool  allowClimbRateChange 
)
static

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

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

◆ vsLevelOutCalculation()

std::pair< LatLonAlt, Velocity > larcfm::KinematicsLatLon::vsLevelOutCalculation ( std::pair< LatLonAlt, Velocity sv0,
double  targetAlt,
double  a1,
double  a2,
double  t1,
double  t2,
double  t3,
double  t 
)
staticprivate

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

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