# This file defines the MIDGARD constants. It is read and handled by the midgard.lib.constant-module.
#
# It is possible to use different values for the same constant. Unfortunately this is sometimes necessary as some
# models are only consistent with given values for the constant.
#
# References:
# [1] Petit, G. and Luzum, B. (eds.), IERS Conventions (2010),
#     IERS Technical Note No. 36, BKG (2010).
#     http://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html
#
# [2] EGM2008 Global Gravitational Model
#     http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008/README_FIRST.pdf
# 
# [3] Folkner et al. (2014), The Planetary and Lunar Ephemerides DE430 and DE431.
#     https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de430_and_de431.pdf
#
# [4] IS-GPS-200H (2013), Interface specification IS-GPS-200, Navstar GPS Space
#     Segment/Navigation User Interfaces, Global Positioning Systems Directorate
#     Systems Engineering & Integration
#
# [5] DE421 header file. GM values are given in AU^3 / day^2
#     ftp://ssd.jpl.nasa.gov/pub/eph/planets/ascii/de421/header.421
#
# [6] Williams et al. (2008), DE421 Lunar Orbit, Physical Librations, and Surface Coordinates.
#     naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/a_old_versions/de421_lunar_ephemeris_and_orientation.pdf
#
# [7] OS SIS ICD (2015), European GNSS (Galileo) Open Service Signal In Space Interface Control Document, 
#     European Union, Issue 1.2
#
# [8] BDS-SIS-ICD-2.0 (2013), BeiDou Navigation Satellite System Signal in Space Interface Control Document - Open
#     Service Signal (Version 2.0), China Satellite Navigation Office
#
# [9] IS-QZSS-PNT-001 (2017), Quasi-Zenith Satellite System - Inferface specification: Satellite Positioning, Navigation
#     and Timing Service, Japan Aerospace Exploration Agency
#
# [10] IRNSS-ICD-SPS (2014), Indian Regional Navigation Satellite System - Signal in space ICD for standard positioning
#      service, ISRO Satellite Centre, Indian Space Research Organization, Bangalore, Version 1.0
#
# [11] Montenbruck, O., Steigenberger, P., and Hauschild, A. (2018). Multi-GNSS Signal-in-Space Range Error Assessment -
#      Methodology Results. Advances in Space Research, DOI 10.1016/j.asr.2018.03.041.
#
# [12] GLONASS ICD (1998), GLONASS - Interface control document, General Description of Code Division Multiple Access
#      Signal System, Russian Space Systems, Edition 1.0, 2016
#
# [13] https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440_tech-comments.txt


## \f$ a_E \f$: Equatorial radius of the Earth.
#
#  Scaling parameter in the spherical harmonic function describing the
#  gravity field of the Earth.
#
#  Unit:       Meters, \f$ m \f$.
#
#  References: IERS Conventions [1], table 1.1,
#              EGM2008 Global Gravitational Model [2].
[a]
__unit__     = meter
default      = %(iers_2010)s
iers_2010    = 6378136.6 
egm_2008     = 6378136.3


## \f$ a_sun \f$: Radius of the Sun
##
#
#  Unit:       Meters, \f$ m \f$.
#
# References: https://en.wikipedia.org/wiki/Solar_radius
#
[R_sun]
__unit__ = meter
default  =  %(web)s
web      =  6.955e8

## \f$ c \f$: Speed of light.
#
#  Unit:       Meters per second, \f$ m / s \f$.
#
#  References: IERS Conventions [1], table 1.1,
#              http://en.wikipedia.org/wiki/Speed_of_light
[c]
__unit__     = meter per second
default      = %(iers_2010)s
iers_2010    = 299792458.0

## \f$ G \f$: Gravitational constant
#
#  Unit:       \f$ m^3 / kg / s^2 \f$.
#
#  References: IERS Conventions [1], table 1.1,
[G]
__unit__     = meter**3 / (kilogram*second**2)
default      = %(iers_2010)s
iers_2010    = 6.67428e-11

## \f$ L_G \f$: Conversion factor between TT and TCG time or length, x.
# As a result, x can also be GM with M as mass. 
# All values are relative to the SI second, defined by the involved
# atomic clocks, and the SI meter, defined by the definition of c.
# The use of the TT
# spacetime system implies that the space and time coordinates of the
# reference system are scaled wrt the spacetime coordinates of a 
# commonly used form of the Einstein field equations. The reason for the 
# scaling is that TAI-time_{TT} should be only periodic (approximately 
# constant). If (GM)_{TT} is estimated based on observations, what would 
# the estimated GM be if we do not scale the spacetime, (GM)_{TCG}:
# 
#  
#  Applied as \f$ x_{TT} = (1-L_G) x_{TCG} $.
#
#  Unit:       none.
#
#  References: IERS Conventions [1], table 1.1.
[L_G]
__unit__     =
default      = %(iers_2010)s
iers_2010    = 6.969290134e-10

## \f$ L_B \f$: Conversion factor between TDB and TCB time or length, x.
# As a result, x can also be GM with M as mass. 
# All values are relative to the SI second, defined by the involved
# atomic clocks, and the SI meter, defined by the definition of c.
# The use of the TDB
# spacetime system implies that the space and time coordinates of the
# reference system are scaled wrt the spacetime coordinates of a 
# commonly used form of the Einstein field equations. The reason for the 
# scaling is that TAI-time_{TDB} should be only periodic.
# If (GM)_{TDB} is estimated based on observations, what would 
# the estimated GM be if we do not scale the spacetime, (GM)_{TCB}:
#  
#  Applied as \f$ x_{TDB} = (1-L_B) x_{TCB} $.
#
#  Unit:       none.
#
#  References: IERS Conventions [1], table 1.1.
[L_B]
__unit__     =
default      = %(iers_2010)s
iers_2010    = 1.550519768e-8

## \f$ L_C \f$: Conversion factor between TDT and TDB constants, x, like GM.
# The relation between TDT time and TDB time is much more complicated than
# a scaling. The connection below is made on the basis that constants in TCG have 
# equal value as constants in TCB. L_C = L_B - L_G, see above.
#  
#  Applied as \f$ x_{TDT} = (1+L_C) x_{TDB} $.
#
#  Unit:       none.
#
#  References: IERS Conventions [1], table 1.1.
[L_C]
__unit__     =
default      = %(iers_2010)s
iers_2010    = 1.48082686741e-8


## \f$ T_0 \f$: Epoch used in the transformation between TT and TCG and between 
# TDB and TCB. See equations (10.1) and (10.3) in IERS Conventions [1].
#
#  Unit:       none.
#
#  References: IERS Conventions [1], chapter 10.1
[T_0]
__unit__     =
default      = %(iers_2010)s
iers_2010    = 2443144.5003725

## Integer part of T_0
[T_0_jd1]
__unit__     =
default      = %(iers_2010)s
iers_2010    = 2443144.0

## Fractional part of T_0
[T_0_jd2]
__unit__     =
default      = %(iers_2010)s
iers_2010    = 0.5003725


## \f$ TDB_0 \f$: Defining constant in transformation between TCB and TDB.
#
#  Unit: seconds
#
#  References: IERS Conventions [1]. Table 1.1 and chapter 10.1
[TDB_0]
__unit__     = second
default      = %(iers_2010)s
iers_2010    = -6.55e-5 


## \f$a_E$\f: Equatorial radius of the Earth
#
# Unit: meter
#
# References: IERS Conventions [1]. Table 1.1
[a_E]
__unit__     = meter
default      = %(iers_2010)s
iers_2010    = 6378136.6


## \f$ GM_\oplus \f$: Gravitational constant times the mass of Earth.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      cgcs2000   - BDS-SIS-ICD-2.0 [8], table 5.11
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [6], table 1, page 6 [tdb].
#	   de440      - DE440 [13], constant GM3
#      egm_2008   - EGM2008 Global Gravitational Model [2].
#      gtrf       - Galileo OS-SIS-ICD [7], table 58
#      iers_2010  - IERS Conventions [1], table 1.1.; Galileo OS-SIS-ICD [7], table 58
#      jgs        - QZSS IS-QZSS-PNT-001 [9], section 5.3.3
#      pz_90      - GLONASS ICD [12], Table 4.1
#      wgs84      - IS-GPS-200H [4], table 20-IV.; IRNSS-ICD-SPS [10], Appendix B
[GM]
__unit__     = meter**3 / second **2
default      = %(iers_2010)s
cgcs2000     = 3.986004418e14
de430        = 3.98600435436e14
de421        = 3.986004362e14
de440        = 3.98600435507e14
egm_2008     = 3.986004415e14
gtrf         = 3.986004418e14
iers_2010    = 3.986004418e14
jgs          = 3.986005e14
pz_90        = 3.986004418e14
wgs84        = 3.986005e14


## \f$ GM_\odot \f$: Heliocentric gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      iers_2010  - IERS Conventions [1], table 1.1.
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GMS [tdb].
#	   de440      - DE440 [13], constant GMS
[GM_sun]
__unit__     = meter**3 / second **2
default      = %(iers_2010)s
iers_2010    = 1.32712442099e20
de430        = 1.327124400419394e20
de421        = 1.327124400409446e20
de440        = 1.32712440041279419e20

## \f$ GM_\text{moon} \f$: Lunacentric gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [6], table 2, page 7 [tdb].
#	   de440      - DE440 [13], constant GMM
[GM_moon]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 4.902800066e12
de421        = 4.90280008e12
de440        = 4.902800118e12

## \f$ GM_\text{mercury} \f$: Mercury gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM1 [tdb].
#      de440      - DE440 [13], constant GM1
[GM_mercury]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 2.203178e13
de421        = 2.203209e13
de440        = 2.2031868551e13

## \f$ GM_\text{venus} \f$: Venus gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM2 [tdb].
#	   de440      - DE440 [13], constant GM2
[GM_venus]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 3.24858592e14
de421        = 3.24858592e14
de440        = 3.24858592000e14

## \f$ GM_\text{mars} \f$: Mars gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM4 [tdb].
#	   de440      - DE440 [13], constant GM4
[GM_mars]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 4.2828375214e13
de421        = 4.2828375214e13
de440        = 4.2828375816e13

## \f$ GM_\text{jupiter} \f$: Jupiter gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM5 [tdb].
#	   de440      - DE440 [13], constant GM5
[GM_jupiter]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 1.267127648e17
de421        = 1.267127648e17
de440        = 1.267127641e17

## \f$ GM_\text{saturn} \f$: Saturn gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM6 [tdb].
#	   de440      - DE440 [13], constant GM6
[GM_saturn]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 3.79405852e16
de421        = 3.79405852e16
de440        = 3.79405848418e16

## \f$ GM_\text{uranus} \f$: Uranus gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM7 [tdb].
#	   de440      - DE440 [13], constant GM7
[GM_uranus]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 5.7945486e15
de421        = 5.7945486e15
de440        = 5.7945564e15

## \f$ GM_\text{neptune} \f$: Neptune gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM8 [tdb].
#	   de440      - DE440 [13], constant GM8
[GM_neptune]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 6.83652710058e15
de421        = 6.836535e15
de440        = 6.83652710058e15

## \f$ GM_\text{pluto} \f$: Pluto gravitational constant.
#
#  Unit:       \f$ m^3 / s^2 \f$.
#
#  References:
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant GM9 [tdb].
#	   de440      - DE440 [13], constant GM9
[GM_pluto]
__unit__     = meter**3 / second **2
default      = %(de440)s
de430        = 9.77e11
de421        = 9.77e11
de440        = 9.755e11

## Astronomical unit.
#
# The astronomical unit roughly represents the distance from the Earth to the Sun. It has been defined as exactly 149
# 597 870 700 meters since 2012.
#
#  Unit: meters
#
#  References:
#      iers_2010  - IERS Conventions [1]: in TDB system
#      web        - https://en.wikipedia.org/wiki/Astronomical_unit
#      de430      - DE430 [3], table 8, page 49 [tdb].
#      de421      - DE421 [5], constant AU.
[AU]
__unit__     = meter
default     = %(iers_2010)s
iers_2010   = 149597870700
web         = 149597870700
de430       = 149597870700
de421       = 149597870699.6262

## Solar constant.
#  
#  Unit: watts per square meter (W/m^2) 
#  
#  Reference: https://en.wikipedia.org/wiki/Solar_constant
#
#             Montenbruck, Oliver and Gill, Eberhard, 
#             Satellite Orbits, Springer Verlag, 2000.
#
[S]
__unit__    = watt / meter**2
default     = %(book)s
web         = 1361
book        = 1367

## \f$ d\theta / dt \f$: Rate of advance of ERA.
#
#  Unit:      \f$ \mathrm{rev} / \mathrm{UT1day} \f$
#
#  Reference: IERS Conventions [1], table 1.1
[era_dot]
__unit__    = revolution per day
default     = %(iers_2010)s
iers_2010   = 1.00273781191135448

## \f$ \omega \f$: Nominal mean Earth's angular velocity.
#
#  Unit:       \f$ \mathrm{rads}^{-1} \f$
#
#  Reference:  cgcs2000   - BeiDou BDS-SIS-ICD-2.0 [8], table 5.11
#              gtrf       - Galileo OS-SIS-ICD [7], table 58
#              iers_2010  - IERS Conventions [1], table 1.2
#              jgs        - QZSS IS-QZSS-PNT-001 [9], section 5.3.3
#              pz_90      - GLONASS ICD [12], Table 4.1
#              wgs84      - IS-GPS-200H [4], table 20-IV.; IRNSS-ICD-SPS [10], Appendix B
[omega]
__unit__     = radians per second
default      = %(iers_2010)s
cgcs2000     = 7.292115e-5
gtrf         = 7.2921151467e-5
iers_2010    = 7.292115e-5
jgs          = 7.2921151467e-5
pz_90        = 7.292115e-5
wgs84        = 7.2921151467e-5

## \f$ \J \f$: The Earth's angular momentum per unit mass
#
#  Unit:       \f$ m^2 / s \f$
#
#  Reference:  iers_2010  - IERS Conventions [1], section 10.3
[J]
__unit__     = meter**2 per second
default      = %(iers_2010)s
iers_2010    = 9.8e8


## \f$ \rho_w \f$: Density of sea water
#
#  Unit:       \f$ kg / m^3 \f$.
#
#  References: IERS Conventions [1], section 7.1.5
[rho_w]
__unit__     = kilogram per meter ** 3
default      = %(iers_2010)s
iers_2010    = 1025


## \f$ g_E \f$: Mean equatorial gravity
#
#  Unit:       \f$ m / s^2 \f$.
#
#  References: IERS Conventions [1], table 1.1
[g_E]
__unit__     = meter per second ** 2
default      = %(iers_2010)s
iers_2010    = 9.7803278


## \f$ w_{R} \f$: Global average signal-in-space ranging error (SISRE) radial weight factor
#
# Note: The radial SISRE weight factors are given for an elevation of 0 and 5 degrees, except for QZSS (J) with 
#       0 degree (average of QZSS perigee and apogee).
#
#  Unit:      None.
#
#  References:
#      Montenbruck 2018 [11], table 4
[sisre_weight_radial_0deg]
__unit__     =
default      = %(G)s
C            = 0.981
E            = 0.984
G            = 0.979
J            = 0.991
R            = 0.977

[sisre_weight_along_cross_0deg]
__unit__     =
default      = %(G)s
C            = 0.136
E            = 0.128
G            = 0.143
J            = 0.096
R            = 0.149


## \f$ w_{A, C} \f$: Global average signal-in-space ranging error (SISRE) along-/cross-track weight factor
#
# Note: The radial SISRE weight factors are given for an elevation of 0 and 5 degrees degrees, except for QZSS (J) with  
#       0 degree (average of QZSS perigee and apogee).
#
#  Unit:      None.
#
#  References:
#      Montenbruck 2018 [11], table 4
[sisre_weight_radial_5deg]
__unit__     =
default      = %(G)s
C            = 0.982
E            = 0.984
G            = 0.980
J            = 0.991
R            = 0.979

[sisre_weight_along_cross_5deg]
__unit__     =
default      = %(G)s
C            = 0.132
E            = 0.124
G            = 0.139
J            = 0.096
R            = 0.145
