Tracking Data Message (TDM)

class ccsds_ndm.Tdm(*, header, body)

Tracking Data Message (TDM).

The TDM specifies a standard message format for use in exchanging spacecraft tracking data between space agencies. Such exchanges are used for distributing tracking data output from routine interagency cross-supports.

Tracking data includes data types such as: - Doppler - Transmit/Received frequencies - Range - Angles - Delta-DOR - Media correction (ionosphere, troposphere) - Meteorological data

Parameters:
  • header (TdmHeader) – The message header. (Mandatory)

  • body (TdmBody) – The message body containing segments. (Mandatory)

body

The message body.

Type:

TdmBody

static from_file(path, format=None)

Create a TDM message from a file.

Parameters:
  • path (str) – Path to the input file.

  • format (str, optional) – Format (‘kvn’ or ‘xml’). Auto-detected if None. (Optional)

Returns:

The parsed TDM object.

Return type:

Tdm

static from_str(data, format=None)

Create a TDM message from a string.

Parameters:
  • data (str) – Input string/content.

  • format (str, optional) – Format (‘kvn’ or ‘xml’). Auto-detected if None. (Optional)

Returns:

The parsed TDM object.

Return type:

Tdm

header

Tracking Data Message (TDM).

The TDM specifies a standard message format for use in exchanging spacecraft tracking data between space agencies. Such exchanges are used for distributing tracking data output from routine interagency cross-supports.

Tracking data includes data types such as: - Doppler - Transmit/Received frequencies - Range - Angles - Delta-DOR - Media correction (ionosphere, troposphere) - Meteorological data

Type:

TdmHeader

id

The message identifier.

Type:

Optional[str]

segments

Shortcut to access segments directly from the body.

Type:

list[TdmSegment]

to_file(path, format, validate=True)

Write to file.

Parameters:
  • path (str) – Output file path.

  • format (str) – Output format (‘kvn’ or ‘xml’).

  • validate (bool, optional) – Whether to validate the message before writing (default: True).

to_str(format, validate=True)

Serialize to string.

Parameters:
  • format (str) – Output format (‘kvn’ or ‘xml’).

  • validate (bool, optional) – Whether to validate the message before writing (default: True).

Returns:

The serialized string.

Return type:

str

validate(strict=True)

Validate the message against CCSDS rules.

Parameters:

strict (bool, optional) – If True (default), raises ValueError on the first error found. If False, returns a list of validation error messages (or None if valid).

version

The message version.

Type:

str

class ccsds_ndm.TdmHeader(*, originator, creation_date, message_id=None, comment=None)

Represents the tdmHeader complex type.

Parameters:
  • originator (str) – Creating agency. Value should be an entry from the SANA Organizations Registry. (Mandatory)

  • creation_date (str) – Data creation date/time in UTC. (Mandatory)

  • message_id (str, optional) – ID that uniquely identifies a message from a given originator. (Optional)

  • comment (list[str], optional) – Comments. (Optional)

comment

Comments (allowed in the TDM Header only immediately after the TDM version number). (See 4.5 for formatting rules.)

Examples: This is a comment

Type:

list[str]

creation_date

Data creation date/time in UTC. (For format specification, see 4.3.9.)

Examples: 2001-11-06T11:17:33, 2002-204T15:56:23.4, 2006-001T00:00:00Z

Type:

str

message_id

ID that uniquely identifies a message from a given originator. The format and content of the message identifier value are at the discretion of the originator.

Examples: 201113719185

Type:

Optional[str]

originator

Creating agency. Value should be an entry from the ‘Abbreviation’ column in the SANA Organizations Registry, <https://sanaregistry.org/r/organizations/organizations.html> (reference [11]).

Examples: CNES, ESA, GSFC, DLR, JPL, JAXA

Type:

str

class ccsds_ndm.TdmBody(*, segments)

The TDM Body consists of one or more TDM Segments.

Parameters:

segments (list[TdmSegment]) – List of data segments.

segments

List of TDM segments.

Each segment consists of a Metadata Section and a Data Section.

Type:

list[TdmSegment]

class ccsds_ndm.TdmSegment(*, metadata, data)

Represents a single segment of a TDM.

A segment consists of a Metadata Section (configuration details) and a Data Section (tracking data records).

Parameters:
  • metadata (TdmMetadata) – Segment metadata. (Mandatory)

  • data (TdmData) – Segment data. (Mandatory)

data

Data section for this TDM segment.

Type:

TdmData

metadata

Metadata section for this TDM segment.

Type:

TdmMetadata

class ccsds_ndm.TdmMetadata(*, participant_1, time_system=None, track_id=None, data_types=None, start_time=None, stop_time=None, participant_2=None, participant_3=None, participant_4=None, participant_5=None, mode=None, path=None, path_1=None, path_2=None, transmit_band=None, receive_band=None, turnaround_numerator=None, turnaround_denominator=None, timetag_ref=None, integration_interval=None, integration_ref=None, freq_offset=None, range_mode=None, range_modulus=None, range_units=None, angle_type=None, reference_frame=None, interpolation=None, interpolation_degree=None, doppler_count_bias=None, doppler_count_scale=None, doppler_count_rollover=None, transmit_delay_1=None, transmit_delay_2=None, transmit_delay_3=None, transmit_delay_4=None, transmit_delay_5=None, receive_delay_1=None, receive_delay_2=None, receive_delay_3=None, receive_delay_4=None, receive_delay_5=None, data_quality=None, correction_angle_1=None, correction_angle_2=None, correction_doppler=None, correction_mag=None, correction_range=None, correction_rcs=None, correction_receive=None, correction_transmit=None, correction_aberration_yearly=None, correction_aberration_diurnal=None, corrections_applied=None, ephemeris_name_1=None, ephemeris_name_2=None, ephemeris_name_3=None, ephemeris_name_4=None, ephemeris_name_5=None, comment=None)

Represents the Metadata Section of a TDM Segment.

Contains configuration details applicable to the Data Section in the same TDM Segment.

Mandatory Parameters

time_systemstr

Time system used for timetags (e.g., “UTC”, “TAI”).

participant_1str

First participant in the tracking session.

Optional Parameters

Many optional parameters are available to describe the tracking configuration, signal path, frequencies, and corrections. See CCSDS TDM Blue Book for full details.

angle_type

The ANGLE_TYPE keyword shall indicate the type of antenna geometry represented in the angle data (ANGLE_1 and ANGLE_2 keywords).

Examples: AZEL, RADEC, XEYN, XSYE

Type:

Optional[str]

comment

Comments.

Type:

list[str]

correction_aberration_diurnal

A correction value for diurnal aberration.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_aberration_yearly

A correction value for yearly aberration.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_angle_1

The set of CORRECTION_* keywords may be used to reflect the values of corrections that have been added to the data or should be added to the data (e.g., ranging station delay calibration, etc.).

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_angle_2

A correction value to be added to the ANGLE_2 data.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_doppler

A correction value to be added to the Doppler data.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_mag

A correction value to be added to the magnitude data.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_range

A correction value to be added to the range data.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_rcs

A correction value to be added to the RCS data.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_receive

A correction value to be added to the received frequency or phase count data.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

correction_transmit

A correction value to be added to the transmitted frequency or phase count data.

Examples: -1.35, 0.23, -3.0e-1, 150000.0

Type:

Optional[float]

corrections_applied

This keyword is used to indicate whether or not the values associated with the CORRECTION_* keywords have been applied to the tracking data. Required if any of the CORRECTION_* keywords is used.

Examples: YES, NO

Type:

Optional[str]

data_quality

Provides an estimate of the quality of the data, based on indicators from the producers of the data (e.g., bad time synchronization flags, marginal lock status indicators, etc.). The default value shall be ‘RAW’.

Examples: RAW, VALIDATED, DEGRADED

Type:

Optional[str]

data_types

Comma-separated list of data types in the Data Section. The elements of the list shall be selected from the data types shown in table 3-5, with the exception of the DATA_START, DATA_STOP, and COMMENT keywords.

Examples: RANGE, TRANSMIT_FREQ_n, RECEIVE_FREQ

Type:

Optional[str]

doppler_count_bias

Doppler counts are generally biased so as to accommodate negative Doppler within an accumulator. In order to reconstruct the measurement, the bias shall be subtracted from the DOPPLER_COUNT data value.

Examples: 2.4e6, 240000000.0

Units: Hz

Type:

Optional[float]

doppler_count_rollover

Doppler counts may overflow the accumulator and roll over in cases where the track is of long duration or very high Doppler shift. This flag indicates whether or not a counter rollover has occurred during the track.

Examples: YES, NO

Type:

Optional[str]

doppler_count_scale

Doppler counts are generally scaled so as to capture partial cycles in an integer count. In order to reconstruct the measurement, the DOPPLER_COUNT data value shall be divided by the scale factor. The default shall be 1.

Examples: 1000, 1

Type:

Optional[int]

ephemeris_name_1

Unique name of the external ephemeris file used for participant 1.

Examples: SATELLITE_A_EPHEM27

Type:

Optional[str]

ephemeris_name_2

Unique name of the external ephemeris file used for participant 2.

Examples: SATELLITE_A_EPHEM27

Type:

Optional[str]

ephemeris_name_3

Unique name of the external ephemeris file used for participant 3.

Examples: SATELLITE_A_EPHEMERIS

Type:

Optional[str]

ephemeris_name_4

Unique name of the external ephemeris file used for participant 4.

Examples: SATELLITE_A_EPHEMERIS

Type:

Optional[str]

ephemeris_name_5

Unique name of the external ephemeris file used for participant 5.

Examples: SATELLITE_A_EPHEMERIS

Type:

Optional[str]

freq_offset

The FREQ_OFFSET keyword represents a frequency in Hz that must be added to every RECEIVE_FREQ to reconstruct it. One use is if a Doppler shift frequency observable is transferred instead of the actual received frequency. The default shall be 0.0.

Examples: 0.0, 8415000000.0

Units: Hz

Type:

Optional[float]

integration_interval

The INTEGRATION_INTERVAL keyword shall provide the Doppler count time in seconds for Doppler data or for the creation of normal points.

Examples: 60.0, 0.1, 1.0

Units: s

Type:

Optional[float]

integration_ref

Indicates the relationship between the INTEGRATION_INTERVAL and the timetag on the data, i.e., whether the timetag represents the start, middle, or end of the integration period.

Examples: START, MIDDLE, END

Type:

Optional[str]

interpolation

The INTERPOLATION keyword shall specify the interpolation method to be used to calculate a transmit phase count at an arbitrary time in tracking data where the uplink frequency is not constant.

Examples: HERMITE, LAGRANGE, LINEAR

Type:

Optional[str]

interpolation_degree

The INTERPOLATION_DEGREE keyword shall specify the recommended degree of the interpolating polynomial used to calculate a transmit phase count at an arbitrary time in tracking data where the uplink frequency is not constant.

Examples: 3, 5, 7, 11

Type:

Optional[int]

mode

The MODE keyword shall reflect the tracking mode associated with the Data Section of the segment. The value ‘SEQUENTIAL’ applies for most sequential signal paths; the name implies a sequential signal path between tracking participants. The value ‘SINGLE_DIFF’ applies only for differenced data.

Examples: SEQUENTIAL, SINGLE_DIFF

Type:

Optional[str]

participant_1

The PARTICIPANT_n keyword shall represent the participants (see 1.3.4.1) in a tracking data session. It is indexed to allow unambiguous reference to other data in the TDM (max index is 5). At least two participants must be specified for most sessions; for some special TDMs such as tropospheric media, only one participant need be listed.

Examples: DSS-63-S400K, ROSETTA, <Quasar catalog name>, 1997-061A, UNKNOWN

Type:

str

participant_2

The second participant in a tracking data session.

Type:

Optional[str]

participant_3

The third participant in a tracking data session.

Type:

Optional[str]

participant_4

The fourth participant in a tracking data session.

Type:

Optional[str]

participant_5

The fifth participant in a tracking data session.

Type:

Optional[str]

path

The PATH keywords shall reflect the signal path by listing the index of each participant in order, separated by commas, with no inserted white space. Correlated with the indices of the PARTICIPANT_n keywords. The first entry in the PATH shall be the transmit participant.

Examples: PATH = 1,2,1, PATH_1 = 1,2,1, PATH_2 = 3,1

Type:

Optional[str]

path_1

The first signal path where the MODE is ‘SINGLE_DIFF’.

Type:

Optional[str]

path_2

The second signal path where the MODE is ‘SINGLE_DIFF’.

Type:

Optional[str]

range_mode

The value of the RANGE_MODE keyword shall be ‘COHERENT’, in which case the range tones are coherent with the uplink carrier; ‘CONSTANT’, in which case the range tones have a constant frequency; or ‘ONE_WAY’ (used in Delta-DOR).

Examples: COHERENT, CONSTANT, ONE_WAY

Type:

Optional[str]

range_modulus

The value associated with the RANGE_MODULUS keyword shall be the modulus of the range observable in the units as specified by the RANGE_UNITS keyword; that is, the actual (unambiguous) range is an integer k times the modulus, plus the observable value. The default value shall be 0.0.

Examples: 32768.0, 2.0e+23, 0.0, 161.6484

Type:

Optional[float]

range_units

The RANGE_UNITS keyword specifies the units for the range observable. ‘km’ shall be used if the range is measured in kilometers. ‘s’ shall be used if the range is measured in seconds. ‘RU’, for ‘range units’, shall be used where the transmit frequency is changing. The default value shall be ‘km’.

Examples: km, s, RU

Type:

Optional[str]

receive_band

The RECEIVE_BAND keyword shall indicate the frequency band for received frequencies. Although not required in general, the RECEIVE_BAND must be present if the MODE is SINGLE_DIFF and differenced frequencies or differenced range are provided in order to allow proper frequency dependent corrections to be applied.

Examples: S, X, Ka, L, UHF, GREEN

Type:

Optional[str]

receive_delay_1

The RECEIVE_DELAY_n keyword shall specify a fixed interval of time, in seconds, required for the signal to travel from the tracking point to the receiving electronics. The default value shall be 0.0.

Examples: 1.23, 0.0326, 0.00777

Units: s

Type:

Optional[float]

receive_delay_2

Fixed interval of time, in seconds, required for the signal to travel from the tracking point to the receiving electronics for participant 2.

Units: s

Type:

Optional[float]

receive_delay_3

Fixed interval of time, in seconds, required for the signal to travel from the tracking point to the receiving electronics for participant 3.

Units: s

Type:

Optional[float]

receive_delay_4

Fixed interval of time, in seconds, required for the signal to travel from the tracking point to the receiving electronics for participant 4.

Units: s

Type:

Optional[float]

receive_delay_5

Fixed interval of time, in seconds, required for the signal to travel from the tracking point to the receiving electronics for participant 5.

Units: s

Type:

Optional[float]

reference_frame

The REFERENCE_FRAME keyword shall be used in conjunction with the ‘ANGLE_TYPE=RADEC’ keyword/value combination, indicating the inertial reference frame to which the antenna frame is referenced.

Examples: EME2000, ICRF, ITRF1993, ITRF2000, TOD_EARTH

Type:

Optional[str]

start_time

The START_TIME keyword shall specify the UTC start time of the total time span covered by the tracking data immediately following this Metadata Section. (For format specification, see 4.3.9.)

Examples: 1996-12-18T14:28:15.1172, 1996-277T07:22:54, 2006-001T00:00:00Z

Type:

Optional[str]

stop_time

The STOP_TIME keyword shall specify the UTC stop time of the total time span covered by the tracking data immediately following this Metadata Section. (For format specification, see 4.3.9.)

Examples: 1996-12-18T14:28:15.1172, 1996-277T07:22:54, 2006-001T00:00:00Z

Type:

Optional[str]

time_system

The TIME_SYSTEM keyword shall specify the time system used for timetags in the associated Data Section. This should be UTC for ground-based data. The value associated with this keyword must be selected from the full set of allowed values enumerated in the SANA Time Systems Registry <https://sanaregistry.org/r/time_systems> (reference [12]). (See annex B.)

Examples: UTC, TAI, GPS, SCLK

Type:

str

timetag_ref

The TIMETAG_REF keyword shall provide a reference for time tags in the tracking data. This keyword indicates whether the timetag associated with the data is the transmit time or the receive time.

Examples: TRANSMIT, RECEIVE

Type:

Optional[str]

track_id

The TRACK_ID keyword specifies a unique identifier for the tracking data in the associated data section. The value may be a freely selected string of characters and numbers, only required to be unique for each track of the corresponding sensor. For example, the value may be constructed from the measurement date and time and a counter to distinguish simultaneously tracked objects.

Examples: 20190918_1200135-0001

Type:

Optional[str]

transmit_band

The TRANSMIT_BAND keyword shall indicate the frequency band for transmitted frequencies. The frequency ranges associated with each band should be specified in the ICD.

Examples: S, X, Ka, L, UHF, GREEN

Type:

Optional[str]

transmit_delay_1

The TRANSMIT_DELAY_n keyword shall specify a fixed interval of time, in seconds, required for the signal to travel from the transmitting electronics to the transmit point. The default value shall be 0.0.

Examples: 1.23, 0.0326, 0.00077

Units: s

Type:

Optional[float]

transmit_delay_2

Fixed interval of time, in seconds, required for the signal to travel from the transmitting electronics to the transmit point for participant 2.

Units: s

Type:

Optional[float]

transmit_delay_3

Fixed interval of time, in seconds, required for the signal to travel from the transmitting electronics to the transmit point for participant 3.

Units: s

Type:

Optional[float]

transmit_delay_4

Fixed interval of time, in seconds, required for the signal to travel from the transmitting electronics to the transmit point for participant 4.

Units: s

Type:

Optional[float]

transmit_delay_5

Fixed interval of time, in seconds, required for the signal to travel from the transmitting electronics to the transmit point for participant 5.

Units: s

Type:

Optional[float]

turnaround_denominator

The TURNAROUND_DENOMINATOR keyword shall indicate the denominator of the turnaround ratio that is necessary to calculate the coherent downlink from the uplink frequency.

Examples: 221, 749

Type:

Optional[int]

turnaround_numerator

The TURNAROUND_NUMERATOR keyword shall indicate the numerator of the turnaround ratio that is necessary to calculate the coherent downlink from the uplink frequency.

Examples: 240, 880

Type:

Optional[int]

class ccsds_ndm.TdmData(observations=None, comment=None)

The Data Section of the TDM Segment consists of one or more Tracking Data Records.

Parameters:
  • observations (list[TdmObservation], optional) – List of tracking data records. (Optional)

  • comment (list[str], optional) – Comments in the data section. (Optional)

comment

Comments.

Type:

list[TdmObservation]

observations

Tracking data records.

Type:

list[TdmObservation]

class ccsds_ndm.TdmObservation(*, epoch, keyword, value)

A single tracking data record consisting of a timetag and a measurement.

Parameters:
  • epoch (str) – Time associated with the tracking observable.

  • keyword (str) – Data type keyword (e.g., “RANGE”, “RECEIVE_FREQ”).

  • value (float) – Tracking observable value. Note: For phase counts that require full precision strings, use internal representation handling (this constructor takes float for simplicity, but the object can hold string representations internally).

epoch

Time associated with the tracking observable.

Type:

str

keyword

Keyword of the observation (e.g., “RANGE”).

Type:

str

value

Measurement value as float.

Returns None if the value is not representable as a float (unlikely for TDM).

Type:

Optional[float]

value_str

Measurement value as string.

Useful for phase counts which may require high precision.

Type:

str

Enums

class ccsds_ndm.TdmMode
Sequential = TdmMode.SEQUENTIAL
SingleDiff = TdmMode.SINGLE_DIFF
class ccsds_ndm.TdmPath
Path1 = TdmPath.Path_1,2
Path2 = TdmPath.Path_2,1
Path3 = TdmPath.Path_1,2,1