This repository has been archived by the owner on Dec 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
time.fbs
34 lines (31 loc) · 1.76 KB
/
time.fbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* ANISE Toolkit
* Copyright (C) 2021 Christopher Rabotin <[email protected]> et al. (cf. AUTHORS.md)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
namespace Anise.Time;
/*
* An epoch represents a date and time past the reference defined by the time system (defined for the full file).
* In ANISE, an epoch is represented as the number of seconds past the reference epoch.
* ANISE libraries **MUST** provide helper functions to convert dates between the language's native datetime representation (or a relevant structure if not available) into a double-double representation for the requested time system.
* It is stored as a double-double. A double-double number is an unevaluated sum of two IEEE double precision numbers, capable of representing at least 106 bits of significand.
* Description: https://en.wikipedia.org/w/index.php?title=Quadruple-precision_floating-point_format&oldid=1040957342#Double-double_arithmetic.
*
* NOTE: Because Epoch is a structure, it may not contain a flatbuffer enum. Therefore, the time system used must be specified along with the reference epoch.
*/
struct Epoch {
hi: double;
lo: double;
}
/*
* Specifies the time system of some epoch.
* TDB: Barycentric Dynamical Time (IERS TDB) -- default time representation in ANISE
* UTC: Universal Coordinated Time -- assumes ALL leap seconds until the requested date
* TAI: Atomic International Time
* TT: Terrestrial Time
* GPS: Global Positioning System
* SCLK: Spacecraft clock -- if used, then an ICD describing the clock model of the spacecraft must be provided
*/
enum System:ubyte { TDB, UTC, TAI, TT, GPS, SCLK }