18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_UNITS_UNITS_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_UNITS_UNITS_H_
21 #include <boost/units/cmath.hpp>
22 #include <boost/units/io.hpp>
23 #include <boost/units/quantity.hpp>
24 #include <boost/units/systems/angle/degrees.hpp>
25 #include <boost/units/systems/angle/gradians.hpp>
26 #include <boost/units/systems/si.hpp>
27 #include <boost/units/systems/si/prefixes.hpp>
40 typedef boost::units::gradian::plane_angle
Gradians;
42 typedef boost::units::si::length
Length;
46 using boost::units::si::kilo;
52 template<
typename Unit>
53 using Quantity = boost::units::quantity<Unit, double>;
57 using boost::units::sin;
58 using boost::units::cos;
59 using boost::units::atan2;
61 template<
typename Unit>
64 return std::fabs(lhs.value()-rhs.value()) <= std::numeric_limits<double>::epsilon();
71 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_UNITS_UNITS_H_
static const Length Meters
static const PlaneAngle Degrees
boost::units::degree::plane_angle PlaneAngle
bool roughly_equals(const Quantity< Unit > &lhs, const Quantity< Unit > &rhs)
boost::units::si::dimensionless Dimensionless
boost::units::quantity< Unit, double > Quantity
boost::units::si::length Length
boost::units::gradian::plane_angle Gradians
boost::units::si::velocity Velocity
static const PlaneAngle Degree
static const Velocity MetersPerSecond
static const Velocity MeterPerSecond
static const Length Meter