Package org.orekit.utils
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
-
-
Field Summary
-
Fields inherited from interface org.orekit.utils.Formatter
DATE_FORMAT, STANDARDIZED_LOCALE
-
-
Constructor Summary
Constructors Constructor Description TruncatedCcsdsFormatter()
Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString(double value)
Format a double number.String
toString(int year, int month, int day, int hour, int minute, double seconds)
Formats to CCSDS 16 digit standard for the seconds variable.
-
-
-
Method Detail
-
toString
public String toString(double value)
Format a double number. Formats to CCSDS compliant 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 interfaceFormatter
- Parameters:
year
- of date to be formattedmonth
- of date to be formattedday
- of month to be formattedhour
- to be formattedminute
- to be formattedseconds
- and sub-seconds to be formatted- Returns:
- date formatted to match the following format [yyyy-MM-ddTHH:mm:ss.S#]
-
-