Class MovementDetectorPos
Defined in File MovementDetectorPos.hpp
Inheritance Relationships
Base Type
public navtk::inertial::MovementDetectorPlugin(Class MovementDetectorPlugin)
Class Documentation
Accepts position data and attempts to detect movement based on delta positions.
Public Functions
Constructor.
- Parameters
speed_cutoff – Nominal speed threshold for platform to be considered moving, in m/s. Speed in all axes must be below this value to be classified as stationary over the period between 2 position inputs.
zero_corr_distance – Threshold distance between two sequential position measurements at which they are considered uncorrelated, in m. Correlation between the the two measurements is linearly scaled based on the norm distance between the two points;
Add another position measurement and possibly update status.
When a new measurement is received, the NED speed is calculated and if under
speed_cutoffin all axes status is set to MovementStatus::NOT_MOVING. Otherwise, the delta position is compared to the covariance of the difference measurements. If the change in position in any single axis is greater than the 3 sigma bounds, status is set to MovementStatus::MOVING. For all other cases status is set to MovementStatus::POSSIBLY_MOVING. The covariance of the differenced measurements is calculated as\( \sigma_{diff}^2 = \sigma^2_{k-1} + \sigma^2_{k} - 2 \rho \sigma_{k - 1} \sigma_{k} \)
where \( \rho \), the correlation coefficient, is
\( 1 - \frac{\left|\Delta p_{k-1, k}\right|}{z} \)
and \( z \) is the value of the zero_corr_distance constructor parameter.
- Parameters
data – Position measurement to process. Must dynamic cast to a MeasurementPosition or will be ignored.
- Returns
Best estimate of movement status based on the last 2 measurements received. If
datais tagged with a time earlier than the last measurement received (defined as a dt < 1e-20), a warning will be generated, or an error thrown, depending on the value of navtk::ErrorMode.
Time of last measurement received.
- Returns
Last time;
to_type_timestamp(0, 0)if no measurements yet received.