<?xml version="1.0"?>

<!-- This configuration file specifies values required for time calculations by psLib -->
<psRoot>

    <!-- Directory for time tables -->
    <psMetadataItem name = "psLib.time.tables.dir" psType = "psString" value = "../../data"/>

    <!-- Number of time tables -->
    <psMetadataItem name = "psLib.time.tables.n" psType = "psS32" value = "4"/>

    <!-- Table file names -->
    <psMetadataItem name = "psLib.time.tables.files" psType = "psString" value = "ser7.dat eopc01_1900_2004.dat finals_all.dat tai_utc.dat"/>

    <!-- Valid from these dates -->
    <psVector name = "psLib.time.tables.from" psType = "psF64" value = "53258.0, 15020.0, 41684.0 2437300.5"/>

    <!-- Valid to these dates -->
    <psVector name = "psLib.time.tables.to" psType = "psF64" value = "53622.0, 53258.0, 53627.0 2451179.5"/>

    <!-- Value of XP for before the earliest MJD -->
    <psMetadataItem name = "psLib.time.before.xp" psType = "psF64" value = "0.0"/>

    <!-- Value of YP for before the earliest MJD -->
    <psMetadataItem name = "psLib.time.before.yp" psType = "psF64" value = "0.0"/>

    <!-- Value of UT1-UTC for before the earliest MJD -->
    <psMetadataItem name = "psLib.time.before.dut" psType = "psF64" value = "0.0"/>


    <!-- Now follows formulae for predicting ahead of the most recent available table entry.
            xp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
            yp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
            A = 2*pi*(MJD - pslib.time.predict.mjd)/365.25
            C = 2*pi*(MJD - pslib.time.predict.mjd)/435.0
            dut = ut1-utc = [0] + [1]*(MJD - [2]) - (UT2-UT1)
            ut2-ut1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T) - 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T)
            T = 2000.0 + (MJD - 51544.03)/365.2422
    -->    
    <psVector name = "psLib.time.predict.xp" psType = "psF64" value = "0.0569, 0.0555, -0.0200, 0.0513, 0.1483"/>
    <psVector name = "psLib.time.predict.yp" psType = "psF64" value = "0.3498, -0.0176, -0.0498, 0.1483, -0.0513"/>
    <psMetadataItem name = "psLib.time.predict.mjd" psType = "psF64" value = "53257.0"/>
    <psVector name = "psLib.time.predict.dut" psType = "psF64" value = "-0.4944, -0.00023, 53262.0"/>

</psRoot>
