Appendix C: Data Types Used by the Generic EPS Format

Appendix C: Data Types Used by the Generic EPS Format

C.1 Basic data types

    Type ID Type Size Range Comments
    Integers
    byte Signed Byte 1 byte -128…127 "Two’s Complement" coding convention for negative values

    Range calculated: -2n-1 to +2n-1 –1, where n is the length of the integer in bits
    u-byte Unsigned Byte 1 byte 0…255 Range calculated: 0 to +2n-1 where n is the length of the integer in bits
    enumerated Enumerated Byte 1 byte 256 flag states May only contain a value from a set of specified integer values, each of which is associated with a named concept, e.g. a set of error codes. When this field type is defined, the possible integer values and associated names are completely specified.
    boolean Boolean Byte 1 byte False/True Specific enumerated integer type which takes only 2 possible values: when all bits are zeroed, it denotes ‘FALSE’, otherwise, if any bit is set (i.e. its value is different from zero), it denotes ‘TRUE’.
    integer2 Signed 2-byte Integer 2 bytes -32768…32767 "Two’s Complement" coding convention for negative values

    Range calculated: -2n-1 to +2n-1 –1, where n is the length of the integer in bits
    u-integer2 Unsigned 2-byte Integer 2 bytes 0…65535 Range calculated: 0 to +2n-1 where n is the length of the integer in bits
    integer4 Signed 4-byte Integer 4 bytes -2147483648…2147483647 "Two’s Complement" coding convention for negative values

    Range calculated: -2n-1 to +2n-1 –1, where n is the length of the integer in bits
    u-integer4 Unsigned 4-byte Integer 4 bytes 0…4294967295 Range calculated: 0 to +2n-1 where n is the length of the integer in bits
    integer8 Signed 8-byte Integer 8 bytes -9223372036854775808
    …9223372036854775807
    "Two’s Complement" coding convention for negative values

    Range calculated: -2n-1 to +2n-1 –1, where n is the length of the integer in bits
    u-integer8 Unsigned 8-byte Integer 8 bytes 0…18446744073709551615 Range calculated: 0 to +2n-1 where n is the length of the integer in bits
    Bit Strings
    Bit String bitst(n) 1 bit per element n/a A bit string is encoded as follows: bn-1…b0 , where bi is the ith bit in the string and n is the length in bits of the bit string, with bn-1 being the most significant bit. The value of n shall always be a multiple of 8 ensuring that a bit string is always a full number of bytes in size.
    Character Strings
    Standard Character String char(length) 1 byte per character n/a Can only contain upper case letters [A…Z], numbers [0…9] and the underscore character (_).

    The number of characters in a character string is determined by the length parameter e.g. CHAR(8) is an 8 character string.
    Enumerated Character String e-char(length) 1 byte per character n/a Same properties as standard character string except that it can only contain one of a set of specified string values, and may also include the lower case "x" character (used as whitespace padding).
    Extended Character String x-char(length) 1 byte per character n/a Same properties as standard character string except that it may also contain space character, the newline character (\n), the equals sign (=) and the plus (+) and minus (-) signs.

    Only found in ASCII records.
    Time formats
    Generalised Time general time 15 bytes n/a This is a char(15) data type with a specific format YYYYMMDDHHMMSSZ, Z indicates Zulu or UTC time.

    If a field has a type of general time but no time is applicable, then the field should be filled with the string for "no applicable time", which is a string of 14 lower case ‘x’ characters terminated by the ASCII character ‘Z’, e.g., xxxxxxxxxxxxxxZ
    Long Generalised Time long general time 18 bytes n/a This is a char(18) data type with a specific format YYYYMMDDHHMMSSmmmZ, Z indicates Zulu or UTC time.

    If a field has a type of long general time but no time is applicable, then the field should be filled with the string for "no applicable time", which is a string of 17 lower case ‘x’ characters terminated by the ASCII character ‘Z’, e.g., xxxxxxxxxxxxxxxxxZ

C.2 Compound data types

    Type ID Type
    Size (bytes)
    Components
    Integers - Variable Scale Factors
    The EPS product format specification does not allow "real" data types to be present in a product. Instead, real values are encoded into integer format using a fixed scaling factor that is specified in the format specification tables. However, there may be some values that vary too much to be efficiently encoded into an integer value with a fixed scaling factor. If these are single values, they may be encoded into a compound that includes a scaling factor and the integer value as described in this section. If these values are an array of values, they are more easily presented by an array of bytes containing the variable scaling factors followed by an array of integer data types. The real value is calculated by dividing the integer value by the scaling factor expressed as a power of ten.
    Variable Scale Factor Byte V-BYTE
    2
    byte + byte
    Variable Scale Factor Unsigned Byte VU-BYTE
    2
    byte + u-byte
    Variable Scale Factor Integer-2 V-INTEGER2
    3
    byte + integer2
    Variable Scale Factor Unsigned Integer-2 VU-INTEGER2
    3
    byte + u-integer2
    Variable Scale Factor Integer-4 V-INTEGER4
    5
    byte + integer4
    Variable Scale Factor Unsigned Integer-4 VU-INTEGER4
    5
    byte + u-integer4
    Variable Scale Factor Integer-8 V-INTEGER8
    9
    byte + integer8
    Variable Scale Factor Unsigned Integer-8 VU-INTEGER8
    9
    byte + u-integer8
    Time formats
    CCSDS Day Segmented (CDS) time represents the day since epoch (1 January 2000 starting with 0). The CDS time is UTC-based and takes into account leap second corrections.
    Short CDS Time short cds time
    6
    u-integer2 + u-integer4

    (Encodes the day since epoch in the first 2 bytes and the number of milliseconds since the beginning of the day in the day in its last 4 bytes)
    Long CDS Time long cds time
    8
    u-integer2 + u-integer4 + u-integer2

    (Encodes the day since epoch in the first 2 bytes, the number of milliseconds since the beginning of the day in its next 4 bytes, and the number of microseconds since the last millisecond in its last 2 bytes)