17 #ifndef _GAZEBO_SPHERICALCOORDINATES_HH_
18 #define _GAZEBO_SPHERICALCOORDINATES_HH_
22 #include <ignition/math/Angle.hh>
23 #include <ignition/math/Vector3.hh>
35 class SphericalCoordinatesPrivate;
84 const ignition::math::Angle &_latitude,
85 const ignition::math::Angle &_longitude,
87 const ignition::math::Angle &_heading);
96 public: ignition::math::Vector3d SphericalFromLocal(
97 const ignition::math::Vector3d &_xyz)
const;
103 public: ignition::math::Vector3d GlobalFromLocal(
104 const ignition::math::Vector3d &_xyz)
const;
109 public:
static SurfaceType
Convert(
const std::string &_str);
120 public:
static double Distance(
const ignition::math::Angle &_latA,
121 const ignition::math::Angle &_lonA,
122 const ignition::math::Angle &_latB,
123 const ignition::math::Angle &_lonB);
127 public: SurfaceType GetSurfaceType()
const;
131 public: ignition::math::Angle LatitudeReference()
const;
135 public: ignition::math::Angle LongitudeReference()
const;
139 public:
double GetElevationReference()
const;
145 public: ignition::math::Angle HeadingOffset()
const;
149 public:
void SetSurfaceType(
const SurfaceType &_type);
153 public:
void SetLatitudeReference(
const ignition::math::Angle &_angle);
157 public:
void SetLongitudeReference(
const ignition::math::Angle &_angle);
161 public:
void SetElevationReference(
double _elevation);
165 public:
void SetHeadingOffset(
const ignition::math::Angle &_angle);
170 public: ignition::math::Vector3d LocalFromSpherical(
171 const ignition::math::Vector3d &_xyz)
const;
177 public: ignition::math::Vector3d LocalFromGlobal(
178 const ignition::math::Vector3d &_xyz)
const;
181 public:
void UpdateTransformationMatrix();
188 public: ignition::math::Vector3d
189 PositionTransform(
const ignition::math::Vector3d &_pos,
190 const CoordinateType &_in,
const CoordinateType &_out)
const;
197 public: ignition::math::Vector3d VelocityTransform(
198 const ignition::math::Vector3d &_vel,
199 const CoordinateType &_in,
const CoordinateType &_out)
const;
203 private: SphericalCoordinatesPrivate *dataPtr;
Convert spherical coordinates for planetary surfaces.
Definition: SphericalCoordinates.hh:42
CoordinateType
Unique identifiers for coordinate types.
Definition: SphericalCoordinates.hh:55
SurfaceType
Unique identifiers for planetary surface models.
Definition: SphericalCoordinates.hh:46
GAZEBO_VISIBLE msgs::Vector3d Convert(const ignition::math::Vector3d &_v)
Convert a ignition::math::Vector3 to a msgs::Vector3d.