Line | |
---|
1 |
|
---|
2 | #ifndef BNCTIME_H
|
---|
3 | #define BNCTIME_H
|
---|
4 |
|
---|
5 | #include <string>
|
---|
6 |
|
---|
7 | class bncTime {
|
---|
8 | public:
|
---|
9 | bncTime() {this->reset();}
|
---|
10 | bncTime(int gpsw, double gpssec);
|
---|
11 |
|
---|
12 | bncTime& set(int gpsw, double gpssec);
|
---|
13 |
|
---|
14 | unsigned int mjd() const;
|
---|
15 | double daysec() const;
|
---|
16 | unsigned int gpsw() const;
|
---|
17 | double gpssec() const;
|
---|
18 | void civil_time (unsigned int& hour, unsigned int& min,
|
---|
19 | double& sec) const;
|
---|
20 |
|
---|
21 | bool operator!=(const bncTime &time1) const;
|
---|
22 | double operator-(const bncTime &time1) const;
|
---|
23 | bncTime operator-(double sec) const;
|
---|
24 | bncTime operator+(double sec) const;
|
---|
25 |
|
---|
26 | std::string timestr(unsigned numdec = 3, char sep = ':') const;
|
---|
27 |
|
---|
28 | private:
|
---|
29 | bncTime& setmjd(double daysec, int mjd);
|
---|
30 | void reset() {_mjd = 0; _sec = 0;}
|
---|
31 | static void jdgp(double tjul, double & second, long & nweek);
|
---|
32 |
|
---|
33 | unsigned int _mjd;
|
---|
34 | double _sec;
|
---|
35 | };
|
---|
36 |
|
---|
37 | #endif
|
---|
38 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.