You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,53 +12,48 @@ Strapdown-rs is a straightforward strapdown inertial navigation system (INS) imp
12
12
13
13
## Installation
14
14
15
-
To use `strapdown-rs`, you can add it as a dependency in your `Cargo.toml` file: `cargo add strapdown-rs` or install it directly via `cargo install strapdown-rs`.
15
+
To use `strapdown-rs`, you can add it as a dependency in your `Cargo.toml` file: `cargo add strapdown-rs` or install the simulation binary directly via `cargo install strapdown-rs`.
16
16
17
17
## Summary
18
18
19
-
`strapdown-rs` is a Rust-based software library for implementing strapdown inertial navigation systems (INS). It provides core functionality for processing inertial measurement unit (IMU) data to estimate position, velocity, and orientation using a strapdown mechanization model that is typical of modern systems particularly in the low size, weight, and power (low SWaP) domain (cell phones, drones, robotics, UAVs, UUVs, etc.).
19
+
`strapdown-rs` is a Rust-based software library for implementing strapdown inertial navigation systems (INS). It provides core functionality for processing inertial measurement unit (IMU) data to estimate position, velocity, and orientation using a strapdown mechanization model that is typical of modern systems particularly in the low size, weight, and power (low SWaP) domain (cell phones, drones, robotics, UAVs, UUVs, etc.). Additionally, it provides some basic simulation capabilities for simulating INS scenarios (e.g. dead reckoning, closed-loop INS, intermitent GPS, GPS degradation, etc.).
20
20
21
-
`strapdown-rs` prioritizes correctness, numerical stability, and performance. It is built with extensibility in mind, allowing researchers and engineers to implement additional filtering, sensor fusion, or aiding algorithms on top of the base INS framework. This library is not intended to be a full-featured INS solution, notably it treats IMU output as pre-filtered measurements of relative motion. The toolbox is designed for research, teaching, and development purposes and aims to serve the broader robotics, aerospace, and autonomous systems communities. The intent is to provide a high-performance, memory-safe, and cross-platform implementation of strapdown INS algorithms that can be easily integrated into existing systems.
21
+
`strapdown-rs` prioritizes correctness, numerical stability, and performance. It is built with extensibility in mind, allowing researchers and engineers to implement additional filtering, sensor fusion, or aiding algorithms on top of the base INS framework. This library is not intended to be a full-featured INS solution, notably it does not have code for processing raw IMU or GPS signals and only implements a loosely-couple INS.
22
22
23
-
For basic reference, the library includes a basic GPS-based loosely couple INS measurement model, as well as a generic zero-mean normal distribution measurement model.
23
+
The toolbox is designed for research, teaching, and development purposes and aims to serve the broader robotics, aerospace, and autonomous systems communities. The intent is to provide a high-performance, memory-safe, and cross-platform implementation of strapdown INS algorithms that can be easily integrated into existing systems. The simulation is intended to be used for testing and verifying the correctness of the INS algorithms, by providing a simple simulation that allows users to generate a "ground truth" trajectory.
24
24
25
25
## Statement of Need
26
26
27
27
Strapdown INS implementations are commonly written in MATLAB, Python, or C++, and are typically *proprietary* or are heavily integrated into an existing architecture or framework. This project provides a high-performance, memory-safe, and cross-platform implementation in Rust — a modern systems language well-suited for embedded and real-time applications. Why Rust and why another INS library? Several reasons that are pertinent critiques of each language:
28
28
29
29
### MATLAB
30
30
31
-
Many proprietary research INS implementation exist in the maritime, aerospace, and defense engineering sectors which have robust experience with developing and researching INS algorithms. While MATLAB is great for prototyping, it is not suitable for production systems due to performance and deployment issues nor is it a systems programming language. This makes for the common refrain of "prototype in MATLAB, implement in C/C++". This generate additional workload and complexity for industry researchers and engineers as it introduces additional complexity and potential for bugs via the translation process. MATLAB is also antithetical to open science being a proprietary language with a closed-source ecosystem.
31
+
Many proprietary research INS implementation exist in the maritime, aerospace, and defense engineering sectors which have robust experience with developing and researching INS algorithms. While MATLAB is great for prototyping, it is not suitable for production systems due to performance and deployment issues, nor is it a systems programming language. This makes for the common refrain of "prototype in MATLAB, implement in C/C++". This generates additional workload and complexity for industry researchers and engineers as it introduces additional complexity and potential for bugs via the translation process. MATLAB is also antithetical to open science being a proprietary language with a closed-source ecosystem.
32
32
33
33
### C/C++
34
34
35
-
While different, C and C++ are often used interchangeably in the context of INS implementations. C is a low-level language that provides direct access to hardware and memory, making it suitable for performance-critical applications. However, C lacks modern features such as memory safety, concurrency, and high-level abstractions, which can lead to complex and error-prone code. C++ offers some of these features but is often criticized for its complexity and steep learning curve. Both languages also have a steep learning curve for those who are not familiar with systems programming. Simply put, these languages do not have the same level of safety and ease of use as higher-level languages like Python or MATLAB. This can make it difficult for researchers and engineers to implement and maintain complex algorithms, especially in the context where performance is still needed. Furthermore, these languages lack modern tooling making managing your dependencies, building, and testing more difficult.
35
+
While different, C and C++ are often used interchangeably in the context of INS implementations. C is a low-level language that provides direct access to hardware and memory, making it suitable for performance-critical applications. However, C lacks modern features such as memory safety and high-level abstractions, which can lead to complex and error-prone code. C++ offers some of these features but is often criticized for its complexity and steep learning curve. Both languages also have a steep learning curve for those who are not familiar with systems programming. Simply put, these languages do not have the same level of safety and ease of use as higher-level languages like Python or MATLAB. This can make it difficult for researchers and engineers to implement and maintain complex algorithms, especially in the context where performance is still needed. Furthermore, these languages lack modern tooling making managing your dependencies, building, and testing more difficult.
36
36
37
37
### Python
38
38
39
39
Python is a great language for rapid prototyping and development, but it is not suitable for performance-critical applications. It also has issues with memory management and real-time constraints due to it's garbage collected nature. While Python is widely used and has many high-performance libraries (namely NumPy) for numerical computing, some applications simply cannot be vectorized appropriately to take advantage of the underlying C libraries or through additional tools like Numba. When running simulations, there is sometimes no avoiding a loop, something Python is notoriously slow at executing.
40
40
41
-
Specifically, one algorithm that is frequently used in navigation is a Particle Filter (PF). Particle filters are often used for state estimation in non-linear systems, and they require a large number of particles to be effective, particularly when used in systems with large state vectors. This introduces the primary problem that motivated the development of `strapdown-rs`. It makes sense to re-use the same code for typical local-level frame forward mechanization. This is a standard set of equations that can be used in multiple different INS architectures. For a Kalman Filter based INS, this is relatively simple and you can typically use whatever language's linear algebra library you prefer to store the data. You can also do the same for the particle filter, and have list of vectors that represent the particles. However, this forces you into the trap of Python: iterating through the the list.
41
+
Specifically, one algorithm that is frequently used in navigation is a Particle Filter (PF). Particle filters are often used for state estimation in non-linear systems, and they require a large number of particles to be effective, particularly when used in systems with large state vectors. This introduces the primary problem that motivated the development of `strapdown-rs`. It makes sense to re-use the same code for typical local-level frame forward mechanization. This is a standard set of equations that can be used in multiple different INS architectures. For a Kalman Filter based INS, this is relatively simple and you can typically use whatever language's linear algebra library you prefer to store the data. You can also do the same for the particle filter, and have list of vectors that represent the particles. However, this forces you into the trap of Python: iterating through the the list.
42
42
43
-
Alternatively, you could vectorize the operations, but this introduces additional complexity and requires you to test and verify that the vectorize operations match the original forward mechanization equations. This makes it difficult to swap out the filtering algorithm or the forward mechanization equations without rewriting large portions of the code.
43
+
Alternatively, you could vectorize the operations, but this introduces additional complexity and requires you to test and verify that the vectorized operations match the original forward mechanization equations. This makes it difficult to swap out the filtering algorithm or the forward mechanization equations without rewriting large portions of the code.
44
44
45
45
Thus what is needed is a modern, compiled, systems programming language with a useful linear algebra library.
46
46
47
47
### Rust
48
48
49
-
Rust is a modern systems programming language that combines the performance of C/C++ with the safety and concurrency features of higher-level garbage-collected languages. It is designed for performance-critical applications and has a strong focus on memory safety, making it an ideal choice for implementing strapdown INS algorithms. From a scientific development perspective, Rust puts guardrails on scientist-developers who's primary skill set isn't in writing production-grade memory safe code. By following basic good practices in Rust, you get the benefits of modern tooling and language syntax that you get with Python, Java, and Go with the performance of C or C++, with the additional guarantee of if it compiles, the only bugs are *logic* bugs.
49
+
Rust is a modern systems programming language that combines the performance of C/C++ with the safety and concurrency features of higher-level garbage-collected languages. It is designed for performance-critical applications and has a strong focus on memory safety, making it an ideal choice for implementing strapdown INS algorithms. From a scientific development perspective, Rust puts guardrails on scientist-developers who's primary skill set isn't in writing production-grade memory safe code. By following basic good practices in Rust, you get the benefits of modern tooling and language syntax that you get with Python, Java, and Go with the performance of C or C++, with the additional guarantee of if it compiles the only bugs are *logic* bugs.
50
50
51
51
### Open Source
52
52
53
53
The `strapdown-rs` library is open source, which means that it is freely available for anyone to use, modify, and distribute. This is important for scientific research and development, as it allows researchers to share their work and collaborate with others in the field. Many such comprehensive INS implementations are often developed in-house, are proprietary, and closed source. Open source software also promotes transparency and reproducibility, which are essential for scientific research. By releasing `strapdown-rs` as an open-source library, it provides a reusable foundation for anyone building INS pipelines, sensor fusion stacks, or GNSS-denied navigation systems — particularly for research involving robotics, aerospace vehicles, or embedded autonomy platforms.
54
54
55
55
## Functionality
56
56
57
-
`strapdown-rs` is intended to be both a source code library included into your INS software or simulation environment as well as very light-weight INS analyzer (mostly to demonstrate how to use the library's API). It's functionality includes:
57
+
`strapdown-rs` is intended to be both a source code library included into your INS software and simulation environment as well as very light-weight INS simulator. The library provides a set of modules modeling the WGS84 Earth ellipsoid, a common 9-state strapdown forward mechanization, and a set of navigation filters for estimating position, velocity, and orientation from inertial measurement unit (IMU) data.
58
58
59
-
- A 15-state INS model with IMU bias estimation
60
-
- Navigation filters for inertial navigation including an Unscented Kalman Filter (UKF) and a particle filter (an error-state EKF is in the works)
61
-
- Mechanization equations for position, velocity, and orientation updates
62
-
- Examples and unit tests to verify correctness along with a basic reference dataset
63
-
- A straight forward simulation API for analyzing/testing the INS performance
64
-
- A simple CLI tool for running an open-loop (dead reckoning) or closed-loop (full state UKF) INS simulation
59
+
The simulation program provides a simple command line interface for running various configurations of the INS. In can run in open-loop (dead reckoning) mode or closed-loop (full state loosely couple UKF) mode. It can simulate various scenarios such as intermittent GPS, GPS degradation, and more. The simulation is designed to be easy to use and provides a simple API for generating datsets for further navigation processing or research.
0 commit comments