AltimeterSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-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 
18 #ifndef _GAZEBO_SENSORS_ALTIMETERSENSOR_HH_
19 #define _GAZEBO_SENSORS_ALTIMETERSENSOR_HH_
20 
21 #include <string>
22 
23 #include <sdf/sdf.hh>
24 
25 #include "gazebo/sensors/Sensor.hh"
30 #include "gazebo/util/system.hh"
31 
32 namespace gazebo
33 {
34  namespace sensors
35  {
36  // Forward declare private data class
38 
41 
44  {
46  public: AltimeterSensor();
47 
49  public: virtual ~AltimeterSensor();
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  public: virtual std::string GetTopic() const;
63 
64  // Documentation inherited
65  protected: virtual bool UpdateImpl(const bool _force);
66 
67  // Documentation inherited
68  public: virtual void Fini();
69 
72  public: double Altitude() const;
73 
76  public: double VerticalVelocity() const;
77 
80  public: double ReferenceAltitude() const;
81 
84  public: void SetReferenceAltitude(const double _refAlt);
85 
88  private: std::unique_ptr<AltimeterSensorPrivate> dataPtr;
89  };
91  }
92 }
93 #endif
Forward declarations for transport.
AltimeterSensor to provide vertical position and velocity.
Definition: AltimeterSensor.hh:43
default namespace for gazebo
Definition: AltimeterSensorPrivate.hh:33
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Forward declarations and typedefs for sensors.
Base class for sensors.
Definition: Sensor.hh:50
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59