flags
cosmic_warp.core.flags
Simulation flags for enabling/disabling physics modules and features.
SimulationFlags
Flags to control which physics modules are active in the simulation.
create_flags
create_flags(
gravity: bool,
j2_perturbation: bool,
gravity_gradient: bool,
magnetic_torque: bool,
drag: bool,
check_bounds: bool,
check_planet_impact: bool,
device: str = "cuda",
) -> array
Create simulation flags array for multiple environments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gravity
|
bool
|
Enable gravitational forces |
required |
j2_perturbation
|
bool
|
Enable J2 perturbation (requires gravity=True) |
required |
gravity_gradient
|
bool
|
Enable gravity gradient torque |
required |
magnetic_torque
|
bool
|
Enable magnetic torque (requires vehicle.magnetic_dipole set) |
required |
drag
|
bool
|
Enable atmospheric drag force (uses vehicle.area_drag and vehicle.cd) |
required |
check_bounds
|
bool
|
Check position bounds |
required |
check_planet_impact
|
bool
|
Check for impact with the central body |
required |
device
|
str
|
Device to allocate on ("cuda" or "cpu") |
'cuda'
|
Returns:
| Type | Description |
|---|---|
array
|
WARP array with SimulationFlags struct |