DDid.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: DDid.hpp 581 2007-06-06 13:43:06Z btolman $"
00002 
00003 //============================================================================
00004 //
00005 //  This file is part of GPSTk, the GPS Toolkit.
00006 //
00007 //  The GPSTk is free software; you can redistribute it and/or modify
00008 //  it under the terms of the GNU Lesser General Public License as published
00009 //  by the Free Software Foundation; either version 2.1 of the License, or
00010 //  any later version.
00011 //
00012 //  The GPSTk is distributed in the hope that it will be useful,
00013 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 //  GNU Lesser General Public License for more details.
00016 //
00017 //  You should have received a copy of the GNU Lesser General Public
00018 //  License along with GPSTk; if not, write to the Free Software Foundation,
00019 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //  
00021 //  Copyright 2004, The University of Texas at Austin
00022 //
00023 //============================================================================
00024 
00025 //============================================================================
00026 //
00027 //This software developed by Applied Research Laboratories at the University of
00028 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00029 //Department of Defense. The U.S. Government retains all rights to use,
00030 //duplicate, distribute, disclose, or release this software. 
00031 //
00032 //Pursuant to DoD Directive 523024 
00033 //
00034 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00035 //                           release, distribution is unlimited.
00036 //
00037 //=============================================================================
00038 
00045 #ifndef CLASS_DOUB_DIFF_ID_INCLUDE
00046 #define CLASS_DOUB_DIFF_ID_INCLUDE
00047 
00048 //------------------------------------------------------------------------------------
00049 // system includes
00050 #include <string>
00051 #include <ostream>
00052 
00053 // GPSTk
00054 #include "Exception.hpp"
00055 // Geomatics
00056 #include "GSatID.hpp"
00057 
00058 namespace gpstk {
00059 //------------------------------------------------------------------------------------
00060 // double difference identification
00061 class DDid {
00062 public:
00063    std::string site1,site2;
00064    gpstk::GSatID sat1,sat2;
00065    int ssite,ssat;
00066       // empty constructor - sites are empty and sats are GPS,-1
00067    //DDid(void);
00068       // explicit constructor - do not reorder
00069    explicit DDid(std::string s1,
00070                  std::string s2,
00071                  gpstk::GSatID p1,
00072                  gpstk::GSatID p2);
00073 
00074       // 'less than' is required for map<DDid,...>.find(DDid)
00075    bool operator<(const DDid& right) const;
00076    bool operator>(const DDid& right) const;
00077    bool operator==(const DDid& right) const;
00078    bool operator!=(const DDid& right) const;
00079 
00080    // return 0 if either is invalid
00081    // return +1 if the same, -1 if the same except for one switch
00082    // return +2 if left is greater than right
00083    // return -2 if left is less than right
00084    static int compare(const DDid& left, const DDid& right);
00085 
00086    friend std::ostream& operator<<(std::ostream& s, const DDid& t);
00087 
00088 };
00089 
00090 //------------------------------------------------------------------------------------
00091 // single difference id
00092 class SDid {
00093 public:
00094    std::string site1,site2;
00095    gpstk::GSatID sat;
00096    int ssite;
00097       // empty constructor - sites are empty and sat is GPS,-1
00098    //SDid(void);
00099       // explicit constructor - do not reorder
00100    explicit SDid(std::string s1,
00101                  std::string s2,
00102                  gpstk::GSatID p);
00103 
00104    bool operator<(const SDid& right) const;
00105    bool operator>(const SDid& right) const;
00106    bool operator==(const SDid& right) const;
00107 
00108    // return 0 if either is invalid
00109    // return +1 if the same, -1 if the same except for one switch
00110    // return +2 if left is greater than right
00111    // return -2 if left is less than right
00112    static int compare(const SDid& left, const SDid& right);
00113 
00114    friend std::ostream& operator<<(std::ostream& s, const SDid& t);
00115 };
00116 
00117 //------------------------------------------------------------------------------------
00118 // one-way data id
00119 class OWid {
00120 public:
00121    std::string site;
00122    gpstk::GSatID sat;
00123       // empty constructor - site is empty and sat is GPS,-1
00124    //OWid(void);
00125       // explicit constructor - do not reorder
00126    explicit OWid(std::string& s1, gpstk::GSatID& p);
00127 
00128    bool operator<(const OWid& right) const;
00129    bool operator>(const OWid& right) const;
00130    bool operator==(const OWid& right) const;
00131 
00132    // return 0 if either is invalid
00133    // return +1 if the same
00134    // return +2 if left is greater than right
00135    // return -2 if left is less than right
00136    static int compare(const OWid& left, const OWid& right);
00137 
00138    friend std::ostream& operator<<(std::ostream& s, const OWid& t);
00139 };
00140 
00141 }  // end namespace gpstk
00142 //------------------------------------------------------------------------------------
00143 #endif

Generated on Wed Feb 8 03:30:58 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1