BoosterSeat  0.1
A C++ library that includes common utilities that are used in other projects.
bst::geo::Point Class Reference

A geographical point. More...

#include <geo.hpp>

Collaboration diagram for bst::geo::Point:

Public Member Functions

 Point ()
 
 Point (double latitude, double longitude)
 Construct a new geographical point at the given latitude and longitude. More...
 
double latitude () const
 
double longitude () const
 
Point shootVector (double bearing, double distance_m) const
 

Private Attributes

double lat_
 Latitude in degrees decimal. North is positive, south is negative. More...
 
double lon_
 Longitude in degrees decimal. East is positive, west is negative. More...
 

Detailed Description

A geographical point.

Constructor & Destructor Documentation

◆ Point() [1/2]

bst::geo::Point::Point ( )

Referenced by shootVector().

Here is the caller graph for this function:

◆ Point() [2/2]

bst::geo::Point::Point ( double  latitude,
double  longitude 
)

Construct a new geographical point at the given latitude and longitude.

Parameters
latitudeThe latitude in degrees decimal.
longitudeThe longitude in degrees decimal.

References bst::GEO_INVALID_LATITUDE, and bst::GEO_INVALID_LONGITUDE.

Member Function Documentation

◆ latitude()

double bst::geo::Point::latitude ( ) const
inline

References lat_.

Referenced by bst::geo::distance(), and TEST().

Here is the caller graph for this function:

◆ longitude()

double bst::geo::Point::longitude ( ) const
inline

References lon_.

Referenced by bst::geo::distance(), and TEST().

Here is the caller graph for this function:

◆ shootVector()

Point bst::geo::Point::shootVector ( double  bearing,
double  distance_m 
) const

References Point(), bst::math::D2R, bst::geo::EARTH_RADIUS_KM, lat_, lon_, and bst::math::R2D.

Referenced by TEST().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ lat_

double bst::geo::Point::lat_
private

Latitude in degrees decimal. North is positive, south is negative.

Referenced by latitude(), and shootVector().

◆ lon_

double bst::geo::Point::lon_
private

Longitude in degrees decimal. East is positive, west is negative.

Referenced by longitude(), and shootVector().