Sidereon.GNSS.Fusion (Sidereon v0.20.0)

Copy Markdown View Source

Stateful GNSS/INS fusion filters.

The filter is an opaque native resource. Calls mutate the native filter and return snapshots, update reports, or versioned state bytes.

Summary

Types

Fusion filter configuration map.

Initial closed-loop INS state and covariance.

IMU sample map accepted by propagate/2.

IMU specification map accepted by filter_config/2.

Loose GNSS position or position-velocity fix.

Three-by-three row-major matrix.

Tight GNSS raw-observation epoch.

Three-vector in ECEF or body axes, depending on field name.

Functions

Configure retained IMU samples and GNSS checkpoints for time synchronization.

Encode the current filter state and retained time-sync history as bytes.

Build a fusion filter config from an IMU spec and options.

Restore a new stateful filter from versioned fusion state bytes.

Return standard IGG-III measurement reweighting settings for loose updates.

Return an IMU stochastic specification.

Build a new stateful filter.

Propagate the filter by one IMU sample.

Propagate the filter by one IMU sample and record the transition for RTS smoothing.

Restore an existing filter from bytes produced by encode_state/1.

Apply fixed-interval RTS smoothing to recorded GNSS/INS fusion history.

Return the current closed-loop filter state.

Return a strapdown mechanization config.

Return the tight receiver-clock state.

Return retained-history occupancy for time synchronization.

Apply a loose GNSS position or position-velocity fix at the current filter epoch.

Apply a loose GNSS fix and record before/after checkpoints for RTS smoothing.

Apply a time-synchronized loose GNSS fix, replaying retained history if needed.

Apply a tight raw GNSS epoch at the current filter epoch.

Apply a tight raw GNSS epoch and record before/after checkpoints for RTS smoothing.

Apply a time-synchronized tight raw GNSS epoch.

Return standard Yang predicted-covariance adaptation settings for loose updates.

Types

filter_config()

@type filter_config() :: map()

Fusion filter configuration map.

filter_state()

@type filter_state() :: map()

Initial closed-loop INS state and covariance.

imu_sample()

@type imu_sample() :: map()

IMU sample map accepted by propagate/2.

imu_spec()

@type imu_spec() :: map() | :mems | :tactical | :navigation

IMU specification map accepted by filter_config/2.

loose_measurement()

@type loose_measurement() :: map()

Loose GNSS position or position-velocity fix.

mat3()

@type mat3() :: [vec3()]

Three-by-three row-major matrix.

tight_epoch()

@type tight_epoch() :: map()

Tight GNSS raw-observation epoch.

vec3()

@type vec3() :: {number(), number(), number()} | [number()]

Three-vector in ECEF or body axes, depending on field name.

Functions

configure_time_sync(filter, opts)

@spec configure_time_sync(Sidereon.GNSS.Fusion.Filter.t(), keyword() | map()) ::
  {:ok, map()} | {:error, term()}

Configure retained IMU samples and GNSS checkpoints for time synchronization.

encode_state(filter)

@spec encode_state(Sidereon.GNSS.Fusion.Filter.t()) ::
  {:ok, binary()} | {:error, term()}

Encode the current filter state and retained time-sync history as bytes.

filter_config(spec \\ :mems, opts \\ [])

@spec filter_config(imu_spec(), keyword() | map()) :: filter_config()

Build a fusion filter config from an IMU spec and options.

Options include :filter_kind (:ekf or :ukf), :mechanization, :loose, :tight, :imu_model, and :ukf_update_options. Loose config may include :measurement_reweighting and :prediction_adaptation.

from_state_bytes(bytes, config \\ filter_config())

@spec from_state_bytes(binary(), filter_config()) ::
  {:ok, Sidereon.GNSS.Fusion.Filter.t()} | {:error, term()}

Restore a new stateful filter from versioned fusion state bytes.

igg_iii_measurement_reweighting(opts \\ [])

@spec igg_iii_measurement_reweighting(keyword() | map()) :: map()

Return standard IGG-III measurement reweighting settings for loose updates.

imu_spec(grade)

@spec imu_spec(imu_spec()) :: map()

Return an IMU stochastic specification.

Presets are :mems, :tactical, and :navigation. A map is passed through after numeric normalization.

new(state, config \\ filter_config())

@spec new(filter_state(), filter_config()) ::
  {:ok, Sidereon.GNSS.Fusion.Filter.t()} | {:error, term()}

Build a new stateful filter.

propagate(filter, sample)

@spec propagate(Sidereon.GNSS.Fusion.Filter.t(), imu_sample()) ::
  {:ok, map()} | {:error, term()}

Propagate the filter by one IMU sample.

propagate_recorded(filter, sample, fusion_rts_history_builder)

@spec propagate_recorded(
  Sidereon.GNSS.Fusion.Filter.t(),
  imu_sample(),
  Sidereon.GNSS.Fusion.FusionRtsHistoryBuilder.t()
) :: {:ok, map()} | {:error, term()}

Propagate the filter by one IMU sample and record the transition for RTS smoothing.

restore_state(filter, bytes)

@spec restore_state(Sidereon.GNSS.Fusion.Filter.t(), binary()) ::
  {:ok, map()} | {:error, term()}

Restore an existing filter from bytes produced by encode_state/1.

smooth_fusion_rts(fusion_rts_history)

Apply fixed-interval RTS smoothing to recorded GNSS/INS fusion history.

state(filter)

@spec state(Sidereon.GNSS.Fusion.Filter.t()) :: {:ok, map()} | {:error, term()}

Return the current closed-loop filter state.

strapdown_config(opts \\ [])

@spec strapdown_config(keyword() | map()) :: map()

Return a strapdown mechanization config.

The current core surface exposes :off coning correction.

tight_clock_state(filter)

@spec tight_clock_state(Sidereon.GNSS.Fusion.Filter.t()) ::
  {:ok, map()} | {:error, term()}

Return the tight receiver-clock state.

time_sync_status(filter)

@spec time_sync_status(Sidereon.GNSS.Fusion.Filter.t()) ::
  {:ok, map()} | {:error, term()}

Return retained-history occupancy for time synchronization.

update_loose(filter, measurement)

@spec update_loose(Sidereon.GNSS.Fusion.Filter.t(), loose_measurement()) ::
  {:ok, map()} | {:error, term()}

Apply a loose GNSS position or position-velocity fix at the current filter epoch.

update_loose_recorded(filter, measurement, fusion_rts_history_builder)

@spec update_loose_recorded(
  Sidereon.GNSS.Fusion.Filter.t(),
  loose_measurement(),
  Sidereon.GNSS.Fusion.FusionRtsHistoryBuilder.t()
) :: {:ok, map()} | {:error, term()}

Apply a loose GNSS fix and record before/after checkpoints for RTS smoothing.

update_loose_time_sync(filter, measurement)

@spec update_loose_time_sync(Sidereon.GNSS.Fusion.Filter.t(), loose_measurement()) ::
  {:ok, map()} | {:error, term()}

Apply a time-synchronized loose GNSS fix, replaying retained history if needed.

update_tight(filter, arg2, epoch)

@spec update_tight(
  Sidereon.GNSS.Fusion.Filter.t(),
  Sidereon.GNSS.SP3.t() | Sidereon.GNSS.Broadcast.t(),
  tight_epoch()
) :: {:ok, map()} | {:error, term()}

Apply a tight raw GNSS epoch at the current filter epoch.

The ephemeris source must be an existing SP3 or broadcast resource.

update_tight_recorded(filter, arg2, epoch, fusion_rts_history_builder)

Apply a tight raw GNSS epoch and record before/after checkpoints for RTS smoothing.

update_tight_time_sync(filter, arg2, epoch)

@spec update_tight_time_sync(
  Sidereon.GNSS.Fusion.Filter.t(),
  Sidereon.GNSS.SP3.t() | Sidereon.GNSS.Broadcast.t(),
  tight_epoch()
) :: {:ok, map()} | {:error, term()}

Apply a time-synchronized tight raw GNSS epoch.

yang_prediction_adaptive_factor(opts \\ [])

@spec yang_prediction_adaptive_factor(keyword() | map()) :: map()

Return standard Yang predicted-covariance adaptation settings for loose updates.