Skip to main content

Module dop

Module dop 

Source
Expand description

Dilution of precision (DOP) from a satellite geometry.

Dilution of precision summarises how the receiver-to-satellite geometry maps measurement noise into solution uncertainty. From a design (geometry) matrix H whose rows are the unit line-of-sight vectors plus a clock column, and a diagonal weight matrix W, the cofactor matrix is

Q = (H^T W H)^-1

a 4x4 symmetric matrix ordered [x, y, z, clock] (the position block in ECEF metres, the clock state in the same length unit as the ranges). The DOP scalars are square roots of sums of diagonal cofactor entries. The horizontal/vertical split is taken after rotating the 3x3 position block into a local east-north-up (ENU) frame at the receiver’s geodetic latitude/longitude.

§ENU convention

HDOP, VDOP, and PDOP are convention-dependent: they split the position cofactor along a local “up” axis, and two definitions of “up” appear in the literature. The default everywhere (dop, geometry_cofactor, and the covariance/ellipse helpers) is the geodetic-ellipsoid-normal ENU built from the receiver’s geodetic latitude/longitude (the GNSS standard, matching RTKLIB’s xyz2enu). The alternative is a geocentric-radial ENU whose up is the spherical radial direction position / |position|. The two “up” axes differ by up to ~0.19 degrees (the deflection of the ellipsoid normal from the radial), which moves the horizontal/vertical split by on the order of 1e-3 relative. EnuConvention and the *_with_convention entry points let a caller select the geocentric-radial variant; the default helpers keep the geodetic-normal convention and its 0-ULP goldens. See crate::frame::geocentric_up for the geocentric-vs-geodetic distinction.

§Reproducibility

The normal matrix H^T W H is accumulated by a plain left-to-right sum over the satellites, and the 4x4 inverse is an explicit cofactor (adjugate / determinant) expansion with a fixed term order rather than a LAPACK factorisation. That keeps the whole computation libm/arithmetic-bound and independently reproducible to the bit (it does not depend on a BLAS backend), unlike a general dense inverse routed through LAPACK. The ENU rotation uses sin/cos and the final scalars use sqrt; there is no fused multiply-add.

§Failure mode

A geometry with fewer than four independent line-of-sight directions, or one whose normal matrix is singular or ill-conditioned, has no finite DOP. Such geometries are reported as DopError::Singular rather than returning a NaN-flagged or clamped result. The predicate is deterministic: the determinant is exactly zero, or one of the variance diagonals that a DOP scalar takes the square root of is negative or non-finite.

Structs§

DesignGeometryCofactor
Cofactor matrices from a caller-supplied design matrix.
Dop
The dilution-of-precision scalars for a geometry.
ErrorEllipse2
A confidence ellipse from an arbitrary 2x2 covariance block.
GeometryCofactor
Cofactor matrices from a single-clock GNSS design matrix.
HorizontalErrorEllipse
Horizontal confidence ellipse from an ENU position covariance.
LineOfSight
A line-of-sight unit vector from the receiver toward a satellite, in ECEF.
PositionCovariance
Position covariance from a GNSS design matrix.

Enums§

DopError
Why a geometry has no finite DOP.
EnuConvention
Which local east-north-up frame the position cofactor is rotated into before the horizontal/vertical DOP split.

Functions§

dop
Compute the DOP scalars from line-of-sight directions, diagonal weights, and the receiver geodetic position.
dop_from_design_rows
Compute DOP scalars from a caller-supplied design matrix.
dop_with_convention
dop with an explicit EnuConvention for the horizontal/vertical split.
error_ellipse_2x2
Confidence ellipse from an arbitrary 2x2 covariance block.
error_ellipse_from_geometry
Horizontal confidence ellipse directly from line-of-sight rows and weights.
geometry_cofactor
Compute the single-clock geometry cofactor matrix from line-of-sight rows.
geometry_cofactor_from_design_rows
Compute a cofactor matrix from caller-supplied design rows.
geometry_cofactor_with_convention
geometry_cofactor with an explicit EnuConvention for the position_enu block.
horizontal_error_ellipse
Horizontal confidence ellipse from a local ENU covariance matrix.
line_of_sight_from_az_el_deg
Construct an ECEF line-of-sight unit vector from topocentric azimuth and elevation in degrees.
position_covariance_from_geometry_m2
Position covariance from a single-clock GNSS design matrix.