Skip to main content

Module rocket

Module rocket 

Source
Expand description

A rocket built part by part, from the nose back.

Rocket::new starts an empty rocket of one body diameter. Body parts (Nose, Tube, Transition) stack from the nose tip in the order they are added. Attached parts (Fins, MotorTube, Mass) go on the last body tube added, where their Position puts them. Fittings (couplers, centering rings, bulkheads, launch lugs, packed parachutes and streamers) go there too. Rocket::set_motor puts a Motor in the motor tube, and Rocket::add_parachute adds a recovery device. What the builder makes is an ordinary hpr_design::Rocket, the same tree a design file holds (Rocket::design); a design you already have flies through Rocket::from_design.

Every part names its material. material finds a built-in one by id; the list, with each density’s source, is hpr_design::materials. The builder has no default materials or wall thicknesses, because each one would be a guess at your rocket’s mass. Every outer surface has the design’s default finish, mass-production paint (hpr_design::Finish), which sets its skin friction; the builder can’t change it yet.

Parts can also come from a parts catalog, such as the one OpenRocket ships (hpr_io::orc::bundled): Nose::from_catalog, Tube::from_catalog, Transition::from_catalog, MotorTube::from_catalog and Fitting::from_catalog make each part as the catalog gives it, its material and stated mass included. What a catalog leaves unsaid is chosen as OpenRocket chooses it, but for a hollow part’s shoulder wall (catalog lists each choice).

Re-exports§

pub use catalog::Fitting;

Modules§

catalog
Parts from a parts catalog, and the fittings they add to the builder.

Structs§

Fins
A set of identical fins spaced evenly around the last body tube, flush with its aft end unless placed elsewhere with Fins::at. Their edges are square unless Fins::with_cross_section says otherwise.
Mass
A mass inside the last body tube: a parachute and its cord, an altimeter bay, ballast.
MotorTube
The tube inside the airframe that holds the motor, flush with the last body tube’s aft end unless placed elsewhere with MotorTube::at.
Nose
A nose cone. Its base takes the rocket’s diameter, unless it states its own, as a catalog part does (Nose::from_catalog).
Rocket
A rocket: its design, its motor and its recovery devices.
Transition
A transition between two diameters: a boattail narrowing toward the tail, or a cone stepping the airframe up or down. Its fore end takes the diameter of the body part before it.
Tube
A body tube: a length of the airframe.

Functions§

material
The built-in material with id id, such as "abs", "kraft_phenolic" or "birch_plywood". hpr_design::materials lists them all, each with its density’s source.