GpsSensor.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16*/
17#ifndef _GAZEBO_SENSORS_GPSSENSOR_HH_
18#define _GAZEBO_SENSORS_GPSSENSOR_HH_
19
20#include <memory>
21#include <string>
22
23#include <ignition/math/Angle.hh>
24#include <sdf/sdf.hh>
25
28#include "gazebo/util/system.hh"
29
30namespace gazebo
31{
32 namespace sensors
33 {
34 // Forward declare private data class
35 class GpsSensorPrivate;
36
39
42 class GZ_SENSORS_VISIBLE GpsSensor: public Sensor
43 {
45 public: GpsSensor();
46
48 public: virtual ~GpsSensor();
49
50 // Documentation inherited
51 public: virtual void Load(const std::string & _worldName,
52 sdf::ElementPtr _sdf);
53
54 // Documentation inherited
55 public: virtual void Load(const std::string & _worldName);
56
57 // Documentation inherited
58 public: virtual void Init();
59
60 // Documentation inherited
61 protected: virtual bool UpdateImpl(const bool _force);
62
63 // Documentation inherited
64 public: virtual void Fini();
65
68 public: ignition::math::Angle Longitude() const;
69
72 public: ignition::math::Angle Latitude() const;
73
76 public: double Altitude() const;
77
80 public: ignition::math::Vector3d VelocityENU() const;
81
84 public: double VelocityEast() const;
85
88 public: double VelocityNorth() const;
89
92 public: double VelocityUp() const;
93
96 private: std::unique_ptr<GpsSensorPrivate> dataPtr;
97 };
99 }
100}
101#endif
sensors
Definition SensorManager.hh:35
Forward declarations and typedefs for sensors.
GpsSensor to provide position measurement.
Definition GpsSensor.hh:43
virtual void Fini()
Finalize the sensor.
virtual void Init()
Initialize the sensor.
virtual void Load(const std::string &_worldName, sdf::ElementPtr _sdf)
Load the sensor with SDF parameters.
virtual ~GpsSensor()
Destructor.
virtual void Load(const std::string &_worldName)
Load the sensor with default parameters.
ignition::math::Vector3d VelocityENU() const
Accessor for curent velocity in East-North-Up frame.
ignition::math::Angle Longitude() const
Accessor for current longitude angle.
double Altitude() const
Accessor for current altitude.
double VelocityUp() const
Accessor for current velocity in Up direction.
virtual bool UpdateImpl(const bool _force)
This gets overwritten by derived sensor types.
ignition::math::Angle Latitude() const
Accessor for current latitude angle.
double VelocityNorth() const
Accessor for current velocity in North direction.
double VelocityEast() const
Accessor for current velocity in East direction.
Base class for sensors.
Definition Sensor.hh:53
Forward declarations for the common classes.
Definition Animation.hh:27