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

#include <OrthographicProjection.h>

Public Member Functions

 OrthographicProjection ()
 
 OrthographicProjection (const LatLonAlt &lla)
 
 OrthographicProjection (double lat, double lon, double alt)
 
 ~OrthographicProjection ()
 
OrthographicProjection makeNew (const LatLonAlt &lla) const
 
OrthographicProjection makeNew (double lat, double lon, double alt) const
 
double conflictRange (double latitude, double accuracy) const
 
double maxRange () const
 
LatLonAlt getProjectionPoint () 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
 

Private Member Functions

Vect2 spherical2xy (double lat, double lon) const
 
LatLonAlt xy2spherical (double x, double y, double alt) const
 

Private Attributes

double projAlt
 
LatLonAlt llaRef
 

Detailed Description

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

This is a standard orthographic projection, and is functionally similar to the ENU projection (it uses different calculations).
It distorts distances from the tangent point, compressing them more as the distance increases (similar to a picture of a planet from distant space).
Note that this projection should be considered to have a hard limit of GreatCircle.spherical_earth_radius as the maximum allowed distance from the tangent reference point, and significant distortion may occur at much smaller distances.

Constructor & Destructor Documentation

◆ OrthographicProjection() [1/3]

larcfm::OrthographicProjection::OrthographicProjection ( )

Default constructor.

◆ OrthographicProjection() [2/3]

larcfm::OrthographicProjection::OrthographicProjection ( const LatLonAlt lla)

Create a projection around the given reference point.

Parameters
llareference point

◆ OrthographicProjection() [3/3]

larcfm::OrthographicProjection::OrthographicProjection ( 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

◆ ~OrthographicProjection()

larcfm::OrthographicProjection::~OrthographicProjection ( )
inline

Destructor

Member Function Documentation

◆ conflictRange()

double larcfm::OrthographicProjection::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::OrthographicProjection::getProjectionPoint ( ) const

Get the projection point for this projection

◆ inverse() [1/3]

LatLonAlt larcfm::OrthographicProjection::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::OrthographicProjection::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::OrthographicProjection::inverse ( const Vect3 xyz) const

Return a LatLonAlt value corresponding to the given Euclidean position

◆ inverseVelocity()

Velocity larcfm::OrthographicProjection::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

◆ makeNew() [1/2]

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

Return a new projection with the given reference point

◆ makeNew() [2/2]

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

Return a new projection with the given reference point

◆ maxRange()

double larcfm::OrthographicProjection::maxRange ( ) const

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

◆ project() [1/3]

Vect3 larcfm::OrthographicProjection::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::OrthographicProjection::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::OrthographicProjection::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::OrthographicProjection::project2 ( const LatLonAlt lla) const

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

◆ projectPoint()

Vect3 larcfm::OrthographicProjection::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::OrthographicProjection::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::OrthographicProjection::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)

◆ spherical2xy()

Vect2 larcfm::OrthographicProjection::spherical2xy ( double  lat,
double  lon 
) const
private

Transforms a lat/lon position to a point on in R3 (on a sphere) From Wikipedia: en.wikipedia.org/wiki/Orthographic_projection_in_cartography

Parameters
latLatitude
lonLongitude
Returns
point in R2

◆ toString()

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

String representation


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