Expand description
Surface interactions: aerodynamics, radiation pressure, contact, lighting, torques.
Pure-Rust port of JEOD’s models/interactions/ plus the surface-model and
shadow geometry that those interactions depend on. Each module produces a
force, torque, or environmental scalar at a vehicle position; the
orchestration that sums these into a body’s astrodyn_dynamics::TotalForce
lives in astrodyn.
§Public surface
- Aerodynamic drag:
aero_drag(port of JEODmodels/interactions/aerodynamics/) provides scalar-Cd drag against a ballistic-coefficient body.flat_plate_aeroadds the per-facet panel-method drag/lift used for articulated spacecraft. - Radiation pressure:
radiation_pressureports JEODmodels/interactions/radiation_pressure/— solar flux against a surface model with absorption / specular / diffuse coefficients, shadow-corrected via theshadowmodule’s umbra/penumbra geometry and viacompute_earth_lightingfor Earth-albedo and Earth-IR contributions (EarthLightingState,LightingBody,LightingParams). - Gravity-gradient torque:
compute_gravity_torqueand its typed siblingcompute_gravity_torque_typedport JEODmodels/interactions/gravity_torque/— the cross product of the inertia tensor and the gravity-gradient tensor projected through the body attitude. - Surface model:
SurfaceFacet,ArticulatedFacet,ArticulationState,SurfaceShapeinsurface_modelare the per-facet geometry inputs that aero, SRP, contact, and thermal share. - Contact:
compute_contact_force,compute_contact_force_from_geometry,compute_contact_geometry,ContactFacet,ContactForce,ContactGeometry,ContactMaterial,ContactShapefor collision/contact response. - Thermal:
compute_thermal_power_balance,ThermalEnvironment,ThermalFacet,ThermalPowerBalance— per-facet power balance for thermal-rider models.
JEOD source: models/interactions/ and surrounding utilities. Pure Rust,
zero Bevy dependency.
§Example
Compute ballistic aerodynamic drag for a 1 m² Cd=2.2 plate moving at 7.5 km/s through a thin LEO atmosphere:
use astrodyn_atmosphere::AtmosphereState;
use astrodyn_interactions::{compute_ballistic_drag, DragConfig};
use astrodyn_quantities::frame::SelfPlanet;
use glam::{DMat3, DVec3};
let cfg = DragConfig { cd: 2.2, area: 1.0, constant_density: None };
// 1e-12 kg/m^3 is roughly 400 km altitude.
let atmos = AtmosphereState::<SelfPlanet>::from_raw(1.0e-12, 0.0, 0.0, DVec3::ZERO);
// Velocity along +X at 7.5 km/s; identity rotation (inertial == body).
let v = DVec3::new(7_500.0, 0.0, 0.0);
let force = compute_ballistic_drag(&cfg, &atmos, v, &DMat3::IDENTITY);
// Drag opposes motion (-X) and is small but non-zero.
assert!(force.force.x < 0.0);
assert!(force.force.length() > 0.0 && force.force.length() < 1.0);Re-exports§
pub use contact::compute_contact_force;pub use contact::compute_contact_force_from_geometry;pub use contact::compute_contact_geometry;pub use contact::compute_ground_contact_geometry;pub use contact::ContactFacet;pub use contact::ContactForce;pub use contact::ContactGeometry;pub use contact::ContactMaterial;pub use contact::ContactShape;pub use contact::GroundFacet;pub use contact::Phase;pub use contact::SphericalTerrain;pub use contact::Terrain;pub use earth_lighting::compute_earth_lighting;pub use earth_lighting::compute_earth_lighting_typed;pub use earth_lighting::EarthLightingState;pub use earth_lighting::LightingBody;pub use earth_lighting::LightingParams;pub use forces::collect_and_resolve_forces;pub use forces::collect_and_resolve_forces_typed;pub use gravity_torque::compute_gravity_torque;pub use gravity_torque::compute_gravity_torque_typed;pub use surface_model::ArticulatedFacet;pub use surface_model::ArticulationState;pub use surface_model::SurfaceFacet;pub use surface_model::SurfaceShape;pub use thermal_rider::compute_thermal_power_balance;pub use thermal_rider::ThermalEnvironment;pub use thermal_rider::ThermalFacet;pub use thermal_rider::ThermalPowerBalance;pub use aero_drag::*;pub use flat_plate_aero::*;pub use radiation_pressure::*;pub use shadow::*;
Modules§
- aero_
drag - Aerodynamic drag computation.
- contact
- Contact dynamics (spring-damper + Coulomb friction).
- earth_
lighting - Earth lighting model.
- flat_
plate_ aero - Flat-plate aerodynamic surface model.
- forces
- Force-collection stage: composes per-body external + interaction +
gravity contributions into the integrator’s
FrameDerivatives(linear and angular accelerations expressed in the integration frame). - gravity_
torque - Gravity gradient torque computation.
- radiation_
pressure - Solar radiation pressure computation.
- shadow
- Shadow (eclipse) detection.
- surface_
model - Generic surface geometry model.
- thermal_
rider - Thermal-rider model: per-facet environmental heating and Stefan-Boltzmann emission.