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

#include <SimpleProjection.h>

Public Member Functions

 SimpleProjection ()
 
 SimpleProjection (const LatLonAlt &lla)
 
 SimpleProjection (double lat, double lon, double alt)
 
 ~SimpleProjection ()
 
SimpleProjection makeNew (const LatLonAlt &lla) const
 
SimpleProjection makeNew (double lat, double lon, double alt) const
 
double conflictRange (double latitude, double accuracy) const
 
double maxRange () const
 
LatLonAlt getProjectionPoint () const
 
bool isPolar () const
 
Vect2 project2 (const LatLonAlt &lla) const
 
Vect3 project (const LatLonAlt &lla) const
 
Vect3 project (const Position &sip) const
 
Vect3 projectPoint (const Position &sip) const
 
LatLonAlt inverse (const Vect2 &xy, double alt) const
 
LatLonAlt inverse (const Vect3 &xyz) const
 
Velocity projectVelocity (const LatLonAlt &lla, const Velocity &v) const
 
Velocity projectVelocity (const Position &ss, const Velocity &v) const
 
Velocity inverseVelocity (const Vect3 &s, const Velocity &v, bool toLatLon) const
 
std::pair< Vect3, Velocityproject (const Position &p, const Velocity &v) const
 
std::pair< Vect3, Velocityproject (const LatLonAlt &p, const Velocity &v) const
 
std::pair< Position, Velocityinverse (const Vect3 &p, const Velocity &v, bool toLatLon) const
 
std::string toString () const
 

Static Public Member Functions

static Vect2 projectXY (double lat0, double lon0, double lat1, double lon1)
 
static Vect3 projectXYZ (const LatLonAlt &p0, const LatLonAlt &p1)
 
static Vect2 polar_xy (const LatLonAlt &lla, bool north)
 
static LatLonAlt polar_inverse (const Vect2 &v, double alt, bool north)
 

Private Attributes

double projLat
 
double projLon
 
double projAlt
 
bool projNorth
 

Detailed Description

This class creates a local Euclidean projection around a given point. This projection may be used to transform geodesic coordinates (LatLonAlt objects) into this Euclidean frame, using the project() method. Also points within this frame, may be found in geodesic coordinates with the inverse() method. As long as the points are close to the projection point, the errors will be very small.

This projection has the property that the Euclidean distance in the XY frame is equal to the great circle distance in the lat/lon frame. In addition, the course from the origin to the returned x,y point is the same as the course at the mid point on the great circle arc.

This projection has special code for when positions are near the poles.

Note: projection objects should never be made directly, and instead should be retrieved via Projection.getProjection()

Constructor & Destructor Documentation

◆ SimpleProjection() [1/3]

larcfm::SimpleProjection::SimpleProjection ( )

Default constructor.

◆ SimpleProjection() [2/3]

larcfm::SimpleProjection::SimpleProjection ( const LatLonAlt lla)

Create a projection around the given reference point.

Parameters
llareference point

◆ SimpleProjection() [3/3]

larcfm::SimpleProjection::SimpleProjection ( double  lat,
double  lon,
double  alt 
)

Create a projection around the given reference point.

Parameters
latlatitude of reference point
lonlongitude of reference point
altaltitude of reference point

◆ ~SimpleProjection()

larcfm::SimpleProjection::~SimpleProjection ( )
inline

Destructor

Member Function Documentation

◆ conflictRange()

double larcfm::SimpleProjection::conflictRange ( double  latitude,
double  accuracy 
) const

Given an ownship latitude and desired accuracy, what is the longest distance to conflict this projection will support? [m]

◆ getProjectionPoint()

LatLonAlt larcfm::SimpleProjection::getProjectionPoint ( ) const

Get the projection point for this projection

◆ inverse() [1/3]

LatLonAlt larcfm::SimpleProjection::inverse ( const Vect2 xy,
double  alt 
) const

Return a LatLonAlt value corresponding to the given Euclidean position

◆ inverse() [2/3]

std::pair< Position, Velocity > larcfm::SimpleProjection::inverse ( const Vect3 p,
const Velocity v,
bool  toLatLon 
) const

Given a velocity from a point in Euclidean 3-space, return a projection of this velocity and the point. If toLatLon is true, the point/velocity is projected into the geodetic coordinate space

◆ inverse() [3/3]

LatLonAlt larcfm::SimpleProjection::inverse ( const Vect3 xyz) const

Return a LatLonAlt value corresponding to the given Euclidean position

◆ inverseVelocity()

Velocity larcfm::SimpleProjection::inverseVelocity ( const Vect3 s,
const Velocity v,
bool  toLatLon 
) const

Given a velocity from a point in Euclidean 3-space, return a projection of this velocity. If toLatLon is true, the velocity is projected into the geodetic coordinate space

◆ isPolar()

bool larcfm::SimpleProjection::isPolar ( ) const

Is the reference point near a pole?

Returns
true, if reference point near a pole

◆ makeNew() [1/2]

SimpleProjection larcfm::SimpleProjection::makeNew ( const LatLonAlt lla) const

Return a new projection with the given reference point

◆ makeNew() [2/2]

SimpleProjection larcfm::SimpleProjection::makeNew ( double  lat,
double  lon,
double  alt 
) const

Return a new projection with the given reference point

◆ maxRange()

double larcfm::SimpleProjection::maxRange ( ) const

What is the maximum effective horizontal range of this projection? [m]

◆ polar_inverse()

LatLonAlt larcfm::SimpleProjection::polar_inverse ( const Vect2 v,
double  alt,
bool  north 
)
static

Invert a projection, using the pole as a reference point.

Parameters
vpoint in projected space
altaltitude in projected space
northtrue, if north pole
Returns
geodetic position

◆ polar_xy()

Vect2 larcfm::SimpleProjection::polar_xy ( const LatLonAlt lla,
bool  north 
)
static

Return a projection with the pole as a reference point.

Parameters
llageodetic position
northtrue, if north pole
Returns
position in projected space

◆ project() [1/3]

Vect3 larcfm::SimpleProjection::project ( const LatLonAlt lla) const

Return a projection of a lat/lon(/alt) point in Euclidean 3-space

◆ project() [2/3]

std::pair< Vect3, Velocity > larcfm::SimpleProjection::project ( const Position p,
const Velocity v 
) const

Given a velocity from a point, return a projection of this velocity and the point in Euclidean 3-space. If the position is already in Euclidean coordinates, this acts as the idenitty function.

◆ project() [3/3]

Vect3 larcfm::SimpleProjection::project ( const Position sip) const

Return a projection of a Position in Euclidean 3-space (if already in Euclidian coordinate, this is the identity function)

◆ project2()

Vect2 larcfm::SimpleProjection::project2 ( const LatLonAlt lla) const

Return a projection of a lat/lon(/alt) point in Euclidean 2-space

◆ projectPoint()

Vect3 larcfm::SimpleProjection::projectPoint ( const Position sip) const

Return a projection of a Position in Euclidean 3-space (if already in Euclidian coordinate, this is the identity function)

◆ projectVelocity() [1/2]

Velocity larcfm::SimpleProjection::projectVelocity ( const LatLonAlt lla,
const Velocity v 
) const

Given a velocity from a point in geodetic coordinates, return a projection of this velocity in Euclidean 3-space

◆ projectVelocity() [2/2]

Velocity larcfm::SimpleProjection::projectVelocity ( const Position ss,
const Velocity v 
) const

Given a velocity from a point, return a projection of this velocity in Euclidean 3-space (if already in Euclidian coordinate, this is the identity function)

◆ projectXY()

Vect2 larcfm::SimpleProjection::projectXY ( double  lat0,
double  lon0,
double  lat1,
double  lon1 
)
static

This method performs a particular projection from a spherical Earth latitude/longitude coordinate system to Euclidean (XY) one. Lat/long #0 are placed at the origin of the XY coordinate system. The returned value is an XY position of point #1 relative to point #0.

This projection has the property that the Euclidean distance in the XY frame is equal to the great circle distance in the lat/lon frame. In addition, the course from the origin to the returned x,y point is the same as the course at the mid point on the great circle arc.

This transform has a symmetric correspondence, that is, it doesn't matter which point is the origin: projectXY(lat0,lon0,lat1,lon1) = -projectXY(lat1,lon1,lat0,lon0)

Parameters
lat0latitude of first point
lon0longitude of first point
lat1latitude of second point
lon1longitude of second point
Returns
point in projected space

◆ projectXYZ()

Vect3 larcfm::SimpleProjection::projectXYZ ( const LatLonAlt p0,
const LatLonAlt p1 
)
static

This method performs a particular projection from a spherical Earth latitude/longitude coordinate system to Euclidean (XYZ) one. Lat/long #0 are placed at the origin of the Euclidean coordinate system. The returned value is the position of point #1 relative to point #0.

This projection has the property that the Euclidean distance in the XY frame is equal to the great circle distance in the lat/lon frame. In addition, the course from the origin to the returned x,y point is the same as the course at the mid point on the great circle arc.

This transform has a symmetric correspondence, that is, it doesn't matter which point is the origin: projectXY(lat0,lon0,lat1,lon1) = -projectXY(lat1,lon1,lat0,lon0)

Parameters
p0position one
p1position two
Returns
position in projected space

◆ toString()

std::string larcfm::SimpleProjection::toString ( ) const
inline

String representation


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