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

#include <NavPoint.h>

Public Member Functions

 NavPoint ()
 
 NavPoint (const Position &p, double t)
 
 NavPoint (const Position &p, double t, const std::string &label)
 
bool isInvalid () const
 
bool almostEquals (const NavPoint &v) const
 
bool almostEqualsPosition (const NavPoint &v, double epsilon_horiz, double epsilon_vert) const
 
bool almostEqualsPosition (const NavPoint &v) const
 
bool operator== (const NavPoint &v) const
 
bool equals (const NavPoint &v) const
 
bool operator!= (const NavPoint &v) const
 
Vect2 vect2 () const
 
Vect3 vect3 () const
 
const LatLonAltlla () const
 
const Positionposition () const
 
double x () const
 
double y () const
 
double z () const
 
double lat () const
 
double lon () const
 
double alt () const
 
double latitude () const
 
double longitude () const
 
double altitude () const
 
double xCoordinate () const
 
double yCoordinate () const
 
double zCoordinate () const
 
double time () const
 
const std::string & name () const
 
bool isNameSet () const
 
bool isLatLon () const
 
const NavPoint mkLat (const double lat) const
 
const NavPoint mkX (const double x) const
 
const NavPoint mkLon (const double lon) const
 
const NavPoint mkY (const double y) const
 
const NavPoint mkAlt (const double alt) const
 
const NavPoint mkZ (const double z) const
 
const NavPoint makeTime (const double time) const
 
const NavPoint makeName (const std::string &label) const
 
const NavPoint appendName (const std::string &label) const
 
const NavPoint appendNameNoDuplication (const std::string &label) const
 
const NavPoint makeAdded () const
 
const NavPoint makeMovedFrom (const NavPoint &o) const
 
const NavPoint makePosition (const Position &p) const
 
Velocity initialVelocity (const NavPoint &s) const
 
double verticalSpeed (const NavPoint &s) const
 
const NavPoint linear (const Velocity &v, const double time) const
 
const NavPoint linearEst (const Velocity &vo, double tm) const
 
const NavPoint interpolate (const NavPoint &np, const double time) const
 
double distanceH (const NavPoint &np2) const
 
double distanceV (const NavPoint &np2) const
 
std::string toStringShort () const
 
std::string toStringShort (int precision) const
 
std::string toString () const
 
std::string toString (int precision) const
 
std::vector< std::string > toStringList (int precision, bool tcp) const
 

Static Public Member Functions

static NavPoint makeLatLonAlt (double lat, double lon, double alt, double t)
 
static NavPoint mkLatLonAlt (double lat, double lon, double alt, double t)
 
static NavPoint makeXYZ (double x, double y, double z, double t)
 
static const NavPointZERO_LL ()
 
static const NavPointZERO_XYZ ()
 
static const NavPointINVALID ()
 
static Velocity initialVelocity (const NavPoint &s1, const NavPoint &s2)
 
static Velocity finalVelocity (const NavPoint &s1, const NavPoint &s2)
 
static Velocity averageVelocity (const NavPoint &s1, const NavPoint &s2)
 

Private Member Functions

const NavPoint copy (const Position &p) const
 

Private Attributes

Position p
 
double t
 
std::string name_s
 

Detailed Description

An immutable class representing a position at a time. In addition a name (or label) can be attached to one of these NavPoints.

Constructor & Destructor Documentation

◆ NavPoint() [1/3]

larcfm::NavPoint::NavPoint ( )

Construct a zero NavPoint

◆ NavPoint() [2/3]

larcfm::NavPoint::NavPoint ( const Position p,
double  t 
)

Construct a new NavPoint from a position and a time. If a NavPoint is derived from an existing NavPoint, use one or more of the "make" factory functions instead.

Parameters
pposition of new NavPoint
ttime of new NavPoint

◆ NavPoint() [3/3]

larcfm::NavPoint::NavPoint ( const Position p,
double  t,
const std::string &  label 
)

Construction a non-TCP NavPoint piecemeal If a NavPoint is derived from an existing NavPoint, use one or more of the "make" factory functions instead.

Parameters
pposition of new NavPoint
ttime of new NavPoint
labelstring label of new NavPoint

Member Function Documentation

◆ almostEquals()

bool larcfm::NavPoint::almostEquals ( const NavPoint v) const

Checks if two NavPoint are almost the same.

Parameters
vNavPoint for comparison
Returns
true, if this NavPoint is almost equal to v.

◆ almostEqualsPosition() [1/2]

bool larcfm::NavPoint::almostEqualsPosition ( const NavPoint v) const

Checks if two NavPoint are almost the same in position.

Parameters
vNavPoint for comparison
Returns
true, if this NavPoint is almost equal to v.

◆ almostEqualsPosition() [2/2]

bool larcfm::NavPoint::almostEqualsPosition ( const NavPoint v,
double  epsilon_horiz,
double  epsilon_vert 
) const

Checks if two NavPoint are almost the same in position.

Parameters
vNavPoint for comparison
epsilon_horizmaximum allowed horizontal difference
epsilon_vertmaximum allowed vertical difference
Returns
true, if this NavPoint is almost equal to v.

◆ alt()

double larcfm::NavPoint::alt ( ) const

Return the altitude

Returns
altitude [m]

◆ altitude()

double larcfm::NavPoint::altitude ( ) const

Return the altitude in [ft]

◆ averageVelocity()

Velocity larcfm::NavPoint::averageVelocity ( const NavPoint s1,
const NavPoint s2 
)
static

Calculate and return the REPRESENTATIVE LINEAR velocity between two NavPoints. This function is commutative: direction between points is always determined by the time ordering of the two points.

Parameters
s1a NavPoint
s2another NavPoint
Returns
velocity

◆ distanceH()

double larcfm::NavPoint::distanceH ( const NavPoint np2) const

Horizontal distance between this point and the other given point

Parameters
np2another point
Returns
horizontal distance

◆ distanceV()

double larcfm::NavPoint::distanceV ( const NavPoint np2) const

Vertical distance between this point and the other given point

Parameters
np2another point
Returns
vertical distance

Vertical distance

◆ equals()

bool larcfm::NavPoint::equals ( const NavPoint v) const

Equality

◆ finalVelocity()

Velocity larcfm::NavPoint::finalVelocity ( const NavPoint s1,
const NavPoint s2 
)
static

Calculate and return the final velocity between two NavPoint This function is commutative: direction between points is always determined by the time ordering of the two points.

Parameters
s1a NavPoint
s2another NavPoint
Returns
velocity

◆ initialVelocity() [1/2]

Velocity larcfm::NavPoint::initialVelocity ( const NavPoint s) const

Calculate and return the initial velocity between the current point and the given point This function is commutative: direction between points is always determined by the time ordering of the two points.

Parameters
sthe given NavPoint
Returns
velocity

◆ initialVelocity() [2/2]

Velocity larcfm::NavPoint::initialVelocity ( const NavPoint s1,
const NavPoint s2 
)
static

Calculate and return the initial velocity between the two NavPoint. This function is commutative: direction between points is always determined by the time ordering of the two points.

Parameters
s1one NavPoint
s2another NavPoint
Returns
velocity between two points

◆ interpolate()

const NavPoint larcfm::NavPoint::interpolate ( const NavPoint np,
const double  time 
) const

return a new NavPoint between this NavPoint and np that corresponds to time by interpolation This function is commutative with respect to the points: direction between points is always determined by the time ordering of the two points. Negative time results in a velocity in the opposite direction (along the same great circle, if in latlon)

Parameters
npnext NavPoint
timetime
Returns
interpolated NavPoint

◆ isInvalid()

bool larcfm::NavPoint::isInvalid ( ) const

Returns true if any components of this NavPoint are marked as Invalid

Returns
true, if invalid

◆ isLatLon()

bool larcfm::NavPoint::isLatLon ( ) const

Is this point specified in lat/lon?

Returns
true, if the point is Lat/Lon (not Euclidean)

◆ isNameSet()

bool larcfm::NavPoint::isNameSet ( ) const

Returns true if the "label" label of this NavPoint has been set.

Returns
true, if label is set

◆ lat()

double larcfm::NavPoint::lat ( ) const

Return the latitude

Returns
latitude [radian]

◆ latitude()

double larcfm::NavPoint::latitude ( ) const

Return the latitude in degrees north

◆ linear()

const NavPoint larcfm::NavPoint::linear ( const Velocity v,
const double  time 
) const

Perform a linear projection of the current NavPoint with given velocity and time. If the current NavPoint is in LatLonAlt, then a constant track angle linear projection is used. Negative time is a projection in the opposite direction (along the same great circle, if in latlon) and into the past

Parameters
vvelocity
timerelative time
Returns
a linear extrapolation NavPoint

◆ linearEst()

const NavPoint larcfm::NavPoint::linearEst ( const Velocity vo,
double  tm 
) const

Compute a new lat/lon that is obtained by moving with velocity vo for tm secs This is a computationally fast estimate, and only should be used for relatively short distances. Negative time is a projection in the opposite direction (along the same great circle, if in latlon) and into the past

Parameters
vovelocity away from original position
tmtime of relocation
Returns
new lat/lon position in direction v0

◆ lla()

const LatLonAlt & larcfm::NavPoint::lla ( ) const

Return the LatLonAlt object

◆ lon()

double larcfm::NavPoint::lon ( ) const

Return the longitude

Returns
longitude [radian]

◆ longitude()

double larcfm::NavPoint::longitude ( ) const

Return the longitude in degrees east

◆ makeAdded()

const NavPoint larcfm::NavPoint::makeAdded ( ) const

Make an "added" point that does not include valid source info

◆ makeLatLonAlt()

NavPoint larcfm::NavPoint::makeLatLonAlt ( double  lat,
double  lon,
double  alt,
double  t 
)
static

Creates a new lat/lon NavPoint with coordinates (lat,lon,alt).

Parameters
latlatitude [deg north latitude]
lonlongitude [deg east longitude]
altaltitude [ft]
ttime
Returns
a new NavPoint

◆ makeMovedFrom()

const NavPoint larcfm::NavPoint::makeMovedFrom ( const NavPoint o) const

Return a new NavPoint that shares all attributes with the specified NavPoint except Position and Time

◆ makeName()

const NavPoint larcfm::NavPoint::makeName ( const std::string &  label) const

Make a new NavPoint from the current with the given name

Parameters
labelnew string label
Returns
a new NavPoint

◆ makePosition()

const NavPoint larcfm::NavPoint::makePosition ( const Position p) const

Return a new NavPoint that shares all attributes with this one, except position

Parameters
pnew Position object
Returns
a new NavPoint object

◆ makeTime()

const NavPoint larcfm::NavPoint::makeTime ( const double  time) const

Make a new NavPoint from the current one with the time changed, source time is not changed

Parameters
timetime in seconds [s]
Returns
a new NavPoint

◆ makeXYZ()

NavPoint larcfm::NavPoint::makeXYZ ( double  x,
double  y,
double  z,
double  t 
)
static

Creates a new Euclidean NavPoint with coordinates (x,y,z).

Parameters
xcoordinate [nmi]
ycoordinate [nmi]
zaltitude [ft]
ttime [s]
Returns
a new NavPoint

◆ mkAlt()

const NavPoint larcfm::NavPoint::mkAlt ( const double  alt) const

Make a new NavPoint from the current one with the altitude changed

Parameters
alta new altitude value [m]
Returns
a new NavPoint

◆ mkLat()

const NavPoint larcfm::NavPoint::mkLat ( const double  lat) const

Make a new NavPoint from the current one with the latitude changed

Parameters
latnew latitude value [radian]
Returns
a new NavPoint

◆ mkLatLonAlt()

NavPoint larcfm::NavPoint::mkLatLonAlt ( double  lat,
double  lon,
double  alt,
double  t 
)
static

Creates a new lat/lon NavPoint with coordinates (lat,lon,alt).

Parameters
latlatitude (radians)
lonlongitude (radians)
altaltitude [m]
ttime
Returns
a new NavPoint

◆ mkLon()

const NavPoint larcfm::NavPoint::mkLon ( const double  lon) const

Make a new NavPoint from the current one with the longitude changed

Parameters
lonnew longitude value [radian]
Returns
a new NavPoint

◆ mkX()

const NavPoint larcfm::NavPoint::mkX ( const double  x) const

Make a new NavPoint from the current one with the X coordinate changed

Parameters
xnew x value [m]
Returns
a new NavPoint

◆ mkY()

const NavPoint larcfm::NavPoint::mkY ( const double  y) const

Make a new NavPoint from the current one with the Y coordinate changed

Parameters
ynew y value [m]
Returns
a new NavPoint

◆ mkZ()

const NavPoint larcfm::NavPoint::mkZ ( const double  z) const

Make a new NavPoint from the current one with the Z coordinate changed

Parameters
znew z value [m]
Returns
a new NavPoint

◆ name()

const std::string & larcfm::NavPoint::name ( ) const

Return the label (or name) for this point

◆ operator!=()

bool larcfm::NavPoint::operator!= ( const NavPoint v) const

Inequality

◆ operator==()

bool larcfm::NavPoint::operator== ( const NavPoint v) const

Equality

◆ position()

const Position & larcfm::NavPoint::position ( ) const

Return the Position object

◆ time()

double larcfm::NavPoint::time ( ) const

Return the time [s]

Returns
time in [s]

◆ toString() [1/2]

std::string larcfm::NavPoint::toString ( ) const

String representation, using the default output precision (see Contants.get_output_precision()) INCLUDING name field

Returns
a string representation

◆ toString() [2/2]

std::string larcfm::NavPoint::toString ( int  precision) const

String representation, using the give precision INCLUDING "name" field

Parameters
precisionnumber of digits of precision
Returns
a string representation

◆ toStringShort() [1/2]

std::string larcfm::NavPoint::toStringShort ( ) const

String representation, using the default output precision (see Contants.get_output_precision())

◆ toStringShort() [2/2]

std::string larcfm::NavPoint::toStringShort ( int  precision) const

String representation, using the give precision, NOT including name field

Parameters
precisionnumber of digits of precision
Returns
a string representation

◆ vect2()

Vect2 larcfm::NavPoint::vect2 ( ) const

Return the horizontal position vector

Returns
a Vect2

◆ vect3()

Vect3 larcfm::NavPoint::vect3 ( ) const

Return the three dimensional position vector

Returns
a Point object (essentially a Vect3 with more natural units)

◆ verticalSpeed()

double larcfm::NavPoint::verticalSpeed ( const NavPoint s) const

Calculate and return the vertical speed between the current point and the given point This function is commutative: direction between points is always determined by the time ordering of the two points.

Parameters
sthe given NavPoint
Returns
vertical speed

◆ x()

double larcfm::NavPoint::x ( ) const

Return the x coordinate

Returns
x coordinate

◆ xCoordinate()

double larcfm::NavPoint::xCoordinate ( ) const

Return the x coordinate in [nmi]

◆ y()

double larcfm::NavPoint::y ( ) const

Return the y coordinate

Returns
y coordinate

◆ yCoordinate()

double larcfm::NavPoint::yCoordinate ( ) const

Return the y coordinate in [nmi]

◆ z()

double larcfm::NavPoint::z ( ) const

Return the z coordinate

Returns
z coordinate

◆ zCoordinate()

double larcfm::NavPoint::zCoordinate ( ) const

Return the z coordinate in [ft]

◆ ZERO_LL()

const NavPoint & larcfm::NavPoint::ZERO_LL ( )
static

A zero NavPoint, in lat/lon coordinates

◆ ZERO_XYZ()

const NavPoint & larcfm::NavPoint::ZERO_XYZ ( )
static

A zero NavPoint, in xyz coordinates


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