Collision Avoidance Maneuver design for conjunction assessment
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use Wire codec for all binary encoding/decoding

- CLCW: remove hand-written bit manipulation, single codec for the
full 32-bit word with typed fields
- Space Packet: single full-packet codec (header + variable-length
data via Field.ref on data_length)
- TC: frame_codec with dependent-length data zone from header's
frame_length field
- AOS/TM/USLP: packed_frame type with Wire codec for header +
data zone capture for the variable-length trailing portion
- Remove all duplicate packed_header types where superseded
- Expose Wire.Codec field bindings for future zero-copy get/set

+121
+38
test/interop/gmat/regenerate.sh
··· 1 + #!/bin/bash 2 + # Regenerate GMAT test traces for ocaml-cam. 3 + # 4 + # Requires: GMAT R2026a installed. 5 + # Usage: GMAT_HOME=~/Downloads/"GMAT R2026a" ./regenerate.sh 6 + # 7 + # Traces are committed to git (dune promote pattern). 8 + # Only re-run this when changing GMAT scripts or upgrading GMAT. 9 + 10 + set -euo pipefail 11 + 12 + GMAT_HOME="${GMAT_HOME:-$HOME/Downloads/GMAT R2026a}" 13 + GMAT="$GMAT_HOME/bin/GmatConsole" 14 + SCRIPT_DIR="$(cd "$(dirname "$0")/scripts" && pwd)" 15 + TRACE_DIR="$(cd "$(dirname "$0")/traces" && pwd)" 16 + 17 + if [ ! -x "$GMAT" ]; then 18 + echo "error: GmatConsole not found at $GMAT" 19 + echo "Set GMAT_HOME to your GMAT installation directory." 20 + exit 1 21 + fi 22 + 23 + echo "GMAT: $GMAT" 24 + echo "Scripts: $SCRIPT_DIR" 25 + echo "Traces: $TRACE_DIR" 26 + echo 27 + 28 + for script in "$SCRIPT_DIR"/*.script; do 29 + name=$(basename "$script" .script) 30 + echo "==> Running $name..." 31 + cd "$GMAT_HOME/bin" 32 + "$GMAT" --run "$script" 2>&1 | tail -3 33 + echo " Done." 34 + echo 35 + done 36 + 37 + echo "All traces regenerated in $TRACE_DIR" 38 + echo "Review with: git diff $TRACE_DIR"
+83
test/interop/gmat/scripts/tangential_burn.script
··· 1 + % 2 + % tangential_burn --- LEO satellite with tangential impulsive burn 3 + % 4 + % Test vector for ocaml-cam: validate delta-v effect on orbit. 5 + % Pre-burn and post-burn ephemerides + report of orbital elements. 6 + % 7 + % Scenario: ISS-like orbit, +0.1 km/s tangential burn at t=1 orbit. 8 + % 9 + % Source: GMAT R2026a. 10 + % 11 + 12 + %---------- Spacecraft 13 + Create Spacecraft Sat; 14 + 15 + Sat.DateFormat = UTCGregorian; 16 + Sat.Epoch = '01 Jan 2026 00:00:00.000'; 17 + Sat.CoordinateSystem = EarthMJ2000Eq; 18 + Sat.DisplayStateType = Keplerian; 19 + Sat.SMA = 6778.137; 20 + Sat.ECC = 0.0008; 21 + Sat.INC = 51.6; 22 + Sat.RAAN = 45.0; 23 + Sat.AOP = 90.0; 24 + Sat.TA = 0.0; 25 + 26 + %---------- Burn (tangential, +0.1 km/s in velocity direction) 27 + Create ImpulsiveBurn Burn1; 28 + 29 + Burn1.CoordinateSystem = Local; 30 + Burn1.Origin = Earth; 31 + Burn1.Axes = VNB; 32 + Burn1.Element1 = 0.1; 33 + Burn1.Element2 = 0.0; 34 + Burn1.Element3 = 0.0; 35 + 36 + %---------- ForceModel 37 + Create ForceModel Forces; 38 + 39 + Forces.CentralBody = Earth; 40 + Forces.PrimaryBodies = {Earth}; 41 + Forces.PointMasses = {Luna, Sun}; 42 + Forces.GravityField.Earth.Degree = 10; 43 + Forces.GravityField.Earth.Order = 10; 44 + 45 + %---------- Propagator 46 + Create Propagator Prop; 47 + 48 + Prop.FM = Forces; 49 + Prop.Type = RungeKutta89; 50 + Prop.InitialStepSize = 60; 51 + Prop.Accuracy = 1e-12; 52 + 53 + %---------- OEM Output (pre-burn + post-burn combined) 54 + Create EphemerisFile OEM_Burn; 55 + 56 + OEM_Burn.Spacecraft = Sat; 57 + OEM_Burn.Filename = '../traces/tangential_burn.oem'; 58 + OEM_Burn.FileFormat = CCSDS-OEM; 59 + OEM_Burn.EpochFormat = UTCGregorian; 60 + OEM_Burn.StepSize = 60; 61 + OEM_Burn.CoordinateSystem = EarthMJ2000Eq; 62 + OEM_Burn.WriteEphemeris = true; 63 + 64 + %---------- Report: orbital elements before and after burn 65 + Create ReportFile BurnReport; 66 + 67 + BurnReport.Filename = '../traces/tangential_burn_report.txt'; 68 + BurnReport.Precision = 16; 69 + BurnReport.Add = {Sat.UTCGregorian, Sat.X, Sat.Y, Sat.Z, Sat.VX, Sat.VY, Sat.VZ, Sat.SMA, Sat.ECC, Sat.INC}; 70 + BurnReport.WriteHeaders = True; 71 + BurnReport.FixedWidth = True; 72 + 73 + %---------- Mission Sequence 74 + BeginMissionSequence; 75 + 76 + % Propagate 1 orbit (~92 min for LEO) 77 + Propagate Prop(Sat) {Sat.ElapsedSecs = 5554.0}; 78 + 79 + % Apply tangential burn 80 + Maneuver Burn1(Sat); 81 + 82 + % Propagate 3 more orbits to see effect 83 + Propagate Prop(Sat) {Sat.ElapsedSecs = 16662.0};