⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dataheaders.hpp

📁 gps源代码
💻 HPP
📖 第 1 页 / 共 2 页
字号:
/** * @file DataHeaders.hpp * Set of several headers to be used with data structures. */#ifndef DATA_HEADERS_GPSTK#define DATA_HEADERS_GPSTK//============================================================================////  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 2.1 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//  //  Dagoberto Salazar - gAGE. 2007////============================================================================#include <string>#include "SatID.hpp"#include "TypeID.hpp"#include "SourceID.hpp"#include "DayTime.hpp"#include "Triple.hpp"namespace gpstk{    /** @addtogroup DataStructures */    //@{    /** Set of several headers to be used with data structures.     */    /// Defines a header containing just the source of data    struct sourceHeader     {        /// The only field is a SourceID object        SourceID source;        /// Default constructor        sourceHeader() {};        /// Explicit constructor        sourceHeader(const SourceID::SourceType& st, const std::string& name)        {            source.type = st;            source.sourceName = name;        };        /// Explicit constructor        sourceHeader(const SourceID& sI) : source(sI) {};        /// Copy constructor        sourceHeader(const sourceHeader& sH) { source = sH.source; };        /// Assignment operator        virtual sourceHeader& operator=(const sourceHeader& right)        {            if ( this == &right ) return (*this);            (*this).source = right.source;            return *this;        }        /// Assignment operator from a SourceID        virtual sourceHeader& operator=(const SourceID& right)        {            (*this).source = right;            return *this;        }        /// Convenience output method for sourceHeader        virtual std::ostream& dump(std::ostream& s) const;        /// Destructor        virtual ~sourceHeader() {};    };    /// stream output for sourceHeader    std::ostream& operator<<(std::ostream& s, const sourceHeader& sh);    /// Defines a header containing the source and epoch of data    struct sourceEpochHeader : public sourceHeader     {        /// Field containing the epoch of data        DayTime epoch;        /// Default constructor        sourceEpochHeader() {};        /// Explicit constructor        sourceEpochHeader(const SourceID::SourceType& st, const std::string& sourcename, const DayTime& time) : epoch(time)        {            source.type = st;            source.sourceName = sourcename;        };        /// Explicit constructor        sourceEpochHeader(const SourceID& sI, const DayTime& time) : epoch(time) { source = sI; };        /// Explicit constructor from parent class        sourceEpochHeader(const sourceHeader& sh, const DayTime& time) : sourceHeader(sh), epoch(time) {};        /// Copy constructor        sourceEpochHeader(const sourceEpochHeader& seh) : epoch(seh.epoch) { source = seh.source; };        /// Assignment operator        virtual sourceEpochHeader& operator=(const sourceEpochHeader& right)        {            if ( this == &right ) return (*this);            (*this).source = right.source;            (*this).epoch = right.epoch;            return *this;        }        /// Assignment operator from a sourceHeader        virtual sourceEpochHeader& operator=(const sourceHeader& right)        {            (*this).source = right.source;            return *this;        }        /// Assignment operator from a SourceID        virtual sourceEpochHeader& operator=(const SourceID& right)        {            (*this).source = right;            return *this;        }        /// Convenience output method for sourceEpochHeader        virtual std::ostream& dump(std::ostream& s) const;        /// Destructor        virtual ~sourceEpochHeader() {};    };    /// stream output for sourceEpochHeader    std::ostream& operator<<(std::ostream& s, const sourceEpochHeader& seh);    /// Defines a header containing the source and epoch of data, plus extra data extracted from a Rinex file    struct sourceEpochRinexHeader : public sourceEpochHeader     {        /// String describing the antenna type        std::string antennaType;        /// Triple holding the antenna position        Triple antennaPosition;        /// The RINEX epoch flag assigned to this epoch        short epochFlag;        /// Default constructor        sourceEpochRinexHeader() {};        /// Explicit constructor        sourceEpochRinexHeader(const SourceID::SourceType& st, const std::string& sourcename, const DayTime& time, const std::string& antType, const Triple& antPos, const short& flag) : antennaType(antType), antennaPosition(antPos), epochFlag(flag)         {            source.type = st;            source.sourceName = sourcename;            epoch = time;        };        /// Explicit constructor        sourceEpochRinexHeader(const SourceID& sI, const DayTime& time, const std::string& antType, const Triple& antPos, const short& flag) :  antennaType(antType), antennaPosition(antPos), epochFlag(flag)        {            source = sI;            epoch = time;        };        /// Explicit constructor        sourceEpochRinexHeader(const sourceHeader& sh, const DayTime& time, const std::string& antType, const Triple& antPos, const short& flag) : antennaType(antType), antennaPosition(antPos), epochFlag(flag)        {            source.sourceName = sh.source.sourceName;            source.type = sh.source.type;            epoch = time;        };        /// Explicit constructor from parent class sourceEpochHeader        sourceEpochRinexHeader(const sourceEpochHeader& seh) : sourceEpochHeader(seh) {};        /// Explicit constructor from parent class plus extra parameters        sourceEpochRinexHeader(const sourceEpochHeader& seh, const std::string& antType, const Triple& antPos, const short& flag) : sourceEpochHeader(seh), antennaType(antType), antennaPosition(antPos), epochFlag(flag) {};        /// Copy constructor        sourceEpochRinexHeader(const sourceEpochRinexHeader& serh) : antennaType(serh.antennaType), antennaPosition(serh.antennaPosition), epochFlag(serh.epochFlag) { source = serh.source; epoch = serh.epoch; };        /// Assignment operator        virtual sourceEpochRinexHeader& operator=(const sourceEpochRinexHeader& right)        {            if ( this == &right ) return (*this);            (*this).source = right.source;            (*this).epoch = right.epoch;            (*this).antennaType = right.antennaType;            (*this).antennaPosition = right.antennaPosition;            (*this).epochFlag = right.epochFlag;            return *this;        }        /// Assignment operator from a sourceEpochHeader        virtual sourceEpochRinexHeader& operator=(const sourceEpochHeader& right)        {            (*this).source = right.source;            (*this).epoch = right.epoch;            return *this;        }        /// Assignment operator from a sourceHeader        virtual sourceEpochRinexHeader& operator=(const sourceHeader& right)        {            (*this).source = right.source;            return *this;        }        /// Assignment operator from a SourceID        virtual sourceEpochRinexHeader& operator=(const SourceID& right)        {            (*this).source = right;            return *this;        }        /// Convenience output method for sourceEpochRinexHeader        virtual std::ostream& dump(std::ostream& s) const;        /// Destructor        virtual ~sourceEpochRinexHeader() {};    };    /// stream output for sourceEpochRinexHeader    std::ostream& operator<<(std::ostream& s, const sourceEpochRinexHeader& serh);    /// Defines a header containing the source and type of data    struct sourceTypeHeader : public sourceHeader     {        /// Field describing the type of data being held        TypeID type;        /// Default constructor        sourceTypeHeader() {};        /// Explicit constructor        sourceTypeHeader(const SourceID::SourceType& st, const std::string& sourcename, const TypeID& datatype) : type(datatype)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -