Qt Virtual Chart Table (QVCT)
CDeviceDataDop.cpp
Go to the documentation of this file.
1 // INDENTING (emacs/vi): -*- mode:c++; tab-width:2; c-basic-offset:2; intent-tabs-mode:nil; -*- ex: set tabstop=2 expandtab:
2 
3 /*
4  * Qt Virtual Chart Table (QVCT)
5  * Copyright (C) 2012 Cedric Dufour <http://cedric.dufour.name>
6  * Author: Cedric Dufour <http://cedric.dufour.name>
7  *
8  * The Qt Virtual Chart Table (QVCT) is free software:
9  * you can redistribute it and/or modify it under the terms of the GNU General
10  * Public License as published by the Free Software Foundation, Version 3.
11  *
12  * The Qt Virtual Chart Table (QVCT) is distributed in the hope
13  * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
14  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * See the GNU General Public License for more details.
17  */
18 
19 // C/C++
20 #include <cmath>
21 
22 // QT
23 #include <QString>
24 
25 // QVCT
27 
28 
29 //------------------------------------------------------------------------------
30 // CONSTANTS / STATIC
31 //------------------------------------------------------------------------------
32 
33 const double CDeviceDataDop::UNDEFINED_VALUE = -9999999;
35 
36 //------------------------------------------------------------------------------
37 // CONSTRUCTORS / DESTRUCTOR
38 //------------------------------------------------------------------------------
39 
40 CDeviceDataDop::CDeviceDataDop( double _fdDopHorizontal, double _fdDopVertical, double _fdDopTime )
41  : fdDopHorizontal( _fdDopHorizontal )
42  , fdDopVertical( _fdDopVertical )
43  , fdDopTime( _fdDopTime )
44 {}
45 
46 
47 //------------------------------------------------------------------------------
48 // METHODS
49 //------------------------------------------------------------------------------
50 
51 void CDeviceDataDop::setDop( const CDeviceDataDop& _roDeviceDataDop )
52 {
53  fdDopHorizontal = _roDeviceDataDop.fdDopHorizontal;
54  fdDopVertical = _roDeviceDataDop.fdDopVertical;
55  fdDopTime = _roDeviceDataDop.fdDopTime;
56 }
57 
59 {
61  return UNDEFINED_VALUE;
63 }
64 
66 {
68  return UNDEFINED_VALUE;
70 }
71 
72 //
73 // OPERATORS
74 //
75 
76 bool CDeviceDataDop::operator==( const CDeviceDataDop& _roDeviceDataDop ) const
77 {
78  return( fdDopHorizontal == _roDeviceDataDop.fdDopHorizontal
79  && fdDopVertical == _roDeviceDataDop.fdDopVertical
80  && fdDopTime == _roDeviceDataDop.fdDopTime );
81 }
82 
83 bool CDeviceDataDop::operator!=( const CDeviceDataDop& _roDeviceDataDop ) const
84 {
85  return( fdDopHorizontal != _roDeviceDataDop.fdDopHorizontal
86  || fdDopVertical != _roDeviceDataDop.fdDopVertical
87  || fdDopTime != _roDeviceDataDop.fdDopTime );
88 }
89 
Dilution-of-Precision (DOP) data.
void setDop(const CDeviceDataDop &_roDeviceDataDop)
Sets (copy) the Dilution-of-Precision (HDOP, VDOP, TDOP) values from other DOP data.
bool operator!=(const CDeviceDataDop &_roDeviceDataDop) const
Inequality operator.
double getDopGlobal() const
Returns the global Dilution-of-Precision (GDOP)
double fdDopHorizontal
Horizontal position Dilution-of-Precision (HDOP)
double getDopPosition() const
Returns the position Dilution-of-Precision (PDOP)
double fdDopTime
Time Dilution-of-Precision (TDOP)
CDeviceDataDop(double _fdDopHorizontal=UNDEFINED_VALUE, double _fdDopVertical=UNDEFINED_VALUE, double _fdDopTime=UNDEFINED_VALUE)
static const double UNDEFINED_VALUE
Specific value for an undefined component.
static const CDeviceDataDop UNDEFINED
Specific value for undefined DOP data.
bool operator==(const CDeviceDataDop &_roDeviceDataDop) const
Equality operator.
double fdDopVertical
Vertical position Dilution-of-Precision (VDOP)