Geographic Coordinates

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.

<location frame="geodetic">
  <latitude>43.120</latitude>
  <longitude>-78.450</longitude>
  <altitude>1500.000</altitude>
</location>

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.

  1. 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
  1. geographic_msgs/GeoPoint
  • It specifically represents a point on the Earth’s surface using latitude, longitude, and altitude.
float64 latitude 
float64 longitude 
float64 altitude
  1. 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