SpacecraftShape
このコンテンツはまだ日本語訳がありません。
Defined in: surface.rs:401
pub enum SpacecraftShape { Sphere { area: f64, cd: f64, cr: f64 }, Panels(Vec<SurfacePanel>),}Spacecraft shape model for aerodynamic force computation.
Provides a gradation from the simplest attitude-independent model
(Sphere) to fully attitude-dependent panel models (Panels).
Variants
Section titled “Variants”Sphere
Section titled “Sphere”area: f64 cd: f64 cr: f64
Attitude-independent model. Carries effective cross-section area and surface coefficients. Not limited to geometric spheres — represents any isotropic surface model.
Panels
Section titled “Panels”Panels([Vec<SurfacePanel>](https://doc.rust-lang.org/std/vec/struct.Vec.html))
Flat-panel model: attitude-dependent.
Methods
Section titled “Methods”sphere()
Section titled “sphere()”fn sphere(area: f64, cd: f64, cr: f64) -> Self
Create a sphere (attitude-independent) shape with the given parameters.
Panics
Section titled “Panics”Panics if area is not positive or if cd/cr are negative.
panels()
Section titled “panels()”fn panels(panels: [Vec<SurfacePanel>](https://doc.rust-lang.org/std/vec/struct.Vec.html)) -> Self
Create a panel model from an arbitrary set of panels.
Panics
Section titled “Panics”Panics unless every panel normal is unit length and every outline is
consistent with its panel — positive finite extents whose product is a
finite non-zero area matching area, and a unit in-plane axis
perpendicular to the normal. SurfacePanel’s constructors establish
both, but its fields are public, so a struct literal can reach here
without them.
cube()
Section titled “cube()”fn cube(half_size: f64, cd: f64, optics: PanelOptics) -> Self
Create a cube with the given half-size, drag coefficient, and optical properties, shared by all six faces.
Generates 6 panels (±x, ±y, ±z), each 2 * half_size on a side, with the
centre of pressure at the face centre (half_size m from CoM along the
face normal). The faces carry their outline, so a panel added beside the
cube — a solar array, say — can be found completely covered by one.
Panics
Section titled “Panics”Panics unless half_size is positive and finite, and unless the area it
implies is too — it builds the faces through SurfacePanel::rectangle,
so half_size of 1e200 overflows and 1e-300 underflows.