GpsSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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 
27 #include "gazebo/sensors/Sensor.hh"
29 #include "gazebo/util/system.hh"
30 
31 namespace gazebo
32 {
33  namespace sensors
34  {
35  // Forward declare private data class
36  class GpsSensorPrivate;
37 
40 
44  {
46  public: GpsSensor();
47 
49  public: virtual ~GpsSensor();
50 
51  // Documentation inherited
52  public: virtual void Load(const std::string & _worldName,
53  sdf::ElementPtr _sdf);
54 
55  // Documentation inherited
56  public: virtual void Load(const std::string & _worldName);
57 
58  // Documentation inherited
59  public: virtual void Init();
60 
61  // Documentation inherited
62  protected: virtual bool UpdateImpl(const bool _force);
63 
64  // Documentation inherited
65  public: virtual void Fini();
66 
69  public: ignition::math::Angle Longitude() const;
70 
73  public: ignition::math::Angle Latitude() const;
74 
78  public: double GetAltitude() const GAZEBO_DEPRECATED(7.0);
79 
82  public: double Altitude() const;
83 
86  private: std::unique_ptr<GpsSensorPrivate> dataPtr;
87  };
89  }
90 }
91 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Forward declarations and typedefs for sensors.
GpsSensor to provide position measurement.
Definition: GpsSensor.hh:43
Base class for sensors.
Definition: Sensor.hh:50
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59