Mapper  0.9.0
API documentation
Public Member Functions | Static Public Member Functions | Friends | List of all members
OpenOrienteering::LatLon Class Reference

Specifies geographic location by latitude and longitude. More...

#include <latlon.h>

Public Member Functions

constexpr LatLon (double latitude=0.0, double longitude=0.0) noexcept
 Constructs a new LatLon for the latitude and longitude given in degrees. More...
 
constexpr double latitude () const
 Returns the latitude value in degrees. More...
 
constexpr double longitude () const
 Returns the longitude value in degrees. More...
 
constexpr bool operator== (const LatLon &rhs) const
 Returns true if this object has exactly the same latitude and longitude like another. More...
 
constexpr bool operator!= (const LatLon &rhs) const
 Returns true if this object has not exactly the same latitude and longitude like another. More...
 

Static Public Member Functions

static constexpr LatLon fromRadiant (double latitude, double longitude) noexcept
 Returns a new LatLon for the latitude and longitude given in radiant. More...
 

Friends

QDebug operator<< (QDebug dbg, const LatLon &lat_lon)
 Dumps a LatLon to the debug output. More...
 

Detailed Description

Specifies geographic location by latitude and longitude.

Latitude is a geographic coordinate that specifies the north-south position (φ, phi).

Longitude is a geographic coordinate that specifies the east-west position (λ, lambda).

LatLon is meant to be similar to QGeoCoordinate (part of Qt since 5.2). This Qt class might eventually replace LatLon. QGeoCoordinate has altitude as an additional property which is rarely used in Mapper at the moment.

See also
QGeoCoordinate (https://doc.qt.io/qt-5/qgeocoordinate.html)

Constructor & Destructor Documentation

◆ LatLon()

constexpr OpenOrienteering::LatLon::LatLon ( double  latitude = 0.0,
double  longitude = 0.0 
)
inlinenoexcept

Constructs a new LatLon for the latitude and longitude given in degrees.

Member Function Documentation

◆ fromRadiant()

constexpr LatLon OpenOrienteering::LatLon::fromRadiant ( double  latitude,
double  longitude 
)
inlinestaticnoexcept

Returns a new LatLon for the latitude and longitude given in radiant.

◆ latitude()

constexpr double OpenOrienteering::LatLon::latitude ( ) const
inline

Returns the latitude value in degrees.

◆ longitude()

constexpr double OpenOrienteering::LatLon::longitude ( ) const
inline

Returns the longitude value in degrees.

◆ operator!=()

constexpr bool OpenOrienteering::LatLon::operator!= ( const LatLon rhs) const
inline

Returns true if this object has not exactly the same latitude and longitude like another.

FP precision issues are not taken into account.

◆ operator==()

constexpr bool OpenOrienteering::LatLon::operator== ( const LatLon rhs) const
inline

Returns true if this object has exactly the same latitude and longitude like another.

FP precision issues are not taken into account.

Friends And Related Function Documentation

◆ operator<<

QDebug operator<< ( QDebug  dbg,
const LatLon lat_lon 
)
friend

Dumps a LatLon to the debug output.

Note that this requires a reference, not a pointer.


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