source: ntrip/trunk/BNC/bnctime.h@ 2174

Last change on this file since 2174 was 2123, checked in by mervart, 15 years ago

* empty log message *

File size: 867 bytes
Line 
1
2#ifndef BNCTIME_H
3#define BNCTIME_H
4
5#include <string>
6
7class 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
19 bool operator!=(const bncTime &time1) const;
20 double operator-(const bncTime &time1) const;
21 bncTime operator-(double sec) const;
22 bncTime operator+(double sec) const;
23
24 std::string timestr(unsigned numdec = 3, char sep = ':') const;
25
26 private:
27 bncTime& setmjd(double daysec, int mjd);
28 void reset() {_mjd = 0; _sec = 0;}
29 void civil_time (unsigned int& hour, unsigned int& min, double& sec) const;
30 static void jdgp(double tjul, double & second, long & nweek);
31
32 unsigned int _mjd;
33 double _sec;
34};
35
36#endif
37
Note: See TracBrowser for help on using the repository browser.