source: ntrip/trunk/BNC/src/bncantex.h@ 10954

Last change on this file since 10954 was 10951, checked in by stuerze, 3 months ago

minor changes to investigate a special GLO behavior

File size: 3.8 KB
Line 
1// Part of BNC, a utility for retrieving decoding and
2// converting GNSS data streams from NTRIP broadcasters.
3//
4// Copyright (C) 2007
5// German Federal Agency for Cartography and Geodesy (BKG)
6// http://www.bkg.bund.de
7// Czech Technical University Prague, Department of Geodesy
8// http://www.fsv.cvut.cz
9//
10// Email: euref-ip@bkg.bund.de
11//
12// This program is free software; you can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation, version 2.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25#ifndef BNCANTEX_H
26#define BNCANTEX_H
27
28#include <QtCore>
29#include <QString>
30#include <string>
31#include <newmat.h>
32#include "bncconst.h"
33#include "bnctime.h"
34
35class bncAntex {
36 public:
37 bncAntex(const char* fileName);
38 bncAntex();
39 ~bncAntex();
40 t_irc readFile(const QString& fileName);
41 void print() const;
42 QString pcoSinexString(const std::string& antName, t_frequency::type frqType);
43 QString snxCodeSinexString(const std::string& antName);
44 double satCorr(const QString& prn, t_frequency::type frqType,
45 double eleSat, double azSat, bool& found) const;
46 double rcvCorr(const std::string& antName, t_frequency::type frqType,
47 double eleSat, double azSat, bool& found) const;
48 t_irc satCoMcorrection(const QString& prn, double Mjd,
49 const ColumnVector& xSat, const ColumnVector& vSat,
50 ColumnVector& dx);
51
52 // Drains and returns the diagnostic log accumulated by the GLONASS
53 // yaw-fixed model (mode transitions, with beta/mu/rate at the time).
54 // Empty most of the time; only non-empty right after a transition.
55 QString takeGlonassYawLog() {
56 QString s = _glonassYawLog;
57 _glonassYawLog.clear();
58 return s;
59 }
60
61 private:
62 // Per-satellite GLONASS yaw state, used to freeze the yaw angle while
63 // the satellite cannot follow the nominal Sun-pointing attitude law
64 // (see glonassYawAngle() below).
65 class t_glonassYaw {
66 public:
67 t_glonassYaw() {
68 yaw = 0.0;
69 lastCallMjd = 0.0;
70 valid = false;
71 fixed = false;
72 }
73 double yaw;
74 double lastCallMjd; // Mjd of the most recent call (any branch) for this PRN
75 bool valid;
76 bool fixed; // true while the yaw-fixed override is currently active
77 };
78
79 QString _glonassYawLog;
80
81 double glonassYawAngle(const QString& prn, double Mjd, const ColumnVector& xSat,
82 const ColumnVector& vSat, const ColumnVector& xSun);
83
84 QMap<QString, t_glonassYaw> _glonassYaw;
85
86 class t_frqMap {
87 public:
88 t_frqMap() {
89 for (unsigned ii = 0; ii < 3; ii++) {
90 neu[ii] = 0.0;
91 }
92 }
93 double neu[3];
94 ColumnVector pattern;
95 };
96
97 class t_antMap {
98 public:
99 t_antMap() {
100 zen1 = 0.0;
101 zen2 = 0.0;
102 dZen = 0.0;
103 snxCode = "";
104 }
105 ~t_antMap() {
106 QMapIterator<t_frequency::type, t_frqMap*> it(frqMap);
107 while (it.hasNext()) {
108 it.next();
109 delete it.value();
110 }
111 }
112 QString antName;
113 double zen1;
114 double zen2;
115 double dZen;
116 QString snxCode;
117 QMap<t_frequency::type, t_frqMap*> frqMap;
118 bncTime validFrom;
119 bncTime validTo;
120 };
121
122 QMap<QString, t_antMap*> _maps;
123};
124
125#endif
Note: See TracBrowser for help on using the repository browser.