Skip to main content

Crate navcore_enc_check

Crate navcore_enc_check 

Source
Expand description

Checks routes against a chart, from the command line.

enc-check leg    --chart enc.gpkg --from 45.5443,13.7285 --to 45.5688,13.7002
enc-check route  --chart enc.gpkg --name "Piran to Koper" \
                 --waypoint 45.5150,13.5680 --waypoint 45.5500,13.6200
enc-check find   --chart enc.gpkg --from 45.5443,13.7285 --to 45.5688,13.7002
enc-check gateway --chart enc.gpkg --harbor 45.5480,13.7300
enc-check bake   --chart enc.gpkg
enc-check bench  --chart enc.gpkg
enc-check bench  --chart enc.gpkg --write-baseline

leg checks a line between two positions. route checks a plan given on the command line, leg by leg, against the vessel’s own standing tolerances. find asks route-find for a route between two positions. gateway asks route-find for the nearest usable point to a harbour’s nominal position (a pier, an anchorage); see route_find::gateway’s own module doc for why find cannot answer this directly. bake writes route-find’s ahead-of-time land cache for a chart, so find (and every route found through ffi) avoids re-fetching and simplifying the same land geometry on every query; see route_find::land_cache for details. bench runs find over bench::REFERENCE_ROUTES, a fixed set of validated positions, and fails if any route’s length or wall-clock time regresses past bench::distance_regressed or bench::time_regressed’s margin against --baseline’s stored numbers. --write-baseline records the current run’s numbers as the new baseline instead of comparing against them, for recording an intentional change in length or speed. Requires a real chart, as find does; see this crate’s bench-baseline.tsv.

Exit codes: 0 clear, 1 unsafe, 2 the check could not answer for part of the leg (no coverage, or coverage too coarse for the corridor).

Modules§

bench 🔒
Reference routes for the bench subcommand: a fixed set of positions in Slovenian and Italian waters, checked against a real chart on every run, for measuring the effect of a change to route-find’s search or its caches.

Structs§

ChartArgs 🔒
What every check needs: a chart and the vessel’s own settings.
Options 🔒

Enums§

Command 🔒

Functions§

degrees_minutes 🔒
fail 🔒
format_position 🔒
Degrees and decimal minutes, the way a position is read aloud.
line 🔒
One finding, with its distance along the leg and along the route.
main 🔒
position 🔒
Parses lat,lon in decimal degrees.
print_report 🔒
run_bake 🔒
run_bench 🔒
run_dock_to_dock 🔒
run_find 🔒
run_gateway 🔒
run_leg 🔒
run_route 🔒
verdict 🔒
The exit code, from everything that was found.
write_gpx 🔒
Writes a route as a GPX 1.1 <rte> – the format both GPS units and chart plotters read a planned route back from, so a route this crate found can be opened somewhere other than this CLI’s own text output.