Convert spherical coordinates for planetary surfaces. More...
#include <commmon/common.hh>
Public Types | |
enum | SurfaceType { EARTH_WGS84 = 1 } |
Unique identifiers for planetary surface models. More... | |
Public Member Functions | |
SphericalCoordinates () | |
Constructor. More... | |
SphericalCoordinates (const SurfaceType _type) | |
Constructor with surface type input. More... | |
SphericalCoordinates (const SurfaceType _type, const math::Angle &_latitude, const math::Angle &_longitude, double _elevation, const math::Angle &_heading) | |
Constructor with surface type, angle, and elevation inputs. More... | |
~SphericalCoordinates () | |
Destructor. More... | |
double | GetElevationReference () const |
Get reference elevation in meters. More... | |
math::Angle | GetHeadingOffset () const |
Get heading offset for gazebo reference frame, expressed as angle from East to gazebo x-axis, or equivalently from North to gazebo y-axis. More... | |
math::Angle | GetLatitudeReference () const |
Get reference geodetic latitude. More... | |
math::Angle | GetLongitudeReference () const |
Get reference longitude. More... | |
SurfaceType | GetSurfaceType () const |
Get SurfaceType currently in use. More... | |
math::Vector3 | GlobalFromLocal (const math::Vector3 &_xyz) const |
Convert a Cartesian velocity vector in the local gazebo frame to a global Cartesian frame with components East, North, Up. More... | |
void | SetElevationReference (double _elevation) |
Set reference elevation above sea level in meters. More... | |
void | SetHeadingOffset (const math::Angle &_angle) |
Set heading angle offset for gazebo frame. More... | |
void | SetLatitudeReference (const math::Angle &_angle) |
Set reference geodetic latitude. More... | |
void | SetLongitudeReference (const math::Angle &_angle) |
Set reference longitude. More... | |
void | SetSurfaceType (const SurfaceType &_type) |
Set SurfaceType for planetary surface model. More... | |
math::Vector3 | SphericalFromLocal (const math::Vector3 &_xyz) const |
Convert a Cartesian position vector to geodetic coordinates. More... | |
Static Public Member Functions | |
static SurfaceType | Convert (const std::string &_str) |
Convert a string to a SurfaceType. More... | |
Convert spherical coordinates for planetary surfaces.
gazebo::common::SphericalCoordinates::SphericalCoordinates | ( | ) |
Constructor.
gazebo::common::SphericalCoordinates::SphericalCoordinates | ( | const SurfaceType | _type | ) |
Constructor with surface type input.
[in] | _type | SurfaceType specification. |
gazebo::common::SphericalCoordinates::SphericalCoordinates | ( | const SurfaceType | _type, |
const math::Angle & | _latitude, | ||
const math::Angle & | _longitude, | ||
double | _elevation, | ||
const math::Angle & | _heading | ||
) |
Constructor with surface type, angle, and elevation inputs.
[in] | _type | SurfaceType specification. |
[in] | _latitude | Reference latitude. |
[in] | _longitude | Reference longitude. |
[in] | _elevation | Reference elevation. |
[in] | _heading | Heading offset. |
gazebo::common::SphericalCoordinates::~SphericalCoordinates | ( | ) |
Destructor.
|
static |
Convert a string to a SurfaceType.
[in] | _str | String to convert. |
double gazebo::common::SphericalCoordinates::GetElevationReference | ( | ) | const |
Get reference elevation in meters.
math::Angle gazebo::common::SphericalCoordinates::GetHeadingOffset | ( | ) | const |
Get heading offset for gazebo reference frame, expressed as angle from East to gazebo x-axis, or equivalently from North to gazebo y-axis.
math::Angle gazebo::common::SphericalCoordinates::GetLatitudeReference | ( | ) | const |
Get reference geodetic latitude.
math::Angle gazebo::common::SphericalCoordinates::GetLongitudeReference | ( | ) | const |
Get reference longitude.
SurfaceType gazebo::common::SphericalCoordinates::GetSurfaceType | ( | ) | const |
Get SurfaceType currently in use.
math::Vector3 gazebo::common::SphericalCoordinates::GlobalFromLocal | ( | const math::Vector3 & | _xyz | ) | const |
Convert a Cartesian velocity vector in the local gazebo frame to a global Cartesian frame with components East, North, Up.
[in] | _xyz | Cartesian vector in gazebo's world frame. |
void gazebo::common::SphericalCoordinates::SetElevationReference | ( | double | _elevation | ) |
Set reference elevation above sea level in meters.
[in] | _elevation | Reference elevation. |
void gazebo::common::SphericalCoordinates::SetHeadingOffset | ( | const math::Angle & | _angle | ) |
Set heading angle offset for gazebo frame.
[in] | _angle | Heading offset for gazebo frame. |
void gazebo::common::SphericalCoordinates::SetLatitudeReference | ( | const math::Angle & | _angle | ) |
Set reference geodetic latitude.
[in] | _angle | Reference geodetic latitude. |
void gazebo::common::SphericalCoordinates::SetLongitudeReference | ( | const math::Angle & | _angle | ) |
Set reference longitude.
[in] | _angle | Reference longitude. |
void gazebo::common::SphericalCoordinates::SetSurfaceType | ( | const SurfaceType & | _type | ) |
Set SurfaceType for planetary surface model.
[in] | _type | SurfaceType value. |
math::Vector3 gazebo::common::SphericalCoordinates::SphericalFromLocal | ( | const math::Vector3 & | _xyz | ) | const |
Convert a Cartesian position vector to geodetic coordinates.
[in] | _xyz | Cartesian position vector in gazebo's world frame. |