Skip to main content

hpr_io/
lib.rs

1//! Foreign formats: designs, parts, weather and elevation.
2//!
3//! [Start here][guide-start] says what works today and what is planned.
4//!
5//! [guide-start]: https://hpr.fusionspace.co/start-here.html
6//! [roadmap]: https://github.com/nrdptel/fusionspace-eridanus/blob/main/docs/ROADMAP.md
7//!
8//! Status: pre-alpha. What each module reads:
9//!
10//! - [`ork`]: an OpenRocket `.ork` file, read into a design, its motors and recovery.
11//! - [`orc`]: OpenRocket's `.orc` parts catalogs, read into parts by maker and part number. The
12//!   16 files OpenRocket 24.12 ships are built in ([parts catalogs][guide-orc]).
13//! - [`era5`]: an ERA5 pressure-level file, which gives the atmosphere over a launch site
14//!   ([ERA5 weather files][guide-era5]). It's read by the netCDF classic reader ([`netcdf`]).
15//! - [`grib2`]: the GRIB2 fields NOAA's NOMADS cuts from its GFS and RAP forecasts. It also
16//!   decodes whole GFS files' complex packing and JPEG 2000.
17//! - [`geotiff`]: a launch site's height from a GeoTIFF elevation file ([A launch site's
18//!   elevation][guide-elevation]).
19//!
20//! The other design formats, RockSim's `.rkt`, RASAero's `.CDX1` and RocketPy's export, are
21//! planned ([the roadmap][roadmap]).
22//!
23//! [guide-era5]: https://hpr.fusionspace.co/format/era5.html
24//! [guide-orc]: https://hpr.fusionspace.co/format/orc.html
25//! [guide-elevation]: https://hpr.fusionspace.co/elevation.html#from-an-elevation-file-of-your-own
26
27// Outside bytes reach casts here. An `as` cast of a length or count truncates silently where
28// `usize` is 32 bits (wasm32), and one from a float saturates: each cast is checked with
29// `try_from`, or its `allow` says why it is exact or meant.
30#![warn(clippy::cast_possible_truncation, clippy::cast_sign_loss)]
31#![cfg_attr(
32    test,
33    allow(
34        clippy::cast_possible_truncation,
35        clippy::cast_sign_loss,
36        reason = "a test builds its own inputs, so it sets its casts' ranges"
37    )
38)]
39pub mod era5;
40pub mod geotiff;
41pub mod grib2;
42pub mod netcdf;
43pub mod orc;
44pub mod ork;