trajectory
Generic 3D point-mass flight and aiming solver (RK4) with quadratic aerodynamic drag, 3D wind, and optional Magnus lift: forward trajectory (range, apex, flight time, impact energy) or inverse aiming (exact azimuth & elevation to hit a 3D target). Writes trajectory.csv, plot.png, and 3D scene.glb.
- Field
- Dynamics and control
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.05 s
Compiled from source: run sh packs/install.sh once before admitting it.
A real run
- range
- 37.41 m
- flight time
- 2.82 s
- apex
- 9.73 m
- impact speed
- 18.4 m/s
Known answers it must pass
r0001vacuum 45-deg launch at 20 m/s matches exact closed-form range v0^2/g, apex v0^2/(4g), flight time sqrt(2)v0/gpassed
range_m40.7886 ± 0.004140.7886locked0.018 % of the tolerance usedapex_z_m10.1972 ± 0.00110.1972lockedunder 0.01 % of the tolerance usedflight_time_s2.88419 ± 0.000292.88419locked0.02 % of the tolerance usedr0002aim mode with quadratic drag + crosswind hits 3D target [4.0, 1.0, 0.5] within 0.5 mmpassed
reachable= truetruelockedexact matchmiss_distance_m≤ 0.00052.86988e-11lockedinside the range
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
mode | forward | ||
speed_mps | m/s | 20.0 | |
elevation_deg | deg | 45.0 | |
azimuth_deg | deg | 0.0 | |
mass_kg | kg | 0.01 | |
diameter_m | m | ||
area_m2 | m^2 | ||
cd | 1 | 0.47 | |
air_density_kg_m3 | kg/m^3 | 1.225 | |
g_mps2 | m/s^2 | 9.80665 | |
start_m | [0, 0, 0] | ||
target_m | |||
wind_mps | [0, 0, 0] | ||
spin_rad_s | [0, 0, 0] | ||
cl_magnus | 1 | 0.0 | |
ground_z_m | m | 0.0 | |
high_arc | false | ||
dt_s | s | 0.001 | |
max_time_s | s | 20.0 |
Readings
| Name | Unit | Meaning |
|---|---|---|
elevation_deg | deg | |
azimuth_deg | deg | |
range_m | m | |
apex_z_m | m | |
flight_time_s | s | |
impact_speed_mps | m/s | |
launch_energy_J | J | |
impact_energy_J | J | |
terminal_velocity_mps | m/s | |
miss_distance_m | m | |
trajectory.csv | ||
plot.png | ||
scene.glb |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.