#include <Synchronize.hpp>
Inheritance diagram for Synchronize:


This class is meant to be used with the GNSS data structures objects found in "DataStructures" class.
A typical way to use this class follows:
// INITIALIZATION PART // EBRE station nominal position Position nominalPos(4833520.192, 41537.1043, 4147461.560); RinexObsStream rin("ebre0300.02o"); // Data stream // Create the input observation file stream for REFERENCE STATION RinexObsStream rinRef("bell0300.02o"); // GDS for rover data gnssRinex gRin; // GDS for reference station data gnssRinex gRef; // Create an object to synchronize rover and reference station // data streams. This object will take data out from "rinRef" // until it is synchronized with data in "gRin". Default // synchronization tolerance is 1 s, but we change it to 2.5 s. Synchronize synchro( rinRef, gRin, 2.5 ); // Create an object to compute the single differences of // prefit residuals DeltaOp delta; // By default, it'll work on code prefit residuals // More declarations here.... // PROCESSING PART while(rin >> gRin) { // First, let's synchronize and process reference station data try { gRef >> synchro >> myFilter >> modelRef; delta.setRefData(gRef.body); } catch(SynchronizeException& e) // THIS IS VERY IMPORTANT IN { // ORDER TO MANAGE A POSSIBLE cout << endl; // DESYNCHRONIZATION!!! continue; } catch(...) { cerr << "Exception when processing reference station data " << "at epoch: " << gRef.header.epoch << endl; } // Rover data processing is done here: try { gRin >> myFilter >> model >> delta >> baseChange >> solverNEU; } catch(...) { cerr << "Exception at epoch: " << gRin10.header.epoch << endl; } // Print results cout << solverNEU.getSolution(TypeID::dLat) << " "; cout << solverNEU.getSolution(TypeID::dLon) << " "; cout << solverNEU.getSolution(TypeID::dH) << " "; cout << endl; }
Each Synchronize object will take data out of a RinexObsStream object holding reference data until the data stream is synchronized (within a given tolerance) with another data stream.
If synchronization is not possible at a given epoch, it will throw a "SynchronizeException" exception. The program then must handle it appropriately, usually just issuing a 'continue' statement in order to process next epoch.
Definition at line 157 of file Synchronize.hpp.
Public Member Functions | |
| Synchronize () | |
| Default constructor. | |
| Synchronize (RinexObsStream &rinexObs, gnssRinex &roverData, const double tol=1.0) | |
| Common constructor. | |
| Synchronize (RinexObsStream &rinexObs, gnssSatTypeValue &roverData, const double tol=1.0) | |
| Common constructor. | |
| virtual gnssSatTypeValue & | Process (gnssSatTypeValue &gData) throw (SynchronizeException) |
| Returns a gnnsSatTypeValue object, adding the new data generated when calling this object. | |
| virtual gnssRinex & | Process (gnssRinex &gData) throw (SynchronizeException) |
| Returns a gnnsRinex object, adding the new data generated when calling this object. | |
| virtual double | getTolerance (void) const |
| Returns tolerance, in seconds. | |
| virtual Synchronize & | setTolerance (const double tol) |
| Sets tolerance, in seconds. | |
| virtual RinexObsStream * | getPtrReferenceSource (void) const |
| Returns a pointer to the RinexObsStream object of reference data. | |
| virtual Synchronize & | setReferenceSource (RinexObsStream &rinexObs) |
| Sets the RinexObsStream object of reference data. | |
| virtual Synchronize & | setRoverData (gnssRinex &roverData) |
| Sets the gnssRinex that holds ROVER receiver data. | |
| virtual Synchronize & | setRoverData (gnssSatTypeValue &roverData) |
| Sets the gnssSatTypeValue that holds ROVER receiver data. | |
| virtual std::string | getClassName (void) const |
| Returns a string identifying this object. | |
| virtual | ~Synchronize () |
| Destructor. | |
Protected Member Functions | |
| virtual gnssRinex & | Process (CommonTime time, gnssRinex &gData) throw (SynchronizeException) |
Protected Attributes | |
| std::list< gnssRinex > | gnssRinexBuffer |
| gnssRinex data buffer | |
| RinexObsStream * | pRinexRef |
| Pointer to input observation file stream for reference station. | |
| gnssSatTypeValue * | pgRov1 |
| Pointer to gnnsRinex data structure (GDS) that holds ROVER data. | |
| double | tolerance |
| Tolerance, in seconds. | |
| bool | firstTime |
| Flag to mark that first data batch was read. | |
|
|
Default constructor.
Definition at line 162 of file Synchronize.hpp. |
|
||||||||||||||||
|
Common constructor.
Definition at line 174 of file Synchronize.hpp. |
|
||||||||||||||||
|
Common constructor.
Definition at line 187 of file Synchronize.hpp. |
|
|
Destructor.
Definition at line 258 of file Synchronize.hpp. |
|
|
Returns a string identifying this object.
Implements ProcessingClass. Definition at line 38 of file Synchronize.cpp. |
|
|
Returns a pointer to the RinexObsStream object of reference data.
Definition at line 225 of file Synchronize.hpp. |
|
|
Returns tolerance, in seconds.
Definition at line 213 of file Synchronize.hpp. |
|
||||||||||||
|
Definition at line 100 of file Synchronize.cpp. References gpstk::abs(), and GPSTK_THROW. |
|
|
Returns a gnnsRinex object, adding the new data generated when calling this object.
Implements ProcessingClass. Definition at line 67 of file Synchronize.cpp. |
|
|
Returns a gnnsSatTypeValue object, adding the new data generated when calling this object.
Implements ProcessingClass. Definition at line 84 of file Synchronize.cpp. References gnssData::body, and gnssRinex::header. |
|
|
Sets the RinexObsStream object of reference data.
Definition at line 233 of file Synchronize.hpp. Referenced by NetworkObsStreams::addRinexObsFile(). |
|
|
Sets the gnssSatTypeValue that holds ROVER receiver data.
Definition at line 249 of file Synchronize.hpp. |
|
|
Sets the gnssRinex that holds ROVER receiver data.
Definition at line 241 of file Synchronize.hpp. Referenced by NetworkObsStreams::readEpochData(). |
|
|
Sets tolerance, in seconds.
Definition at line 47 of file Synchronize.cpp. References Synchronize::tolerance. |
|
|
Flag to mark that first data batch was read.
Definition at line 282 of file Synchronize.hpp. |
|
|
gnssRinex data buffer
Definition at line 267 of file Synchronize.hpp. |
|
|
Pointer to gnnsRinex data structure (GDS) that holds ROVER data.
Definition at line 275 of file Synchronize.hpp. |
|
|
Pointer to input observation file stream for reference station.
Definition at line 271 of file Synchronize.hpp. |
|
|
Tolerance, in seconds.
Definition at line 279 of file Synchronize.hpp. Referenced by Synchronize::setTolerance(). |
1.3.9.1