All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
Eegeo::Space::SpaceHelpers Namespace Reference

Helper functions for coordinate conversion operations. More...

Functions

double GetAltitude (const dv3 &pointEcef)
 
v3 LocalEcefToZeroAltitudeLocalEcef (const v3 &localEcef, const dv3 &ecefCellOrigin)
 
double GreatCircleDistance (const LatLong &a, const LatLong &b, double sphereRadius)
 
void LatLongBounds (const LatLong &p, double greatCircleRadius, double sphereRadius, LatLong &out_min, LatLong &out_max)
 
double PrincipleAngleImpl (const double angle, const double halfRotation)
 
double PrincipleAngle (double angleRadians)
 
double PrincipleAngleDegrees (double angleDegrees)
 
double AngleDifferenceImpl (double a, double b, double halfRotation)
 
double AngleDifferenceRadians (double radiansA, double radiansB)
 
double AngleDifferenceDegrees (double degreesA, double degreesB)
 
void LatLongBoundsFromPoints (const std::vector< LatLong > &points, LatLong &out_southwest, LatLong &out_northeast)
 
void InflatedLatLongBounds (const LatLong &southwest, const LatLong &northeast, const double inflatePercent, LatLong &out_southwest, LatLong &out_northeast)
 
double GetLongitudeIntervalZeroTwoPi (const double a, const double b)
 
bool LatLongBoundsIntersect (const Space::LatLong &southWestA, const Space::LatLong &northEastA, const Space::LatLong &southWestB, const Space::LatLong &northEastB)
 
std::vector< Streaming::MortonKeyCalculateMortonKeysIntersectingBounds (const int keyDepth, const Space::LatLong &southWestLatLong, const Space::LatLong &northEastLatLong)
 
bool IsEcefPointBehindGlobeHorizon (const dv3 &pointEcef, const dv3 &viewLocationEcef)
 
Eegeo::Geometry::Ray LatLongToVerticallyDownRay (const Space::LatLong &point)
 
dv3 DirectionFromHeadingDegreesAtPoint (double headingDegrees, const dv3 &pointEcef)
 
double HeadingDegreesFromDirectionAtPoint (const dv3 &directionEcef, const dv3 &pointEcef)
 
double AngleDifference (double radiansA, double radiansB)
 

Detailed Description

Helper functions for coordinate conversion operations.

Function Documentation

double Eegeo::Space::SpaceHelpers::AngleDifference ( double  radiansA,
double  radiansB 
)

Calculate the smallest signed angle between two phasors on a circle (for example bearing angles).

Parameters
radiansAInput angle A in radians
radiansBInput angle B in radians
Returns
the difference B - A, expressed in range R[-pi <= x < pi]
double Eegeo::Space::SpaceHelpers::AngleDifferenceDegrees ( double  degreesA,
double  degreesB 
)

Calculate the smallest signed angle between two phasors on a circle (for example bearing angles).

Parameters
degreesAInput angle A in degrees
degreesBInput angle B in degrees
Returns
the difference B - A, expressed in R[-180 <= x < 180]
double Eegeo::Space::SpaceHelpers::GetAltitude ( const dv3 &  pointEcef)

Calculate the altitude above sea level, in metres, of an ECEF point

Parameters
pointEcefpoint in ECEF coordinates
Returns
height above sea level in metres
double Eegeo::Space::SpaceHelpers::PrincipleAngle ( double  angleRadians)

Calculate an angle suitable for expressing a bearing or longitude coordinate in a normalised manner.

Parameters
angleRadiansInput angle in radians
Returns
angleRadians expressed in range R[-pi <= x < pi]
double Eegeo::Space::SpaceHelpers::PrincipleAngleDegrees ( double  angleDegrees)

Calculate an angle suitable for expressing a bearing or longitude in a normalised manner.

Parameters
angleDegreesInput angle in degrees
Returns
angleDegrees expressed in range R[-180 <= x < 180]