evabem/Measurement.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of abempsy.
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 **  
00019 **
00020 **  Created: 2012-12-18
00021 **  Authors:
00022 **    Marc Wathelet (ISTerre, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef MEASUREMENT_H
00027 #define MEASUREMENT_H
00028 
00029 #include <QGpCoreTools.h>
00030 
00031 class HeaderMap;
00032 
00033 class Measurement
00034 {
00035 public:
00036   Measurement();
00037   ~Measurement();
00038 
00039   enum Field {Ax=0, Ay, Az, Bx, By, Bz, Mx, My, Mz, Nx, Ny, Nz,
00040               Current, Voltage, Variability, Resistance,
00041               ApparentResistivity};
00042 
00043   bool set(LineParser& parser, const HeaderMap& header, int lineNumber);
00044   void set(Field f, double val);
00045 
00046   const Point& a() const {return _a;}
00047   void setA(const Point& a) {_a=a;}
00048 
00049   const Point& b() const {return _b;}
00050   void setB(const Point& b) {_b=b;}
00051 
00052   const Point& m() const {return _m;}
00053   void setM(const Point& m) {_m=m;}
00054 
00055   const Point& n() const {return _n;}
00056   void setN(const Point& n) {_n=n;}
00057 
00058   double current() const {return _I;}
00059   double voltage() const {return _voltage;}
00060   double variability() const {return _var;}
00061   double resistance() const {return _R;}
00062   double apparentResistivity() const {return _apparentR;}
00063 private:
00064   Point _a, _b, _m, _n;
00065   double _I;               // mA
00066   double _voltage;         // V
00067   double _R;               // Ohm
00068   double _var;             // %
00069   double _apparentR;       // Ohmm
00070 };
00071 
00072 #endif // MEASUREMENT_H
00073 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines