- Timestamp:
- Oct 22, 2012, 3:10:48 PM (12 years ago)
- Location:
- trunk/BNC/src/RTRover
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTRover/bncrtrover.cpp
r4757 r4758 3 3 #include <string.h> 4 4 5 #include " dllinterface.h"5 #include "bncrtrover.h" 6 6 #include "bncapp.h" 7 7 #include "bncsettings.h" 8 8 #include "bnctime.h" 9 9 10 #include " ../GPC.h"10 #include "rtrover_interface.h" 11 11 12 12 using namespace std; … … 14 14 // Constructor 15 15 //////////////////////////////////////////////////////////////////////////// 16 t_ dllInterface::t_dllInterface() {16 t_bncRtrover::t_bncRtrover() { 17 17 18 18 bncSettings settings; … … 24 24 // Define Input Options 25 25 // -------------------- 26 GPSS::gpcOpt opt;27 opt.sigmaCode = settings.value("pppSigmaCode").toDouble();28 opt.sigmaPhase = settings.value("pppSigmaPhase").toDouble();29 opt.sigCrd0 = settings.value("pppSigCrd0").toDouble();30 opt.sigCrdP = settings.value("pppSigCrdP").toDouble();31 opt.sigTrp0 = settings.value("pppSigTrp0").toDouble();32 opt.sigTrpP = settings.value("pppSigTrpP").toDouble();33 opt.refCrd[0] = settings.value("pppRefCrdX").toDouble();34 opt.refCrd[1] = settings.value("pppRefCrdY").toDouble();35 opt.refCrd[2] = settings.value("pppRefCrdZ").toDouble();36 opt.antEccNEU[0] = settings.value("pppRefdN").toDouble();37 opt.antEccNEU[1] = settings.value("pppRefdE").toDouble();38 opt.antEccNEU[2] = settings.value("pppRefdU").toDouble();39 opt.maxSolGap = settings.value("pppMaxSolGap").toInt();40 opt.corrSync = settings.value("pppSync").toDouble();41 opt.quickStart = settings.value("pppQuickStart").toInt();42 opt.pppMode = (settings.value("pppSPP").toString() == "PPP") ? 1 : 0;43 opt.usePhase = (Qt::CheckState(settings.value("pppUsePhase").toInt()) == Qt::Checked) ? 1 : 0;44 opt.estTropo = (Qt::CheckState(settings.value("pppEstTropo").toInt()) == Qt::Checked) ? 1 : 0;45 opt.useGlonass = (Qt::CheckState(settings.value("pppGLONASS").toInt()) == Qt::Checked) ? 1 : 0;46 opt.useGalileo = 0;47 opt.antexFileName = strdup(settings.value("pppAntex").toByteArray().constData());48 opt.antennaName = strdup(settings.value("pppAntenna").toByteArray().constData());49 50 // Initialize DLL Client51 // ---------------------52 GPSS::gpcInit(&opt);53 54 free(opt.antexFileName);55 free(opt.antennaName);56 26 57 27 // Connect to BNC Signals … … 72 42 // Destructor 73 43 //////////////////////////////////////////////////////////////////////////// 74 t_ dllInterface::~t_dllInterface() {44 t_bncRtrover::~t_bncRtrover() { 75 45 QMapIterator<QString, t_corr*> ic(_corr); 76 46 while (ic.hasNext()) { … … 78 48 delete ic.value(); 79 49 } 80 GPSS::gpcDestroy();50 rtrover_destroy(); 81 51 } 82 52 83 53 // 84 54 //////////////////////////////////////////////////////////////////////////// 85 void t_ dllInterface::slotNewEphGPS(gpsephemeris gpseph) {55 void t_bncRtrover::slotNewEphGPS(gpsephemeris gpseph) { 86 56 QMutexLocker locker(&_mutex); 87 88 GPSS::gpcEphGPS eph;89 eph.prn = gpseph.satellite;90 eph.GPSweek = gpseph.GPSweek;91 eph.GPSweeks = gpseph.TOC;92 eph.TOE = gpseph.TOE;93 eph.IODC = gpseph.IODC;94 eph.clock_bias = gpseph.clock_bias;95 eph.clock_drift = gpseph.clock_drift;96 eph.clock_driftrate = gpseph.clock_driftrate;97 eph.Crs = gpseph.Crs;98 eph.Delta_n = gpseph.Delta_n;99 eph.M0 = gpseph.M0;100 eph.Cuc = gpseph.Cuc;101 eph.ee = gpseph.e;102 eph.Cus = gpseph.Cus;103 eph.sqrt_A = gpseph.sqrt_A;104 eph.Cic = gpseph.Cic;105 eph.OMEGA0 = gpseph.OMEGA0;106 eph.Cis = gpseph.Cis;107 eph.i0 = gpseph.i0;108 eph.Crc = gpseph.Crc;109 eph.omega = gpseph.omega;110 eph.OMEGADOT = gpseph.OMEGADOT;111 eph.IDOT = gpseph.IDOT;112 113 GPSS::gpcPutEphGPS(&eph);114 57 } 115 58 116 59 // 117 60 //////////////////////////////////////////////////////////////////////////// 118 void t_ dllInterface::slotNewEphGlonass(glonassephemeris gloeph) {61 void t_bncRtrover::slotNewEphGlonass(glonassephemeris gloeph) { 119 62 QMutexLocker locker(&_mutex); 120 63 … … 128 71 updatetime(&wwGPS, &towGPS, gloeph.tb*1000, 0); // Moscow -> GPS 129 72 bncTime tGPS(wwGPS,towGPS); 130 131 GPSS::gpcEphGLO eph;132 eph.satSlotNumber = gloeph.almanac_number;133 eph.mjdUTC = tUTC.mjd();134 eph.secUTC = tUTC.daysec();135 eph.gps_utc = tGPS - tUTC;136 eph.tau = gloeph.tau;137 eph.gamma = gloeph.gamma;138 eph.x_pos = gloeph.x_pos;139 eph.x_velocity = gloeph.x_velocity;140 eph.x_acceleration = gloeph.x_acceleration;141 eph.y_pos = gloeph.y_pos;142 eph.y_velocity = gloeph.y_velocity;143 eph.y_acceleration = gloeph.y_acceleration;144 eph.z_pos = gloeph.z_pos;145 eph.z_velocity = gloeph.z_velocity;146 eph.z_acceleration = gloeph.z_acceleration;147 148 GPSS::gpcPutEphGLO(&eph);149 73 } 150 74 151 75 // 152 76 //////////////////////////////////////////////////////////////////////////// 153 void t_ dllInterface::slotNewEphGalileo(galileoephemeris /* galeph */) {77 void t_bncRtrover::slotNewEphGalileo(galileoephemeris /* galeph */) { 154 78 // not yet implemented 155 79 } … … 157 81 // 158 82 //////////////////////////////////////////////////////////////////////////// 159 void t_ dllInterface::slotNewCorrections(QList<QString> corrList) {83 void t_bncRtrover::slotNewCorrections(QList<QString> corrList) { 160 84 QMutexLocker locker(&_mutex); 161 85 … … 211 135 if (cc->ready()) { 212 136 213 GPSS::gpcCorr corr;214 corr.satSys = cc->prn[0].toAscii();215 corr.satNum = cc->prn.mid(1).toInt();216 corr.GPSweek = cc->tt.gpsw();217 corr.GPSweeks = cc->tt.gpssec();218 corr.iod = cc->iod;219 corr.dClk = cc->dClk;220 corr.dotDClk = cc->dotDClk;221 corr.dotDotDClk = cc->dotDotDClk;222 corr.rao[0] = cc->rao[0];223 corr.rao[1] = cc->rao[1];224 corr.rao[2] = cc->rao[2];225 corr.dotRao[0] = cc->dotRao[0];226 corr.dotRao[1] = cc->dotRao[1];227 corr.dotRao[2] = cc->dotRao[2];228 corr.dotDotRao[0] = cc->dotDotRao[0];229 corr.dotDotRao[1] = cc->dotDotRao[1];230 corr.dotDotRao[2] = cc->dotDotRao[2];231 corr.raoSet = cc->raoSet ? 1 : 0;232 corr.dClkSet = cc->dClkSet ? 1 : 0;233 234 GPSS::gpcPutCorr(&corr);235 137 } 236 138 } 237 238 139 } 239 140 240 141 // 241 142 //////////////////////////////////////////////////////////////////////////// 242 void t_ dllInterface::putNewObs(const t_obs& obsIn) {143 void t_bncRtrover::putNewObs(const t_obs& obsIn) { 243 144 QMutexLocker locker(&_mutex); 244 145 … … 248 149 bncTime epoTime(_epoch[0].GPSWeek, _epoch[0].GPSWeeks); 249 150 if (epoTime != obsTime) { 250 const GPSS::gpcObs* allObs[_epoch.size()];151 //// const GPSS::gpcObs* allObs[_epoch.size()]; 251 152 for (unsigned iObs = 0; iObs < _epoch.size(); iObs++) { 252 153 t_obs& obs = _epoch[iObs]; 253 GPSS::gpcObs* gpcObs = new GPSS::gpcObs();254 154 255 gpcObs->satSys = obs.satSys;256 gpcObs->satNum = obs.satNum;257 gpcObs->slotNum = obs.slotNum;258 gpcObs->GPSweek = obs.GPSWeek;259 gpcObs->GPSweeks = obs.GPSWeeks;260 gpcObs->C1 = obs.C1;261 gpcObs->L1C = obs.L1C;262 gpcObs->D1C = obs.D1C;263 gpcObs->S1C = obs.S1C;264 gpcObs->P1 = obs.P1;265 gpcObs->L1P = obs.L1P;266 gpcObs->D1P = obs.D1P;267 gpcObs->S1P = obs.S1P;268 gpcObs->C2 = obs.C2;269 gpcObs->L2C = obs.L2C;270 gpcObs->D2C = obs.D2C;271 gpcObs->S2C = obs.S2C;272 gpcObs->P2 = obs.P2;273 gpcObs->L2P = obs.L2P;274 gpcObs->D2P = obs.D2P;275 gpcObs->S2P = obs.S2P;276 gpcObs->C5 = obs.C5;277 gpcObs->L5 = obs.L5;278 gpcObs->D5 = obs.D5;279 gpcObs->S5 = obs.S5;280 gpcObs->slip_cnt_L1 = obs.slip_cnt_L1;281 gpcObs->slip_cnt_L2 = obs.slip_cnt_L2;282 gpcObs->slip_cnt_L5 = obs.slip_cnt_L5;283 284 allObs[iObs] = gpcObs;285 155 } 286 156 287 GPSS::gpcResult res; 288 GPSS::gpcProcessEpoch(_epoch.size(), allObs, &res); 289 290 for (unsigned iObs = 0; iObs < _epoch.size(); iObs++) { 291 delete allObs[iObs]; 292 } 157 // for (unsigned iObs = 0; iObs < _epoch.size(); iObs++) { 158 // delete allObs[iObs]; 159 // } 293 160 294 161 _epoch.clear(); -
trunk/BNC/src/RTRover/bncrtrover.h
r4757 r4758 1 #ifndef DLLINTERFACE_H2 #define DLLINTERFACE_H1 #ifndef BNCRTROVER_H 2 #define BNCRTROVER_H 3 3 4 4 #include <vector> … … 7 7 #include "bncephuser.h" 8 8 9 class t_ dllInterface: QObject {9 class t_bncRtrover : QObject { 10 10 Q_OBJECT 11 11 12 12 public: 13 t_ dllInterface();14 ~t_ dllInterface();13 t_bncRtrover(); 14 ~t_bncRtrover(); 15 15 void putNewObs(const t_obs& pp); 16 16
Note:
See TracChangeset
for help on using the changeset viewer.