Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.
Dependencies: Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo
Mapping Class Reference
Maps GeoPosition latitude/longitude to CartPosition cartesian x,y. More...
#include <Mapping.h>
Public Member Functions | |
void | init (int count, GeoPosition *p) |
Initialize mapping with a number of GeoPosition coordinates The maximum/minimum values for lat/lon are then used to form four coordinates and linear interpolation is used to map lat/lon to y/x. | |
void | geoToCart (GeoPosition pos, CartPosition *cart) |
Convert a GeoPosition to a CartPosition. | |
void | cartToGeo (float x, float y, GeoPosition *pos) |
Convert a GeoPosition to a CartPosition. | |
void | cartToGeo (CartPosition cart, GeoPosition *pos) |
Convert a GeoPosition to a CartPosition. |
Detailed Description
Maps GeoPosition latitude/longitude to CartPosition cartesian x,y.
Definition at line 9 of file Mapping.h.
Member Function Documentation
void cartToGeo | ( | float | x, |
float | y, | ||
GeoPosition * | pos | ||
) |
Convert a GeoPosition to a CartPosition.
- Parameters:
-
x is the cartesian x coordinate y is the cartesian y coordinate
- Returns:
- pos is the converted GeoPosition lat/lon coordinate pair
Definition at line 66 of file Mapping.cpp.
void cartToGeo | ( | CartPosition | cart, |
GeoPosition * | pos | ||
) |
Convert a GeoPosition to a CartPosition.
- Parameters:
-
cart is the x,y cartesian coordinate pair
- Returns:
- pos is the converted GeoPosition lat/lon coordinate pair
Definition at line 74 of file Mapping.cpp.
void geoToCart | ( | GeoPosition | pos, |
CartPosition * | cart | ||
) |
Convert a GeoPosition to a CartPosition.
- Parameters:
-
pos is the lat/lon pair
- Returns:
- cart is the converted cartesian coordinate pair
Definition at line 58 of file Mapping.cpp.
void init | ( | int | count, |
GeoPosition * | p | ||
) |
Initialize mapping with a number of GeoPosition coordinates The maximum/minimum values for lat/lon are then used to form four coordinates and linear interpolation is used to map lat/lon to y/x.
Definition at line 9 of file Mapping.cpp.
Generated on Tue Jul 12 2022 14:09:28 by 1.7.2