WaranCore/GpsFix.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of WaranCore.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2009-06-26
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef GPSFIX_H
00028 #define GPSFIX_H
00029 
00030 #include "WaranCoreDLLExport.h"
00031 
00032 namespace WaranCore {
00033 
00034 class WARANCORE_EXPORT GpsFix
00035 {
00036 public:
00037   inline GpsFix();
00038 
00039   enum State {NoFix=0, Fix2D, Fix3D, TimeFix};
00040 
00041   void setState(State s) {_state=s;}
00042   State state() const {return _state;}
00043 
00044   void reset();
00045 
00046   int& longitude() {return _longitude;}
00047   const int& longitude() const {return _longitude;}
00048   int& latitude() {return _latitude;}
00049   const int& latitude() const {return _latitude;}
00050   int& altitude() {return _altitude;}
00051   const int& altitude() const {return _altitude;}
00052   int& horizontalAccuracy() {return _horizontalAccuracy;}
00053   const int& horizontalAccuracy() const {return _horizontalAccuracy;}
00054   unsigned short& horizontalDop() {return _horizontalDop;}
00055   const unsigned short& horizontalDop() const {return _horizontalDop;}
00056   unsigned short& northingDop() {return _northingDop;}
00057   const unsigned short& northingDop() const {return _northingDop;}
00058   unsigned short& eastingDop() {return _eastingDop;}
00059   const unsigned short& eastingDop() const {return _eastingDop;}
00060   unsigned char& sateliteCount() {return _sateliteCount;}
00061   const unsigned char& sateliteCount() const {return _sateliteCount;}
00062 private:
00063   State _state;
00064   int _longitude;
00065   int _latitude;
00066   int _altitude;
00067   int _horizontalAccuracy;
00068   unsigned short _horizontalDop;
00069   unsigned short _northingDop;
00070   unsigned short _eastingDop;
00071   unsigned char _sateliteCount;
00072 };
00073 
00074 inline GpsFix::GpsFix()
00075 {
00076   _state=NoFix;
00077 }
00078 
00079 } // namespace WaranCore
00080 
00081 #endif // GPSFIX_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines