kinavis
The navigation algorithms of KINAVIS:
compass corrections, the sailings, dead reckoning, position fixing, passage
planning and guidance, tides, the sun, and a Kalman filter over the
navigation state — with no panics, no unsafe and no allocation.
[]
= "1"
use convert_compass_course_to_true_course;
use ;
// A swing: deviation observed on every tenth of the compass, 000° to 350°.
let table = from_deviations?;
// True course made good steering 003° by compass, variation 2.7°W.
let solution = convert_compass_course_to_true_course?;
assert_eq!;
# Ok::
A compass course cannot be passed where a true one belongs, and knots cannot be mistaken for metres per second: every angle carries its reference frame in the type, and every quantity its unit.
What is inside
| Area | Modules |
|---|---|
Value types (from kinavis-kernel) |
angle, units, position, time, geodesy, local, observation, gnss, event, environment |
| The compass | deviation, navigation_solutions |
| Position | sailings, dead_reckoning, fix, gnss_intake |
| Passage | route, turning, guidance, schedule, composite, clearance |
| Surroundings | relative_motion, anchor, mob, conditions, tides, sun |
| Estimation | estimator, observations, state, snapshot |
The guide walks through all of it with examples that are compiled and run as tests.
The KINAVIS crates
kinavis holds the algorithms. The other crates bring sensor data in and
build on top of it, each no_std and without an allocator:
| Crate | What it does |
|---|---|
kinavis-kernel |
the value types, re-exported here; depend on it alone for an adapter that must not pull in the algorithms |
kinavis-nmea0183 |
NMEA 0183 sentences, parsed and written |
kinavis-nmea2000 |
NMEA 2000 parameter groups out of CAN frames, fast-packet included |
kinavis-ais |
AIS messages: position reports, static and voyage data, aids to navigation |
kinavis-wmm |
the World Magnetic Model 2025: magnetic variation at any position |
kinavis-ins |
a strapdown inertial navigation system with a fifteen-state error filter aided by GNSS and heading |
kinavis-traffic |
target tracking from radar and AIS, CPA and TCPA, the avoiding manoeuvre |
kinavis-colregs |
the steering and sailing rules of the COLREGs as data |
kinavis-alerts |
bridge alert management: alarms, warnings and cautions, with acknowledgement |
Features
| Feature | Default | What it does |
|---|---|---|
std |
yes | the standard library's floating point maths; implies alloc |
alloc |
via std |
Vec-returning companions of the *_into calls |
libm |
pure-Rust maths for no_std targets |
|
serde |
serialisation, with deserialisation through the constructors |
For a bare-metal target with no allocator:
= { = "1", = false, = ["libm"] }
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.