World Geodetic System (WGS 84)
The World Geodetic System (WGS) is a standard used in cartography, geodesy, and satellite navigation including GPS.
NOT to be confused with Geodesics.
Geodetic Coordinates
A geodetic coordinate system is a ellipsoidal coordinate system (NOT spherical).
Geodetic coordinates are a type of curvilinear orthogonal coordinate system used in geodesy based on a reference ellipsoid (NOT sphere).
- Latitude, longitude and altitude
Also see Geodetic Datum.
Spherical vs. geodetic system?
They’re NOT the same.
Geodetic: Latitude (φ), longitude (λ), and height (h).
Spherical: Radius (r), inclination (θ), and azimuth (φ).
Geodetic System (Height): HEIGHT is measured relative to the reference ellipsoid, not from the Earth’s center. Height is the distance perpendicular to the ellipsoid’s surface.
- Practically, that means the height is not measured relative to the ellipse, NOT relative to the origin
ROS Messages
3 main messages to represent GPS data. Novatel uses this.
sensor_msgs/NavSatFix
- This is the most commonly used message type for GPS data in ROS 2.
- Usage: This message is used when your robot receives data from a GPS sensor, providing latitude, longitude, and altitude directly.
std_msgs/Header header
sensor_msgs/NavSatStatus status
float64 latitude
float64 longitude
float64 altitude
float64[9] position_covariance
uint8 position_covariance_type
geographic_msgs/GeoPoint
- It specifically represents a point on the Earth’s surface using latitude, longitude, and altitude.
float64 latitude
float64 longitude
float64 altitude
geographic_msgs/GeoPose
- This message combines a
GeoPoint
(latitude, longitude, altitude) with an orientation (as a quaternion).
geographic_msgs/GeoPoint position
geometry_msgs/Quaternion orientation
There’s also gps_msgs/GPSFix
, which provides a more complete GPS data