-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTimeConverterSystem.h
93 lines (83 loc) · 2.36 KB
/
TimeConverterSystem.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef __GPS_TIME_H__
#define __GPS_TIME_H__
//定义格里高利历日期
typedef struct tagGregoriancalendar{
double year;
double month;
double day;
double hour;
double minute;
double second;
}Gregoriancalendar;
typedef Gregoriancalendar *PCOMMONTIME;
//定义儒略日
typedef struct{
double day;
double second;
}JULIANDAY;
typedef JULIANDAY *PJULIANDAY;
//定义年+年积日+天内秒
typedef struct{
double year;
double day;
double second;
}DayOfYear;
typedef DayOfYear *PDayOfYear;
//定义GPS时周+周内秒
typedef struct tagGPSTIME{
double week;
double second;
}GPSTIME;
typedef GPSTIME *PGPSTIME;
//定义BDS时周+周内秒
typedef struct tagBDSTIME{
double week;
double second;
}BDSTIME;
typedef BDSTIME *PBDSTIME;
//定义Galileo周+周内秒
typedef struct tagGalileotime{
double week;
double second;
}Galileotime;
typedef Galileotime *PGalileotime;
//定义GLONASST时
typedef struct tagGALONASSTTIME{
double gapnum;
double day;
double hour;
double minute;
double second;
}GALONASSTTIME;
typedef GALONASSTTIME *PGALONASSTTIME;
#ifdef __cplusplus
extern "C" {
#endif
//格里高利历到儒略日
void CommonTimeTojulianDay(const PCOMMONTIME pct, const PJULIANDAY pjd);
//儒略日到格里高利历
void JulianDayToCommontime(const PCOMMONTIME pct, const PJULIANDAY pjd);
//年+年积日+天内秒到儒略日
void DayOfYearTojulianDay(const PDayOfYear doy, const PJULIANDAY pjd);
//儒略日到年+年积日+天内秒
void JulianDayToDayOfYear(const PDayOfYear doy, const PJULIANDAY pjd);
// GPS时到儒略日
void GPStimeToJulianday(const PGPSTIME gps, const PJULIANDAY pjd);
//儒略日到GPS时
void JuliandayToGPStime(const PGPSTIME gps, const PJULIANDAY pjd);
//BDS时到儒略日
void BDStimeTojulianday(const PBDSTIME bds, const PJULIANDAY pjd);
//儒略日到BDS时
void JuliandayToBDStime(const PBDSTIME bds, const PJULIANDAY pjd);
//Galileo时到儒略日
void GaliletimeTojulianday(const PGalileotime gll, const PJULIANDAY pjd);
//儒略日到Galileo
void JuliandayToGalileotime(const PGalileotime gll, const PJULIANDAY pjd);
//GLONASST计时到儒略日
void GLONASSTTojulianday(const PGALONASSTTIME gls, const PJULIANDAY pid);
//儒略日到GLONASST计时
void JuliandayToGLONASST(const PGALONASSTTIME gls, const PJULIANDAY pjd);
#ifdef __cplusplus
}
#endif
#endif /* __GPS_TIME_H__ */