Skip to main content

Module gravity

Module gravity 

Source
Expand description

Gravity prior for GPS ENU fits whose positions are (nearly) collinear.

A Sim3 fitted to camera centers on a straight line leaves the rotation about that line unobservable: the scene can end up rolled about the flight line. When that happens the free roll is chosen from gravity: (a) a dominant ground plane fitted to the sparse points (cameras above it, normal -> +Up), or, failing that, (b) the mean optical axis pointing down. Scale and translation stay those of the GPS fit. With non-degenerate GPS nothing here changes the fit.

Structs§

GravityResolution
Outcome of a degenerate-GPS fit.

Enums§

GravityPrior
Which gravity prior fixed the free roll.

Constants§

COLLINEAR_RATIO
Ratio of the 2nd to the 1st singular value of the centred positions below which they count as collinear.

Functions§

collinearity_ratio
σ2/σ1 of the centred positions (1.0 when fewer than 3 points or no spread, so those are never “degenerate” here).
degenerate_ratio
Some(ratio) when the positions are collinear (ratio < COLLINEAR_RATIO).
fit_enu_sim3
Umeyama Sim3 src -> dst; when dst is collinear the roll about the line is resolved with the gravity prior of rec (src are the model-frame positions). None if Umeyama fails.
fit_same_up_sim3
Umeyama Sim3 between two frames that already share the same Up (e.g. two ENU models). With collinear dst the roll about the line is chosen so that +Z maps to +Z.
resolve_roll
Resolves the free roll of t (model -> ENU) about the line through dst.