Two-line string generation from TLE structure
[str, desc] = CL_tle_format(tle [[, form, opts]])
This function creates string from a TLE structure:
- Classical two-line string if the format is "TLE",
- JSON string if the format is "JSON".
- CSCSDS OMM XML string if the format is "OMM-XML".
The "desc" field in the "tle" structure is provided:
- in the desc argument for "TLE" format,
- in the "OBJECT_NAME" field for "JSON" and "OMM-XML" format.
The opts structure enables passing additional parameters if the format is OMM-XML (parameters that are not definéd in the input TLE structure).
The possible fields are:
- comment: (string) Comment in the metadata section (1x1). Default: "Generated via CelestLab" (
- originator: (string) Originator in the metadata section (1x1). Default: "CNES"
- center_name: (string) Frame center (1x1). Default: "EARTH"
- ref_frame: (string) Reference frame (1x1). Default: "TEME"
- time_system: (string) Time system (1x1). Default: "UTC"
- mean_element_theory: (string) Mean element theory (1x1). Default: "SGP4"
The output string is generated even if the "status" value is not 0.
If a value does not fit with the format, the slot in the string is filled with "#" characters (for TLE format only).
TLE structure (size N)
(string, optional) Output format: "TLE", "JSON" or "OMM-XML". Default is "TLE"
(struct) Additional parameters (see above)
(string) Standard two-line element (2xN), JSON string (1x1), or XML string (Px1)
(string) Description or empty string (1xN)
CNES - DCT/SB/MS