Class TruncatedCcsdsFormatter

java.lang.Object
org.orekit.utils.TruncatedCcsdsFormatter
All Implemented Interfaces:
Formatter

public class TruncatedCcsdsFormatter extends Object implements Formatter
Formatter used to produce strings from data that are compliant with CCSDS standards.

Formats a double number to achieve CCSDS formatting standards for: OPM, OMM, OEM, or OCM (502.0-B-3 7.5.6), CDM (508.0-B-1 6.3.2.2), TDM (503.0-B-2 4.3.4), and ADM (504.0-B-2 6.8.4.1). This states that the mantissa shall not exceed 16 digits.

This does NOT ensure round-trip safety. See AccurateFormatter for a formatter that ensures round trip safety.

Since:
13.0
Author:
John Ajamian
  • Constructor Details

    • TruncatedCcsdsFormatter

      public TruncatedCcsdsFormatter()
      Public constructor.
  • Method Details

    • toString

      public String toString(double value)
      Format a double number. Formats to CCSDS compliant standards.
      Specified by:
      toString in interface Formatter
      Parameters:
      value - number to format
      Returns:
      number formatted to full accuracy or CCSDS standards
    • toString

      public String toString(int year, int month, int day, int hour, int minute, double seconds)
      Formats to CCSDS 16 digit standard for the seconds variable. Format a date. Does not check if date time is real or if it will meet formating requirements.
      Specified by:
      toString in interface Formatter
      Parameters:
      year - of date to be formatted
      month - of date to be formatted
      day - of month to be formatted
      hour - to be formatted
      minute - to be formatted
      seconds - and sub-seconds to be formatted
      Returns:
      date formatted to match the following format [yyyy-MM-ddTHH:mm:ss.S#]