//============================================================================== // // This file is part of GPSTk, the GPS Toolkit. // // The GPSTk is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation; either version 3.0 of the License, or // any later version. // // The GPSTk is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with GPSTk; if not, write to the Free Software Foundation, // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA // // This software was developed by Applied Research Laboratories at the // University of Texas at Austin. // Copyright 2004-2020, The Board of Regents of The University of Texas System // //============================================================================== //============================================================================== // // This software was developed by Applied Research Laboratories at the // University of Texas at Austin, under contract to an agency or agencies // within the U.S. Department of Defense. The U.S. Government retains all // rights to use, duplicate, distribute, disclose, or release this software. // // Pursuant to DoD Directive 523024 // // DISTRIBUTION STATEMENT A: This software has been approved for public // release, distribution is unlimited. // //============================================================================== /** * @file DataStructures.hpp * Include file defining the data containers for program DDBase. */ #ifndef CLASS_DDBASE_DATA_STRUCT_INCLUDE #define CLASS_DDBASE_DATA_STRUCT_INCLUDE //------------------------------------------------------------------------------------ // system includes #include #include // GPSTk #include "PRSolutionLegacy.hpp" #include "Stats.hpp" // DDBase #include "DDBase.hpp" //------------------------------------------------------------------------------------ // Data structures // structure for raw data typedef struct data_structure { double L1; // cycles double L2; // cycles double P1; // m double P2; // m double D1; // Hz optional when fit to phase used in synchronization double D2; // Hz double S1; // dB-Hz double S2; // dB-Hz double ER; // m double elev; // degrees double az; // degrees } DataStruct; // structure for buffered raw good data class RawData { public: std::vector L1; // cycles std::vector L2; // cycles std::vector P1; // m std::vector P2; // m std::vector S1; // db-Hz std::vector S2; // db-Hz std::vector ER; // m std::vector elev; // deg std::vector az; // deg std::vector count; // epoch count since FirstEpoch }; // structure for computing single differences -- just counts and min,max elevation class SDData { public: double elevmin,elevmax; std::vector count; }; // structure for buffered DDs with biases class DDData { public: double L1bias,L2bias; double prevL1,prevL2; // these vectors and count must remain parallel std::vector DDL1,DDL2,DDP1,DDP2,DDER; // data for each point std::vector count; // count for each point std::vector resets; // collection of indexes into // count[] where bias is reset //DDData(void) : last_buffer_index(0) {}; }; // both reference and unknown positions class Station { public: bool fixed; // if true, hold position fixed, else solve for it bool usePRS; // if true, use ave. PR solution as position gpstk::Position pos; // either known or solution or apriori gpstk::PRSolutionLegacy PRS; // pseudorange solution, includes clock bias gpstk::Stats PRSXstats; // stats on pseudorange solution gpstk::Stats PRSYstats; // stats on pseudorange solution gpstk::Stats PRSZstats; // stats on pseudorange solution double ant_azimuth; // (relative) orientation of the antenna dipole std::map RawDataMap; // cleaned, raw data at current epoch gpstk::CommonTime time; // timetag (SolutionEpoch) of RawDataMap // these buffers must remain parallel std::map RawDataBuffers; // buffers of good raw data std::vector ClockBuffer; // buffer of clock solution (m) std::vector ClkSigBuffer;// buffer of clock solution sigma (m) std::vector RxTimeOffset;// SolutionEpoch minus RxTimetag (sec) // TD not used? used in OutputClockData std::vector CountBuffer; // epoch count since FirstEpoch - if data exists std::string TropType; // label from input giving type of trop model gpstk::TropModel *pTropModel; // chosen trop model (defined in CommandInput) double temp; // temperature in degrees Celsius double press; // pressure in mbars at sealevel double rhumid; // relative humidity in % (0-100) Station(void) throw(); // empty and only constructor ~Station(void) throw(); // destructor - free trop model }; /** * @throw Exception */ Station& findStationInList(std::map& SL, std::string& label); // Rinex observation input files class ObsFile { public: std::string name; // file name, not including path std::string label; // Station label to which this obs file belongs gpstk::RinexObsStream ins; // streams for reading RINEX // TD use pointer -- operator= does not work for RinexObsStream, // yet operator= necessary to form vector gpstk::RinexObsHeader Rhead;// RINEX header record (for reading) gpstk::RinexObsData Robs; // RINEX observation record (for reading) double dt; // nominal time step <= reading past header gpstk::CommonTime firstTime; // first good epoch int nread; // number of records read (-1=unopened, 0=header read) bool valid; // set false if unopened or at EOF bool getNext; // flag used by ReadNextObs to synchronize reading int inC1,inP1,inP2; // indexes in RINEX header for pseudorange int inL1,inL2; // indexes in RINEX header for carrier phase int inD1,inD2,inS1,inS2; // needed or used ?? ObsFile(void) throw(); // empty constructor ObsFile(const ObsFile& of) throw(); // copy constructor // (need for vector) ~ObsFile(void); // destructor ObsFile& operator=(const ObsFile& of) throw(); // assignment operator // (need for copy c'tor) }; #endif // nothing below this //------------------------------------------------------------------------------------