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

#include <Projection.h>

Static Public Member Functions

static EuclideanProjection createProjection (double lat, double lon, double alt)
 
static EuclideanProjection createProjection (const LatLonAlt &lla)
 
static EuclideanProjection createProjection (const Position &pos)
 
static double projectionConflictRange (double lat, double accuracy)
 
static double projectionMaxRange ()
 
static void setProjectionType (ProjectionType t)
 
static ProjectionType getProjectionTypeFromString (std::string s)
 
static ProjectionType getProjectionType ()
 

Static Private Attributes

static EuclideanProjection projection = EuclideanProjection()
 
static ProjectionType ptype = projection_type_value__
 

Detailed Description

A static holding class for universal projection (Spherical Earth to Euclidean plane) information.
All projection objects should be retrieved from this class.

Remember that the given projection point becomes the origin of the Euclidean space, so to preserve absolute altitude (above sea level) information in the Euclidean space, it may be necessary to make the projection point's altitude zero.

Member Function Documentation

◆ createProjection() [1/3]

EuclideanProjection larcfm::Projection::createProjection ( const LatLonAlt lla)
static

Returns a new projection for the current type with the given reference point.

Note that in the projected Euclidean frame, if two points are made using the same projection, their relative altitudes will be consistent, but their absolute altitudes may have changed (the reference point is subtracted). If you need to have the same absolute altitude values in the geodetic and Euclidean frames, the reference point should have a zero altitude.

For example, if you call p2 = Projection.createProjection(p1).project(p1), p2 will have an altitude of zero. If you instead call p2 = Projection.createProjection(p1.zeroAlt(0)).project(p1), p2 will have the same altitude as p1.

Parameters
llareference point
Returns
new projection

◆ createProjection() [2/3]

EuclideanProjection larcfm::Projection::createProjection ( const Position pos)
static

Returns a new projection for the current type with the given reference point. This will return an altitude-preserving projection against the given Position if it is lat/lon. If it is Euclidean, the projection will be against the LatLonAlt.ZERO point.

Note that in the projected Euclidean frame, if two points are made using the same projection, their relative altitudes will be consistent, but their absolute altitudes may have changed (the reference point is subtracted). If you need to have the same absolute altitude values in the geodetic and Euclidean frames, the reference point should have a zero altitude.

For example, if you call p2 = Projection.createProjection(p1).project(p1), p2 will have an altitude of zero. If you instead call p2 = Projection.createProjection(p1.zeroAlt(0)).project(p1), p2 will have the same altitude as p1.

Parameters
posreference point
Returns
new projection

◆ createProjection() [3/3]

EuclideanProjection larcfm::Projection::createProjection ( double  lat,
double  lon,
double  alt 
)
static

Returns a new projection for the current type with the given reference point.

Note that in the projected Euclidean frame, if two points are made using the same projection, their relative altitudes will be consistent, but their absolute altitudes may have changed (the reference point is subtracted). If you need to have the same absolute altitude values in the geodetic and Euclidean frames, the reference point should have a zero altitude.

Parameters
latlatitude of reference point
lonlongitude of reference point
altaltitude of reference point
Returns
new projection

◆ getProjectionType()

ProjectionType larcfm::Projection::getProjectionType ( )
static

Return the current ProjectionType

Returns
type of projection

◆ getProjectionTypeFromString()

ProjectionType larcfm::Projection::getProjectionTypeFromString ( std::string  s)
static

Given a string representation of a ProjectionType, return the ProjectionType

Parameters
sname of projection type
Returns
projection type

◆ projectionConflictRange()

double larcfm::Projection::projectionConflictRange ( double  lat,
double  accuracy 
)
static

Geodetic projections into the Euclidean frame, for various reasons, tend to lose accuracy over long distances or when close to the poles. This can be countered by examining trajectories as shorter segments at a time.
This is already done in Detector and Stratway, but not in any other tools. For CDII, it is best to break up the ownship's plan in this way. For CDSI and IntentBands, it is better to break up the traffic in this way.

This return an estimate on the suggested maximum segment size, depending on the current projection.

Parameters
lat- latitude [rad]
accuracy- desired accuracy (allowable error) [m]
Returns
the maximum length of a trajectory segment at the given latitude that preserves the desired accuracy.

◆ projectionMaxRange()

double larcfm::Projection::projectionMaxRange ( )
static

This is a range about which the projection will completely break down and start producing nonsensical answers. Attempting to use the projection at ranges greater than this is an error state (at ranges less than this but greater than the conflictRange, it may still be unacceptably inaccurate, however).

Returns
maximum range for the projection (in meters).

◆ setProjectionType()

void larcfm::Projection::setProjectionType ( ProjectionType  t)
static

Set the projection to a new type. This is a global change.

Parameters
ttype of projection

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