Resolve issue #125 . Update Epoch and LS examples.

This commit is contained in:
PaulZC
2022-03-04 13:01:14 +00:00
parent e3d2c012c6
commit 59d15e014f
4 changed files with 90 additions and 72 deletions
+16 -6
View File
@@ -622,12 +622,22 @@ typedef struct
bool moduleQueried;
} moduleSWVersion_t;
const uint16_t DAYS_SINCE_MONTH[4][16] =
{
{0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 335, 335, 335},
{0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 334, 334, 334},
{0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 334, 334, 334},
{0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 334, 334, 334},
const uint32_t SFE_UBLOX_DAYS_FROM_1970_TO_2020 = 18262; // Jan 1st 2020 Epoch = 1577836800 seconds
const uint16_t SFE_UBLOX_DAYS_SINCE_2020[80] =
{
0, 366, 731, 1096, 1461, 1827, 2192, 2557, 2922, 3288,
3653, 4018, 4383, 4749, 5114, 5479, 5844, 6210, 6575, 6940,
7305, 7671, 8036, 8401, 8766, 9132, 9497, 9862, 10227, 10593,
10958, 11323, 11688, 12054, 12419, 12784, 13149, 13515, 13880, 14245,
14610, 14976, 15341, 15706, 16071, 16437, 16802, 17167, 17532, 17898,
18263, 18628, 18993, 19359, 19724, 20089, 20454, 20820, 21185, 21550,
21915, 22281, 22646, 23011, 23376, 23742, 24107, 24472, 24837, 25203,
25568, 25933, 26298, 26664, 27029, 27394, 27759, 28125, 28490, 28855
};
const uint16_t SFE_UBLOX_DAYS_SINCE_MONTH[2][12] =
{
{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}, // Leap Year (Year % 4 == 0)
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334} // Normal Year
};
class SFE_UBLOX_GNSS