﻿# NavSatFix altitude: ellipsoid height is not automatically map elevation

A GNSS value in metres can still use the wrong vertical datum for a robot map. Preserve the ellipsoid contract, geoid conversion and antenna frame separately.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/robotics-navsatfix-ellipsoid-altitude-map-height-datum/
Language: en

## Matching horizontal position can hide a height mismatch

A ground robot overlays its GNSS fix on a site map. Horizontal placement looks reasonable, but the vertical coordinate has a systematic offset, so the application subtracts a convenient constant. Before changing calibration, establish what each height means. Identical metre units do not establish identical vertical reference surfaces. A map using a local construction origin, a sea-level-related height and an ellipsoidal GNSS altitude can all contain plausible numbers while describing different quantities.

## The message already names the altitude datum

The [NavSatFix definition](https://raw.githubusercontent.com/ros2/common_interfaces/rolling/sensor_msgs/msg/NavSatFix.msg) specifies altitude above the WGS84 ellipsoid and quiet NaN when altitude is unavailable. It separately describes header.frame_id as a Euclidean frame associated with the receiver, usually the antenna. That frame string is not the reference ellipsoid. Preserve both meanings. Changing an antenna-to-base transform can account for physical mounting geometry, but it is not by itself an ellipsoid-to-geoid conversion or evidence that an unavailable altitude should become zero.

## A geoid conversion needs its model and sign

The [GeographicLib geoid guide](https://geographiclib.sourceforge.io/C%2B%2B/doc/geoid.html) defines ellipsoidal height h, geoid undulation N and orthometric height H through h=N+H. Thus the corresponding orthometric value is obtained by subtracting N from h. Preserve the chosen geoid model and data, not only the formula. A numerical library’s presence does not establish that the required grid is installed in an offline deployment. Nor does a successful conversion determine which vertical datum the receiving map actually expects.

## A local map does not have a universal sea-level origin

[REP 105](https://raw.githubusercontent.com/ros-infrastructure/rep/master/rep-0105.rst) permits application-specific map reference choices and requires documenting the choice. Do not assume that every map coordinate is orthometric height merely because map is world fixed. Record any local vertical origin and the intended relation to the external datum. A general latitude/longitude projection also does not automatically resolve every vertical convention. Keep horizontal projection, vertical conversion and antenna mounting in separate named stages so each has an inspectable input and output.

## Verify a declared-height fixture before map fusion

Propose a passive coordinate fixture with a declared ellipsoidal height, a chosen model’s independently checked geoid value and an explicit map origin. Check the expected sign of conversion, preservation of unavailable altitude and a round trip under the same model. Do not choose the datum by whichever result best matches a convenient visualization. No GNSS receiver, geoid calculation or robot experiment was run here. Acceptance would verify the stated representation, not the receiver’s physical accuracy or navigation suitability.

## Keep vertical meaning attached to derived positions

[GeoParquet reference metadata](/journal/fg2-geoparquet-absent-null-crs-distinction/) explain another representation boundary. [MVSEC trajectory references](/journal/fg2-mvsec-pose-odometry-different-optimization-reference/) explain another reason heights need qualified interpretation. For the GNSS adapter, retain source datum, conversion model, map origin and physical frame together. A plausible altitude is not a datum certificate, and a valid transform tree does not supply missing geoid information. The final position should remain traceable through these stages before it is used to evaluate localization or control behavior.
