ccsds-ndm
ccsds-ndm copied to clipboard
Multi-line COMMENT in OEM partly put in wrong section
Input is from "Figure 5-1" of "CCSDS RECOMMENDED STANDARD FOR ORBIT DATA MESSAGES" (CCSDS 502.0-B-2 the "Blue book", Issue November 2009) https://public.ccsds.org/Pubs/502x0b2c1e2.pdf The part that has problems:
META_STOP
COMMENT This file was produced by M.R. Somebody, MSOO NAV/JPL, 1996NOV 04. It is
COMMENT to be used for DSN scheduling purposes only.
1996-12-18T12:00:00.331 2789.619 -280.045 -1746.755 4.73372 -2.49586 -1.04195
...
to reproduce, line5 and 6 below show the current parse result which is wrong:
fnm = 'oem_fig5_1.kvn'
contents = readfile(fnm)
ndm = NdmIo().from_string(contents)
assert ndm.body.segment[0].metadata.comment == []
assert ndm.body.segment[0].data.comment == [
'This file was produced by M.R. Somebody, MSOO NAV/JPL, 1996NOV 04. It is']
assert ndm.body.segment[1].metadata.comment == [
'to be used for DSN scheduling purposes only.']
assert ndm.body.segment[1].data.comment == []
assert ndm.body.segment[2].metadata.comment == []
assert ndm.body.segment[2].data.comment == [
'This block begins after trajectory correction maneuver TCM-3.']
this should pass but is getting an AssertionError:
assert ndm.body.segment[0].data.comment == [
'This file was produced by M.R. Somebody, MSOO NAV/JPL, 1996NOV 04. It is',
'to be used for DSN scheduling purposes only.']