LatLng Class Reference

Represents a world position in LatLng format. More...

Functions

void getCoordinates (double &latitude, double &longitude, double &altitude, bool in_radian=true) const
 Get the coordinates in radians (default) or in degrees. More...
 
void setCoordinates (double latitude, double longitude, double altitude, bool in_radian=true)
 Set the coordinates in radians (default) or in degrees. More...
 
double getLatitude (bool in_radian=true) const
 Get the latitude coordinate. More...
 
double getLongitude (bool in_radian=true) const
 Get the longitude coordinate. More...
 
double getAltitude () const
 Get the altitude coordinate. More...
 

Protected Attributes

double latitude
 Latitude coordinate. More...
 
double longitude
 Longitude coordinate. More...
 
double altitude
 Altitude coordinate. More...
 

Detailed Description

Represents a world position in LatLng format.

Functions

◆ getCoordinates()

void getCoordinates ( double &  latitude,
double &  longitude,
double &  altitude,
bool  in_radian = true 
) const

Get the coordinates in radians (default) or in degrees.

Parameters
latitudeLatitude coordinate.
longitudeLongitude coordinate.
altitudeAltitude coordinate.
in_radianShould the output be expressed in radians or degrees.

◆ setCoordinates()

void setCoordinates ( double  latitude,
double  longitude,
double  altitude,
bool  in_radian = true 
)

Set the coordinates in radians (default) or in degrees.

Parameters
latitudeLatitude coordinate.
longitudeLongitude coordinate.
altitudeAltitude coordinate.
in_radianIs input are in radians or in degrees.

◆ getLatitude()

double getLatitude ( bool  in_radian = true) const

Get the latitude coordinate.

Parameters
in_radianIs the output should be in radian or degree.
Returns
Latitude in radian or in degree depending in_radian parameter.

◆ getLongitude()

double getLongitude ( bool  in_radian = true) const

Get the longitude coordinate.

Parameters
in_radianis the output should be in radian or degree.
Returns
Longitude in radian or in degree depending in_radian parameter.

◆ getAltitude()

double getAltitude ( ) const

Get the altitude coordinate.

Returns
Altitude coordinate in meters.

Variables

◆ latitude

double latitude
protected

Latitude coordinate.

◆ longitude

double longitude
protected

Longitude coordinate.

◆ altitude

double altitude
protected

Altitude coordinate.