GNSS_OptionFile.h

Go to the documentation of this file.
00001 /**
00002 \file    GNSS_OptionFile.h
00003 \brief   The option file for EssentialGNSS.
00004 
00005 \author  Glenn D. MacGougan (GDM)
00006 \date    2007-11-29
00007 \since   2006-12-30
00008 
00009 \b "LICENSE INFORMATION" \n
00010 Copyright (c) 2007, refer to 'author' doxygen tags \n
00011 All rights reserved. \n
00012 
00013 Redistribution and use in source and binary forms, with or without
00014 modification, are permitted provided the following conditions are met: \n
00015 
00016 - Redistributions of source code must retain the above copyright
00017   notice, this list of conditions and the following disclaimer. \n
00018 - Redistributions in binary form must reproduce the above copyright
00019   notice, this list of conditions and the following disclaimer in the
00020   documentation and/or other materials provided with the distribution. \n
00021 - The name(s) of the contributor(s) may not be used to endorse or promote 
00022   products derived from this software without specific prior written 
00023   permission. \n
00024 
00025 THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 
00026 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
00027 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00028 DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00029 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00030 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
00031 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
00032 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
00033 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
00034 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
00035 SUCH DAMAGE.
00036 */
00037 
00038 #ifndef _EGNSS_OPTIONFILE_H_
00039 #define _EGNSS_OPTIONFILE_H_
00040 
00041 #include <string>
00042 #include "OptionFile.h"
00043 #include "gnss_types.h"
00044 #include "GNSS_RxData.h"
00045 
00046 namespace GNSS
00047 {
00048   /// \brief   A derived option file class for the program.
00049   class GNSS_OptionFile : public OptionFile
00050   { 
00051   public: 
00052 
00053     /// \brief    The default constructor (no data allocated yet).
00054     GNSS_OptionFile();                                             
00055 
00056     /// \brief    The destructor.
00057     virtual ~GNSS_OptionFile();
00058 
00059   private:
00060 
00061     /// \brief   The copy constructor. Disabled!
00062     GNSS_OptionFile( const GNSS_OptionFile& rhs ) {};
00063 
00064     /// \brief   The assignment operator. Disabled!
00065     void operator=(const GNSS_OptionFile& rhs) {};
00066 
00067   public:
00068 
00069     /// \brief    Read and interpret the option file.
00070     /// \return   true if successful, false if error.
00071     bool ReadAndInterpretOptions( std::string OptionFilePath );
00072 
00073   public:
00074 
00075     struct stStationInformation
00076     {
00077       bool   isValid; //!< Is this information valid.
00078 
00079       std::string DataTypeStr;       //!< The data type string.
00080       GNSS_enumRxDataType DataType;  //!< The data type as an enumeration.
00081       
00082       double latitudeRads;     //!< Station Latitude [rad].
00083       double latitudeDegrees;  //!< Station Latitude [deg].
00084       double longitudeRads;    //!< Station Longitude [rad].
00085       double longitudeDegrees; //!< Station Longitude [degrees].
00086       double height;           //!< Station Height [m]
00087 
00088       double x; //!< Station ECEF WGS84 X coordinate [m].
00089       double y; //!< Station ECEF WGS84 Y coordinate [m].
00090       double z; //!< Station ECEF WGS84 Z coordinate [m].
00091 
00092       bool useTropo; //!< A boolean to indicate if the tropospheric correction is enabled.
00093       bool useIono;  //!< A boolean to indicate if the broadcast ionospheric correction is enabled.
00094 
00095       double uncertaintyLatitudeOneSigma;  //!< Initial position uncertainty [m].
00096       double uncertaintyLongitudeOneSigma; //!< Initial position uncertainty [m].
00097       double uncertaintyHeightOneSigma;    //!< Initial position uncertainty [m].
00098 
00099       int satsToExclude[64];    //!< An array of satellite id (PRN for GPS) to exclude from processing.
00100       unsigned nrSatsToExclude; //!< The number of satellite id's specified in satsToExclude.
00101       
00102       std::string DataPath;     //!< The path to the datafile.
00103       
00104       // default constructor
00105       stStationInformation()
00106       : isValid(false),
00107         latitudeRads(0.0),
00108         latitudeDegrees(0.0),
00109         longitudeRads(0.0),
00110         longitudeDegrees(0.0),
00111         height(0.0),
00112         useTropo(true),
00113         useIono(true),
00114         uncertaintyLatitudeOneSigma(1.0),
00115         uncertaintyLongitudeOneSigma(1.0),
00116         uncertaintyHeightOneSigma(1.0),
00117         nrSatsToExclude(0)
00118       {
00119         unsigned i;
00120         for( i = 0; i < 64; i++ )
00121           satsToExclude[i] = 0;
00122       }
00123     };
00124 
00125     struct stGPSTime
00126     {
00127       int GPSWeek;
00128       double GPSTimeOfWeek;
00129 
00130       // default constructor
00131       stGPSTime() 
00132         : GPSWeek(-1), GPSTimeOfWeek(0.0)
00133       {}
00134     };
00135 
00136     struct stKalmanOptions
00137     {
00138       double alphaVn;
00139       double alphaVe;
00140       double alphaVup;
00141       double alphaClkDrift;
00142       double sigmaVn;
00143       double sigmaVe;
00144       double sigmaVup;
00145       double sigmaClkDrift;
00146 
00147       // default constructor
00148       stKalmanOptions()
00149         : alphaVn(100.0), 
00150         alphaVe(100.0), 
00151         alphaVup(100.0), 
00152         alphaClkDrift(100.0),
00153         sigmaVn(0.01),
00154         sigmaVe(0.01),
00155         sigmaVup(0.01),
00156         sigmaClkDrift(0.01)
00157       {}
00158     };
00159 
00160     /// The Kalman filtering options.
00161     stKalmanOptions m_KalmanOptions;
00162 
00163     /// The path to the option file.
00164     std::string m_OptionFilePath;
00165 
00166     /// The path to the output file.
00167     std::string m_OutputFilePath;
00168 
00169     /// A string is used to indicate the processing method.
00170     std::string m_ProcessingMethod;
00171 
00172     /// A boolean to indicate if only single difference measurements
00173     /// between the reference and rover station will be used.
00174     bool m_processDGPSOnly;
00175 
00176     //!< The path to the navigation datafile (ephemeris), if applicable.
00177     std::string m_RINEXNavDataPath;  
00178 
00179     /// The reference station information.
00180     stStationInformation m_Reference;
00181 
00182     /// The rover station information.
00183     stStationInformation m_Rover;
00184 
00185     /// The start time for processing.
00186     stGPSTime m_StartTime;
00187 
00188     /// The end time for processing.
00189     stGPSTime m_EndTime;
00190 
00191     /// The klobuchar ionospheric parameters.
00192     GNSS_structKlobuchar m_klobuchar;
00193 
00194     /// The elevation mask [degrees].
00195     double m_elevationMask;
00196 
00197     /// The C/N0 mask [dB-Hz].
00198     double m_cnoMask;
00199 
00200     /// The locktime mask [s].
00201     double m_locktimeMask;
00202 
00203   };
00204 
00205 } // end namespace Zenautics
00206 
00207 #endif // _EGNSS_OPTIONFILE_H_
00208