56 #ifndef _GAMS_UTILITY_GPS_POSITION_H_ 57 #define _GAMS_UTILITY_GPS_POSITION_H_ 60 #include "madara/knowledge/containers/DoubleVector.h" 61 #include "madara/knowledge/containers/NativeDoubleVector.h" 87 double init_lat = 0.0,
double init_lon = 0.0,
double init_alt = 0.0);
100 :
Position(pos.lat(), pos.lng(), pos.alt()) {}
104 longitude(), latitude(), altitude());
136 madara::knowledge::containers::DoubleArray & rhs)
const;
144 madara::knowledge::containers::NativeDoubleArray & rhs)
const;
159 madara::knowledge::containers::DoubleArray & rhs)
const;
167 madara::knowledge::containers::NativeDoubleArray & rhs)
const;
175 bool approximately_equal(
176 const GPSPosition & rhs,
const double & epsilon)
const;
183 void direction_to (
const GPSPosition& rhs,
double& phi)
const;
190 double distance_to (
const GPSPosition & rhs)
const;
197 std::string to_string (
const std::string & delimiter =
",",
198 const unsigned int precision = 8)
const;
220 static GPSPosition from_string (
const std::string & delimiter =
",");
226 virtual void to_container (
227 madara::knowledge::containers::DoubleArray & target)
const;
233 virtual void from_container (
234 madara::knowledge::containers::DoubleArray & source);
240 virtual void to_container (
241 madara::knowledge::containers::NativeDoubleArray & target)
248 virtual void from_container (
249 madara::knowledge::containers::NativeDoubleArray & source);
288 #endif // _GAMS_UTILITY_GPS_POSITION_H_ double altitude() const
Returns the altitude of the GPS coordinate.
void longitude(double input)
Sets the longitude to the input.
double latitude() const
Returns the latitude of the GPS coordinate.
double longitude() const
Returns the longitude of the GPS coordinate.
void latitude(double input)
Sets the latitude to the input.
std::vector< GPSPosition > GpsPositions
pose::Position to_gps_pos() const
Contains all GAMS-related tools, classes and code.
void altitude(double input)
Sets the altitude to the input.
bool operator<(const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
bool operator!=(const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
GPSPosition(const pose::Position &pos)
A position in an x, y, z coordinate system.
A position in the global positioning system reference frame.
bool operator==(const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
GAMS_EXPORT const ReferenceFrame & gps_frame(void)
Returns the canonical GPS frame representing Earth.