1 unstable release
Uses new Rust 2024
new 0.1.0 | Apr 15, 2025 |
---|
#47 in #equation
25 downloads per month
56KB
708 lines
Strapdown navigation toolbox for various navigation filters
This crate provides a set of tools for implementing navigation filters in Rust. The filters are implemented as structs that can be initialized and updated with new sensor data. The filters are designed to be used in a strapdown navigation system, where the orientation of the sensor is known and the sensor data can be used to estimate the position and velocity of the sensor. While utilities exist for IMU data, this crate does not currently support IMU output directly and should not be thought of as a full inertial navigation system (INS). This crate is designed to be used to test the filters that would be used in an INS, but the raw IMU output firmware. As such the IMU data is assumed to be relative accelerations and rotations. Additional signals that can be derived using IMU data, such as gravity or magnetic vector and anomalies, should come from a separate IMU channel. In other words, to calculate the gravity vector the IMU output should be parsed to seperately output the overall acceleration and rotation of the sensor whereas the navigation filter will use the gravity and orientation corrected acceleration and rotation to estimate the position
Primarily built off of three crate dependencies:
- nav-types: Provides basic coordinate types and conversions.
- nalgebra: Provides the linear algebra tools for the filters.
- haversine-rs: Provides the haversine formula for calculating distances between two points on the Earth's surface, which is the primary error metric.
All other functionality is built on top of these crates. The primary reference text is Prinicples of GNSS,
Inertial, and Multisensor Integrated Navigation Systems, 2nd Edition by Paul D. Groves. Where applicable,
calculations will be referenced by the appropriate equation number tied to the book. In general, variables
will be named according to the quantity they represent and not the symbol used in the book. For example,
the Earth's equitorial radius is named
EQUITORIAL_RADIUS
instead ofa
. This style is sometimes relaxed within the body of a given function, but the general rule is to use descriptive names for variables and not mathematical symbols. Strapdown mechanization data and equations
This crate contains the implementation details for the strapdown navigation equations implemented in the Local Navigation Frame. The equations are based on the book "Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems, Second Edition" by Paul D. Groves. This file corresponds to Chapter 5.4 and 5.5 of the book. Effort has been made to reproduce most of the equations following the notation from the book. However, variable and constants should generally been named for the quatity they represent rather than the symbol used in the book.
Coordinate and state definitions
The typical nine-state NED/ENU navigation state vector is used in this implementation. The state vector is defined as:
x = [pn, pe, pd, v_n, v_e, v_d, phi, theta, psi]
Where:
pn
,pe
, andpd
are the WGS84 geodetic positions (degrees latitude, degrees longitude, meters relative to the ellipsoid).v_n
,v_e
, andv_d
are the local level frame (NED/ENU) velocities (m/s) along the north axis, east axis, and vertical axis.phi
,theta
, andpsi
are the Euler angles (radians) representing the orientation of the body frame relative to the local level frame.
The coordinate convention and order is in NED. ENU implementations are to be added in the future.
Dependencies
~4MB
~85K SLoC