gtsam
Loading...
Searching...
No Matches
GnssCommon.cpp File Reference

Implementation of shared GNSS utilities. More...

Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.

Functions

double gtsam::gnss::geodist (const Point3 &sat, const Point3 &rcv, Point3 &e, OptionalJacobian< 1, 3 > H_rcv={})
 Geometric distance with Sagnac correction.

Detailed Description

Implementation of shared GNSS utilities.

Date
April 16, 2026

Function Documentation

◆ geodist()

GTSAM_EXPORT double gtsam::gnss::geodist ( const Point3 & sat,
const Point3 & rcv,
Point3 & e,
OptionalJacobian< 1, 3 > H_rcv = {} )

Geometric distance with Sagnac correction.

Computes the Euclidean distance between a satellite and a receiver in ECEF, plus the first-order Sagnac correction for the rotating Earth. When the satellite and receiver positions coincide (within machine epsilon) the unit vector is set to zero and the optional Jacobian is set to zero, which avoids NaNs from dividing by zero.

Parameters
[in]satSatellite ECEF position (m).
[in]rcvReceiver ECEF position (m).
[out]eUnit vector from receiver to satellite.
[out]H_rcvOptional Jacobian of the returned range w.r.t. rcv (1x3). Includes the contribution from the Sagnac term.
Returns
Geometric range with Sagnac correction (m).