LatLongAltitude (Struct)

Namespace: Wrld.Space

Value type that holds a latitude & longitude in degrees and altitude in metres.

Methods

LatLong GetLatLong ()

Retrieve the LatLong without an altitude parameter.

double GetAltitude ()

Get the store altitude in metres.

void SetAltitude (double altitudeInMetres)

Set the current altitude in metres.

Argument Type Description
altitudeInMetres double Altitude in metres.

double GetLatitudeInRadians ()

Convert the latitude from degrees to radians and return it.

double GetLongitudeInRadians ()

Convert the longitude from degrees to radians and return it.

void SetLatitudeInRadians (double latitudeInRadians)

Set the Latitude in radians.

Argument Type Description
latitudeInRadians double Latitude in radians.

void SetLongitudeInRadians (double longitudeInRadians)

Set the Longitude in radians.

Argument Type Description
longitudeInRadians double Longitude in radians.

void SetLatitude (double latitudeInDegrees)

Set latitude in degrees.

Argument Type Description
latitudeInDegrees double Latitude in degrees.

void SetLongitude (double longitudeInDegrees)

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 ()

Create and return an ECEF world position from the underlying latitude, longitude and altitude.

double BearingTo (LatLong toPoint)

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.

LatLongAltitude FromDegrees (double latitudeInDegrees, double longitudeInDegrees, double altitudeInMetres)

Instantiates a LatLongAltitude and returns it without any conversions taking place.

Argument Type Description
latitudeInDegrees double Latitude in degrees.
longitudeInDegrees double Longitude in degrees.
altitudeInMetres double Altitude in metres.

LatLongAltitude FromRadians (double latitudeInRadians, double longitudeInRadians, double altitudeInMetres)

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

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

LatLongAltitude FromECEF (DoubleVector3 world)

Converts a given ECEF position to LatLongAltitude and returns it.

Argument Type Description
world DoubleVector3 World ECEF position.

LatLongAltitude Lerp (LatLongAltitude from, LatLongAltitude to, float time)

Static function, Lerps between two LatLongAltitude positions and returns the interpolated result based on the time parameter passed in.

Argument Type Description
from LatLongAltitude Starting position of the lerp transition.
to LatLongAltitude Ending position of the lerp transition.
time float Current time that has passed in the transition.

String ToString ()

v0.8.17