Satellite pass prediction and contact window computation
0
fork

Configure Feed

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

Upgrade to ocamlformat 0.29.0; fix csvt/sexpt streaming; reformat

- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0

+13 -13
+1 -1
.ocamlformat
··· 1 - version = 0.28.1 1 + version = 0.29.0
+3 -3
lib/contact.ml
··· 66 66 (match elevation_at_unix tle state gs !t with 67 67 | None -> () 68 68 | Some el -> 69 - if el > 0.0 then begin 70 - if not !in_pass then begin 69 + if el > 0.0 then 70 + begin if not !in_pass then begin 71 71 in_pass := true; 72 72 aos := !t; 73 73 max_el := el 74 74 end 75 75 else max_el := Float.max !max_el el 76 - end 76 + end 77 77 else if !in_pass then begin 78 78 in_pass := false; 79 79 if !max_el >= min_elevation then
+9 -9
lib/contact.mli
··· 3 3 {2 Quick start} 4 4 5 5 {[ 6 - (* Predict ISS passes over Los Angeles for the next 3 days *) 7 - let tle = Sgp4.parse_tle_string tle_str |> Result.get_ok in 8 - let la = Contact.ground_station ~lat:34.05 ~lon:(-118.25) ~alt:0.071 in 9 - let passes = Contact.predict tle la ~duration_days:3 in 10 - List.iter 11 - (fun p -> 12 - Printf.printf "%s max_el=%.1f deg dur=%.0fs\n" p.aos_epoch 13 - p.max_elevation p.duration) 14 - passes 6 + (* Predict ISS passes over Los Angeles for the next 3 days *) 7 + let tle = Sgp4.parse_tle_string tle_str |> Result.get_ok in 8 + let la = Contact.ground_station ~lat:34.05 ~lon:(-118.25) ~alt:0.071 in 9 + let passes = Contact.predict tle la ~duration_days:3 in 10 + List.iter 11 + (fun p -> 12 + Printf.printf "%s max_el=%.1f deg dur=%.0fs\n" p.aos_epoch 13 + p.max_elevation p.duration) 14 + passes 15 15 ]} *) 16 16 17 17 (** {1 Types} *)