forked from berthubert/galmon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testrunner.cc
38 lines (29 loc) · 956 Bytes
/
testrunner.cc
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
35
36
37
38
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "ext/doctest.h"
#include "ephemeris.hh"
TEST_CASE("testing ephemeris age") {
CHECK(ephAge(0,0) == 0);
CHECK(ephAge(100,0) == 100);
CHECK(ephAge(0,100) == -100);
CHECK(ephAge(0,2*86400) == -2*86400);
CHECK(ephAge(0,3*86400) == -3*86400);
CHECK(ephAge(0, 3.49*86400) == -3.49*86400);
CHECK(ephAge(0, 3.51*86400) != -3.51*86400);
CHECK(ephAge(0, 3.6*86400) != -3.6*86400);
CHECK(ephAge(2*86400, 0) == 2*86400);
CHECK(ephAge(3*86400, 0) == 3*86400);
CHECK(ephAge(3.49*86400, 0) == 3.49*86400);
}
#include "sp3.hh"
TEST_CASE("sp3") {
SP3Reader sp3("./sp3/WUM0MGXULA_20192610100_01D_05M_ORB.SP3");
SP3Entry e;
CHECK(sp3.get(e));
CHECK(e.gnss == 0);
CHECK(e.sv == 1);
CHECK(e.x ==-18824158.694000002 ) ;
CHECK(sp3.get(e));
CHECK(e.gnss == 0);
CHECK(e.sv == 2);
CHECK(e.clockBias == 1000.0 * -306.607761);
}