General: reorganization of header files
[marnav.git] / src / marnav / geo / position.cpp
blob9627edbcb1d80958b2e36226cc6cba16f49ae31c
1 #include <marnav/geo/position.hpp>
2 #include <marnav/math/constants.hpp>
4 namespace marnav
6 namespace geo
8 position::position(const latitude & la, const longitude & lo)
9 : lat_(la)
10 , lon_(lo)
14 bool position::operator==(const position & other) const
16 return (this == &other) || (lat() == other.lat() && lon() == other.lon());
19 position deg2rad(const position & p)
21 return {math::pi / 180.0 * p.lat(), math::pi / 180.0 * p.lon()};
24 position rad2deg(const position & p)
26 return {p.lat() / math::pi * 180.0, p.lon() / math::pi * 180.0};