LatLong (Struct)

Namespace: Wrld.Space

Value type that holds a latitude & longitude in degrees.

Methods

double GetLatitudeInRadians ()

Convert the current latitude from degrees to radians and return it.

double GetLongitudeInRadians ()

Convert the current longitude from degrees to radians and return it.

void SetLatitudeInRadians (double)

Set latitude in radians.

Argument Type Description
latitudeInRadians double Latitude in radians.

void SetLongitudeInRadians (double)

Set longitude in radians.

Argument Type Description
longitudeInRadians double Longitude in radians.

void SetLatitude (double)

Set latitude in degrees.

Argument Type Description
latitudeInDegrees double Latitude in degrees.

void SetLongitude (double)

Set longitude in degrees.

Argument Type Description
longitudeInDegrees double Longitude in degrees.

double GetLatitude ()

Return the latitude in degrees.

double GetLongitude ()

Return the longitude in degrees.

DoubleVector3 ToECEF ()

Convert the lat-long pair to an ECEF coordinate using altitude as 0.0.

double BearingTo (LatLong)

Get a bearing / direction between the current lat-long and the lat-long provided.

Argument Type Description
toPoint LatLong The point the returned bearing should point towards.

double EstimateGreatCircleDistance (LatLong, LatLong)

Estimates the length (in meters) of a great circle arc along the Earth’s surface, between the two lat-longs provided. This does not take account of changes in surface altitude.

Returns: The estimated distance between the two points, in meters.

Argument Type Description
a LatLong The first of the points to find the distance between.
b LatLong The second of the points to find the distance between.

LatLong FromECEF (DoubleVector3)

Converts a given ECEF position to a surface latitude-longitude.

Argument Type Description
world DoubleVector3 World ECEF position.

LatLong FromDegrees (double, double)

Instantiates the type and returns an instance.

Argument Type Description
latitudeInDegrees double Latitude in degrees.
longitudeInDegrees double Longitude in degrees.

LatLong FromRadians (double, double)

Converts a lat-long in radians to degrees and returns an instance.

Argument Type Description
latitudeInRadians double Latitude in radians.
longitudeInRadians double Longitude in radians.