|
Search Grid
AUVSI Search Path Algorithm 2019-2021
|
Provides functions for converting GPS coordinates to and from 2D coordinates. Converts coordinates to 2D points on the plane tangent to the Earth approximated as a sphere at the anchor coordinate. More...
Macros | |
| #define | EARTH_RADIUS 6378137 |
Enumerations | |
| enum | { X = 0, Y = 1, Z = 2 } |
| Indeces used to store X, Y, and Z coordinates in a vector. | |
Functions | |
| void | init (float_type longitude, float_type latitude) |
| Initialize global reference vectors used for basis vector conversion from an anchor coordinate. Call this before anything else. More... | |
| std::vector< float_type > | GPStoCartesian (const float_type longitude, const float_type latitude) |
| Converts GPS longitude and latitude to 3D Cartesian coordinates with standard basis vectors. Origin is at the center of the Earth. More... | |
| Coord | GPStoCoord (const float_type longitude, const float_type latitude) |
| Converts GPS longitude and latitude to 2D Cartesian coordinates measured in meters. More... | |
| void | CoordtoGPS (const Coord &c, float_type &longitude, float_type &latitude) |
| Converts a 2D coordinate back to GPS longitude and latitude. More... | |
| void | computeBasis () |
| Compute the basis vectors for our Cartesian system. Make sure this is run after init at the start of main. More... | |
| float_type | toRadians (float_type degrees) |
| Convert degrees to radians. More... | |
| float_type | toDegrees (float_type radians) |
| Convert radians to degrees. More... | |
| float_type | toMeters (float_type feet) |
| Convert feet to meters. More... | |
| float_type | toFeet (float_type meters) |
| Convert meters to feet. More... | |
| std::vector< float_type > | conv::ourX (3) |
| Basis vectors for our cartesian system. | |
| std::vector< float_type > | conv::ourY (3) |
| std::vector< float_type > | conv::ourZ (3) |
Variables | |
| std::vector< float_type > | conv::refCart |
| GPS reference point in standard basis 3D Cartesian coordinates. | |
| float_type | conv::convMatrix [3][3] = {} |
| Conversion matrix from standard basis to our basis. | |
| float_type | conv::REF_LONG = 0 |
| Longitude of GPS coordinate used as the origin of our Cartesian system in radians. | |
| float_type | conv::REF_LAT = 0 |
| Latitude of GPS coordinate used as the origin of our Cartesian system in radians. | |
Provides functions for converting GPS coordinates to and from 2D coordinates. Converts coordinates to 2D points on the plane tangent to the Earth approximated as a sphere at the anchor coordinate.
|
inline |
Compute the basis vectors for our Cartesian system. Make sure this is run after init at the start of main.
| void CoordtoGPS | ( | const Coord & | c, |
| float_type & | longitude, | ||
| float_type & | latitude | ||
| ) |
Converts a 2D coordinate back to GPS longitude and latitude.
| c | coordinate to convert |
| longitude | stores the resulting longitude |
| latitude | stores the resulting latitude |
| std::vector< float_type > GPStoCartesian | ( | const float_type | longitude, |
| const float_type | latitude | ||
| ) |
Converts GPS longitude and latitude to 3D Cartesian coordinates with standard basis vectors. Origin is at the center of the Earth.
| longitude | the longitude of the coordinate in radians |
| latitude | the latitude of the coordinate in radians |
| Coord GPStoCoord | ( | const float_type | longitude, |
| const float_type | latitude | ||
| ) |
Converts GPS longitude and latitude to 2D Cartesian coordinates measured in meters.
| longitude | the longitude of the coordinate in radians |
| latitude | the latitude of the coordinate in radians |
| void init | ( | float_type | longitude, |
| float_type | latitude | ||
| ) |
Initialize global reference vectors used for basis vector conversion from an anchor coordinate. Call this before anything else.
| longitude | the longitude of the anchor coordinate in radians |
| latitude | the latitude of the anchor coordinate in radians |
|
inline |
Convert radians to degrees.
| radians | radians to convert |
|
inline |
Convert meters to feet.
| meters | meters to convert |
|
inline |
Convert feet to meters.
| feet | feet to convert |
|
inline |
Convert degrees to radians.
| degrees | degrees to convert |