CCSDS 504.0-B Attitude Ephemeris Message parser and serializer
0
fork

Configure Feed

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

aem: fix Fmt.str arg grouping in bprintf replacement

+8 -6
+8 -6
lib/aem.ml
··· 271 271 let fmt_epoch buf t = 272 272 let (y, m, d), ((hh, mm, ss), _tz) = Ptime.to_date_time t in 273 273 let frac = Ptime.to_float_s t -. floor (Ptime.to_float_s t) in 274 - Buffer.add_string buf (Fmt.str "%04d-%02d-%02dT%02d:%02d:%06.3f") y m d hh mm 275 - (Float.of_int ss +. frac) 274 + Buffer.add_string buf 275 + (Fmt.str "%04d-%02d-%02dT%02d:%02d:%06.3f" y m d hh mm 276 + (Float.of_int ss +. frac)) 276 277 277 - let kv buf k v = Buffer.add_string buf (Fmt.str "%s = %s\n") k v 278 + let kv buf k v = Buffer.add_string buf (Fmt.str "%s = %s\n" k v) 278 279 279 280 let to_string aem = 280 281 let buf = Buffer.create 2048 in ··· 312 313 fmt_epoch buf ad.epoch; 313 314 (match ad.attitude with 314 315 | Quaternion q -> 315 - Buffer.add_string buf (Fmt.str " %.14g %.14g %.14g %.14g") q.q1 q.q2 q.q3 q.qc 316 + Buffer.add_string buf 317 + (Fmt.str " %.14g %.14g %.14g %.14g" q.q1 q.q2 q.q3 q.qc) 316 318 | Euler e -> 317 - Buffer.add_string buf (Fmt.str " %.14g %.14g %.14g") e.angle_1 e.angle_2 318 - e.angle_3); 319 + Buffer.add_string buf 320 + (Fmt.str " %.14g %.14g %.14g" e.angle_1 e.angle_2 e.angle_3)); 319 321 Buffer.add_char buf '\n') 320 322 seg.data) 321 323 aem.segments;