Open mhuang001 opened 2 years ago
This is an unfortunate by-product of the COMMENT structure of the KVN and there is no easy solution. Consider the following example from the standards document:
OBJECT_NAME = MARS SPIRIT
OBJECT_ID = 2004-003A
CENTER_NAME = EARTH
TIME_SYSTEM = UTC
COMMENT GEOCENTRIC, CARTESIAN, EARTH FIXED
COMMENT OBJECT_ID: 2004-003
COMMENT $ITIM = 2004 JAN 14 22:26:18.400000, $ original launch time 14:36
COMMENT Generated by JPL
COMMENT Current attitude for orbit 20 and attitude maneuver
COMMENT planning data.
COMMENT Attitude state quaternion
EPOCH = 2004-02-14T14:28:15.1172
Q_FRAME_A = INSTRUMENT_A
Q_FRAME_B = ITRF-97
Q_DIR = A2B
QC = 0.47832
Q1 = 0.03123
Q2 = 0.78543
Q3 = 0.39158
Now, there are a lot of comment lines and they clearly belong to different blocks. The KVN format does not (and, by definition, cannot) specify which comment belongs where.
When reading the COMMENT blocks into the code I have to make certain assumptions. If I allow multiple lines of COMMENT, then all these comments in this example should either belong to the Metadata block above, or the Quaternion block below - and I have no means of knowing which is which! I make certain assumptions, but they will definitely be wrong on certain occasions.
Clearly, the behaviour you highlighted is not acceptable - the second comment line spurred an empty data block. I will have to look at it in greater detail in the weekend.
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:
to reproduce, line5 and 6 below show the current parse result which is wrong:
this should pass but is getting an AssertionError: