Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
|
A class used to convert gps coordinates to coordinates on a flat xy-plane, and vice versa. More...
#include <gps_util.h>
Public Member Functions | |
GPSToMetersConverter (const GPSDatum &datum, const navtypes::gpscoords_t &origin) | |
Construct a new GPSToMetersConverter object. | |
navtypes::point_t | gpsToMeters (const navtypes::gpscoords_t &coords) const |
convert the given gps coordinates to a coordinate on the xy plane, in meters | |
navtypes::gpscoords_t | metersToGPS (const navtypes::point_t &pos) const |
convert a coordinate on the xy-plane to a gps coordinate | |
double | getMetersPerDegLat () const |
Get the number of meters per degree of latitude. | |
double | getMetersPerDegLon () const |
Get the number of meters per degree of longitude. | |
A class used to convert gps coordinates to coordinates on a flat xy-plane, and vice versa.
The xy-plane will always be measured in meters. Additionally, the xy-plane will be aligned such that +x = +lat, +y = -lon.
GPSToMetersConverter::GPSToMetersConverter | ( | const GPSDatum & | datum, |
const navtypes::gpscoords_t & | origin ) |
Construct a new GPSToMetersConverter object.
datum | The datum to use for the GPS calculations. |
origin | The gps coordinates of the origin of the xy-plane. |
double GPSToMetersConverter::getMetersPerDegLat | ( | ) | const |
Get the number of meters per degree of latitude.
Given the datum and the origin, this is a constant.
double GPSToMetersConverter::getMetersPerDegLon | ( | ) | const |
Get the number of meters per degree of longitude.
Given the datum and the origin, this is a constant.