Rev | Line | |
---|
[5741] | 1 | #ifndef PRN_H
|
---|
| 2 | #define PRN_H
|
---|
| 3 |
|
---|
| 4 | #include <string>
|
---|
| 5 |
|
---|
| 6 | class t_prn {
|
---|
| 7 | public:
|
---|
| 8 | static const unsigned MAXPRN_GPS = 32;
|
---|
| 9 | static const unsigned MAXPRN_GLONASS = 26;
|
---|
[6321] | 10 | static const unsigned MAXPRN_GALILEO = 36;
|
---|
| 11 | static const unsigned MAXPRN_QZSS = 10;
|
---|
| 12 | static const unsigned MAXPRN_SBAS = 38;
|
---|
| 13 | static const unsigned MAXPRN_BDS = 37;
|
---|
| 14 | static const unsigned MAXPRN = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO
|
---|
| 15 | + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS;
|
---|
[5741] | 16 |
|
---|
| 17 | t_prn() : _system('G'), _number(0) {}
|
---|
| 18 | t_prn(char system, int number) : _system(system), _number(number) {}
|
---|
| 19 |
|
---|
| 20 | ~t_prn() {};
|
---|
| 21 |
|
---|
| 22 | void set(char system, int number) {_system = system; _number = number;}
|
---|
[5838] | 23 | void set(const std::string& str);
|
---|
[5741] | 24 |
|
---|
| 25 | char system() const {return _system;}
|
---|
| 26 | int number() const {return _number;}
|
---|
| 27 | int toInt() const;
|
---|
| 28 | std::string toString() const;
|
---|
| 29 |
|
---|
| 30 | bool operator==(const t_prn& prn2) const {
|
---|
| 31 | if (_system == prn2._system && _number == prn2._number) {
|
---|
| 32 | return true;
|
---|
| 33 | }
|
---|
| 34 | else {
|
---|
| 35 | return false;
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | operator unsigned() const;
|
---|
| 40 |
|
---|
| 41 | friend std::istream& operator >> (std::istream& in, t_prn& prn);
|
---|
| 42 |
|
---|
| 43 | private:
|
---|
| 44 | char _system;
|
---|
| 45 | int _number;
|
---|
| 46 | };
|
---|
| 47 |
|
---|
| 48 | std::istream& operator >> (std::istream& in, t_prn& prn);
|
---|
| 49 |
|
---|
| 50 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.