GPSSensor.h
Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2013 University of Jaume-I.
00003  * All rights reserved. This program and the accompanying materials
00004  * are made available under the terms of the GNU Public License v3.0
00005  * which accompanies this distribution, and is available at
00006  * http://www.gnu.org/licenses/gpl.html
00007  * 
00008  * Contributors:
00009  *     Mario Prats
00010  *     Javier Perez
00011  */
00012 
00013 #ifndef GPSSENSOR_H_
00014 #define GPSSENSOR_H_
00015 
00016 #include <osg/Node>
00017 #include <osg/Matrix>
00018 #include <osg/Group>
00019 #include <osg/Vec3d>
00020 
00021 #include <boost/random.hpp>
00022 #include "osgOceanScene.h"
00023 
00024 class GPSSensor
00025 {
00026 
00027 public:
00028   std::string name;
00029 
00036   GPSSensor(osgOceanScene *oscene, std::string sensor_name, osg::Node *parent, osg::Matrixd rMl, double std = 0) :
00037       name(sensor_name), oscene_(oscene), parent_(parent), rMl_(rMl), std_(std)
00038   {
00039     node_ = new osg::Node();
00040     parent->asGroup()->addChild(node_);
00041   }
00042 
00043   osg::Vec3d getMeasurement();
00044 
00045   double getStandardDeviation()
00046   {
00047     return std_;
00048   }
00049 
00051   double depthBelowWater();
00052 
00053   virtual ~GPSSensor()
00054   {
00055   }
00056 
00057 private:
00058   osg::ref_ptr<osgOceanScene> oscene_;
00059   osg::ref_ptr<osg::Node> parent_;
00060   osg::Matrixd rMl_;
00061   double std_;
00062   osg::ref_ptr<osg::Node> node_;
00063 
00064   boost::mt19937 rng_; 
00065 };
00066 
00067 #endif /* GPSSENSOR_H_ */


uwsim
Author(s): Mario Prats
autogenerated on Mon Oct 6 2014 08:24:07