|
GAMS
1.2.2
|
A position in the global positioning system reference frame. More...
#include <GPSPosition.h>
Public Member Functions | |
| GPSPosition (double init_lat=0.0, double init_lon=0.0, double init_alt=0.0) | |
| Constructor. More... | |
| GPSPosition (const GPSPosition &position) | |
| Constructor. More... | |
| GPSPosition (const Position &position) | |
| Constructor. More... | |
| GPSPosition (const pose::Position &pos) | |
| virtual | ~GPSPosition () |
| Destructor. More... | |
| double | altitude () const |
| Returns the altitude of the GPS coordinate. More... | |
| void | altitude (double input) |
| Sets the altitude to the input. More... | |
| bool | approximately_equal (const GPSPosition &rhs, const double &epsilon) const |
| Approximate equality. More... | |
| bool | approximately_equal (const Position &rhs, const double &epsilon) const |
| Approximate equality. More... | |
| bool | approximately_equal_2d (const Position &rhs, const double &epsilon) const |
| Approximate equality. More... | |
| void | direction_to (const GPSPosition &rhs, double &phi) const |
| Get spherical direction to position. More... | |
| void | direction_to (const Position &rhs, double &phi, double &theta) const |
| Get spherical direction to position. More... | |
| double | distance_to (const GPSPosition &rhs) const |
| Get distance between two positions. More... | |
| double | distance_to (const Position &rhs) const |
| Get distance between two positions. More... | |
| virtual double | distance_to_2d (const Position &rhs) const |
| virtual double | distance_to_2d (const Position &end, const Position &check) const |
| Get distance between a point and a line segment. More... | |
| virtual double | dot (const Position &p_2) const |
| Dot product of two positions treated as vectors. More... | |
| virtual void | from_container (madara::knowledge::containers::DoubleArray &source) |
| Helper function for copying values to a MADARA double array. More... | |
| virtual void | from_container (madara::knowledge::containers::NativeDoubleArray &source) |
| Helper function for copying values to a MADARA double array. More... | |
| virtual bool | is_between_2d (const Position &end, const Position &check) const |
| Deterime if a third point is inline and between another two points. More... | |
| double | latitude () const |
| Returns the latitude of the GPS coordinate. More... | |
| void | latitude (double input) |
| Sets the latitude to the input. More... | |
| double | longitude () const |
| Returns the longitude of the GPS coordinate. More... | |
| void | longitude (double input) |
| Sets the longitude to the input. More... | |
| bool | operator!= (const Position &rhs) const |
| Inequality operator. More... | |
| bool | operator!= (const GPSPosition &rhs) const |
| Inequality operator. More... | |
| bool | operator!= (const madara::knowledge::containers::DoubleArray &rhs) const |
| Inequality operator. More... | |
| bool | operator!= (const madara::knowledge::containers::NativeDoubleArray &rhs) const |
| Inequality operator. More... | |
| bool | operator< (const GPSPosition &rhs) const |
| Ordering operator for sets. More... | |
| bool | operator< (const Position &rhs) const |
| Less than used for ordering in stl containers. More... | |
| void | operator= (const GPSPosition &rhs) |
| Assignment operator. More... | |
| bool | operator== (const Position &rhs) const |
| Equality operator. More... | |
| bool | operator== (const GPSPosition &rhs) const |
| Equality operator. More... | |
| bool | operator== (const madara::knowledge::containers::DoubleArray &rhs) const |
| Equality operator. More... | |
| bool | operator== (const madara::knowledge::containers::NativeDoubleArray &rhs) const |
| Equality operator. More... | |
| virtual bool | slope_2d (const Position &p, double &slope) const |
| Get slope between two points. More... | |
| virtual void | to_container (madara::knowledge::containers::DoubleArray &target) const |
| Helper function for copying values to a MADARA double array. More... | |
| virtual void | to_container (madara::knowledge::containers::NativeDoubleArray &target) const |
| Helper function for copying values to a MADARA double array. More... | |
| pose::Position | to_gps_pos () const |
| pose::Position | to_pos (const pose::ReferenceFrame &frame) const |
| virtual Position | to_position (const GPSPosition &ref) const |
| Convert to position using reference location. More... | |
| std::string | to_string (const std::string &delimiter=",", const unsigned int precision=8) const |
| Helper function for converting the position to a string. More... | |
| std::string | to_string (const std::string &delimiter=",") const |
| Helper function for converting the position to a string. More... | |
Static Public Member Functions | |
| static Position | from_record (const madara::knowledge::KnowledgeRecord &record) |
| Helper function for creating a Position from a KnowledgeRecord. More... | |
| static GPSPosition | from_string (const std::string &delimiter=",") |
| Helper function for creating a GPSPosition from a string. More... | |
| static GPSPosition | to_gps_position (const Position &source, const GPSPosition &ref) |
| Convert source to a GPSPosition. More... | |
Public Attributes | |
| double | x |
| the x coordinate (e.g. latitude) More... | |
| double | y |
| the y coordinate (e.g. longitude) More... | |
| double | z |
| the z coordinate (e.g. altitude) More... | |
Protected Member Functions | |
| Position | operator* (const double &scale) const |
| Scale the position. More... | |
| Position | operator+ (const Position &rhs) const |
| Addition operator performs element-wise addition. More... | |
| Position | operator- (const Position &rhs) const |
| Subtraction operator performs element-wise subtraction. More... | |
A position in the global positioning system reference frame.
DEPRECATED: use pose::Position instead. Will be removed in GAMS v2
Definition at line 77 of file GPSPosition.h.
| gams::utility::GPSPosition::GPSPosition | ( | double | init_lat = 0.0, |
| double | init_lon = 0.0, |
||
| double | init_alt = 0.0 |
||
| ) |
Constructor.
| init_lat | the initial latitude |
| init_lon | the initial longitude |
| init_alt | the initial altitude |
| gams::utility::GPSPosition::GPSPosition | ( | const GPSPosition & | position | ) |
Constructor.
| gams::utility::GPSPosition::GPSPosition | ( | const Position & | position | ) |
Constructor.
|
inline |
Definition at line 99 of file GPSPosition.h.
|
virtual |
Destructor.
|
inline |
Returns the altitude of the GPS coordinate.
Definition at line 264 of file GPSPosition.h.
|
inline |
Sets the altitude to the input.
Definition at line 279 of file GPSPosition.h.
| bool gams::utility::GPSPosition::approximately_equal | ( | const GPSPosition & | rhs, |
| const double & | epsilon | ||
| ) | const |
Approximate equality.
| rhs | value to compare |
| epsilon | approximation value in meters |
|
inherited |
Approximate equality.
| rhs | value to compare |
| epsilon | approximation value |
|
inherited |
Approximate equality.
| rhs | value to compare |
| epsilon | approximation value |
| void gams::utility::GPSPosition::direction_to | ( | const GPSPosition & | rhs, |
| double & | phi | ||
| ) | const |
Get spherical direction to position.
| rhs | other position |
| phi | direction to rhs |
|
inherited |
Get spherical direction to position.
| rhs | other position |
| phi | direction in x/y plane |
| theta | direction in z plane |
| double gams::utility::GPSPosition::distance_to | ( | const GPSPosition & | rhs | ) | const |
Get distance between two positions.
| rhs | second position |
|
inherited |
Get distance between two positions.
| rhs | second position |
|
virtualinherited |
| rhs | second position |
|
virtualinherited |
Get distance between a point and a line segment.
| end | end of line segment including *this |
| check | point to find distance for |
|
virtualinherited |
Dot product of two positions treated as vectors.
| p_2 | other position |
|
virtual |
Helper function for copying values to a MADARA double array.
| source | source container to copy values from |
Reimplemented from gams::utility::Position.
|
virtual |
Helper function for copying values to a MADARA double array.
| source | source container to copy values from |
Reimplemented from gams::utility::Position.
|
staticinherited |
|
static |
Helper function for creating a GPSPosition from a string.
| delimiter | characters to insert between position components |
|
virtualinherited |
Deterime if a third point is inline and between another two points.
| end | second endpoint |
| check | point to check |
|
inline |
Returns the latitude of the GPS coordinate.
Definition at line 254 of file GPSPosition.h.
|
inline |
Sets the latitude to the input.
Definition at line 269 of file GPSPosition.h.
|
inline |
Returns the longitude of the GPS coordinate.
Definition at line 259 of file GPSPosition.h.
|
inline |
Sets the longitude to the input.
Definition at line 274 of file GPSPosition.h.
|
inherited |
Inequality operator.
| rhs | value to compare |
| bool gams::utility::GPSPosition::operator!= | ( | const GPSPosition & | rhs | ) | const |
Inequality operator.
| rhs | value to compare |
| bool gams::utility::GPSPosition::operator!= | ( | const madara::knowledge::containers::DoubleArray & | rhs | ) | const |
Inequality operator.
| rhs | value to compare |
| bool gams::utility::GPSPosition::operator!= | ( | const madara::knowledge::containers::NativeDoubleArray & | rhs | ) | const |
Inequality operator.
| rhs | value to compare |
|
protectedinherited |
Scale the position.
| scale | factor to scale by |
Addition operator performs element-wise addition.
| rhs | value to add to *this |
Subtraction operator performs element-wise subtraction.
| rhs | value to subtract from *this |
| bool gams::utility::GPSPosition::operator< | ( | const GPSPosition & | rhs | ) | const |
Ordering operator for sets.
|
inherited |
Less than used for ordering in stl containers.
| rhs | comparing position |
| void gams::utility::GPSPosition::operator= | ( | const GPSPosition & | rhs | ) |
Assignment operator.
| rhs | values to copy |
|
inherited |
Equality operator.
| rhs | value to compare |
| bool gams::utility::GPSPosition::operator== | ( | const GPSPosition & | rhs | ) | const |
Equality operator.
| rhs | value to compare |
| bool gams::utility::GPSPosition::operator== | ( | const madara::knowledge::containers::DoubleArray & | rhs | ) | const |
Equality operator.
| rhs | value to compare |
| bool gams::utility::GPSPosition::operator== | ( | const madara::knowledge::containers::NativeDoubleArray & | rhs | ) | const |
Equality operator.
| rhs | value to compare |
|
virtualinherited |
Get slope between two points.
| p | other point |
| slope | location to store slope between two points |
|
virtual |
Helper function for copying values to a MADARA double array.
| target | target container to copy values to |
Reimplemented from gams::utility::Position.
|
virtual |
Helper function for copying values to a MADARA double array.
| target | target container to copy values to |
Reimplemented from gams::utility::Position.
|
inline |
Definition at line 102 of file GPSPosition.h.
|
static |
Convert source to a GPSPosition.
| source | source position to convert |
| ref | origin GPSPosition |
|
inlineinherited |
Definition at line 98 of file Position.h.
|
virtual |
Convert to position using reference location.
| ref | Reference location |
| std::string gams::utility::GPSPosition::to_string | ( | const std::string & | delimiter = ",", |
| const unsigned int | precision = 8 |
||
| ) | const |
Helper function for converting the position to a string.
| delimiter | characters to insert between position components |
| precision | precision of doubles when printing coordinates |
|
inherited |
Helper function for converting the position to a string.
| delimiter | characters to insert between position components |
|
inherited |
the x coordinate (e.g. latitude)
Definition at line 288 of file Position.h.
|
inherited |
the y coordinate (e.g. longitude)
Definition at line 291 of file Position.h.
|
inherited |
the z coordinate (e.g. altitude)
Definition at line 294 of file Position.h.