Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
GPSToMetersConverter Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GPSToMetersConverter()

GPSToMetersConverter::GPSToMetersConverter ( const GPSDatum & datum,
const navtypes::gpscoords_t & origin )

Construct a new GPSToMetersConverter object.

Parameters
datumThe datum to use for the GPS calculations.
originThe gps coordinates of the origin of the xy-plane.

Member Function Documentation

◆ getMetersPerDegLat()

double GPSToMetersConverter::getMetersPerDegLat ( ) const

Get the number of meters per degree of latitude.

Given the datum and the origin, this is a constant.

◆ getMetersPerDegLon()

double GPSToMetersConverter::getMetersPerDegLon ( ) const

Get the number of meters per degree of longitude.

Given the datum and the origin, this is a constant.


The documentation for this class was generated from the following files: