Gazebo Sensors

API Reference

6.8.1
gz/sensors/NavSatSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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 IGNITION_SENSORS_NAVSAT_HH_
18 #define IGNITION_SENSORS_NAVSAT_HH_
19 
20 #include <memory>
21 
22 #include <ignition/common/SuppressWarning.hh>
23 #include <sdf/Sensor.hh>
24 
25 #include "gz/sensors/config.hh"
26 #include "gz/sensors/navsat/Export.hh"
27 
29 
30 namespace ignition
31 {
32  namespace sensors
33  {
34  // Inline bracket to help doxygen filtering.
35  inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
36  //
38  class NavSatPrivate;
39 
49  class IGNITION_SENSORS_NAVSAT_VISIBLE NavSatSensor : public Sensor
50  {
52  public: NavSatSensor();
53 
55  public: virtual ~NavSatSensor();
56 
60  public: virtual bool Load(const sdf::Sensor &_sdf) override;
61 
65  public: virtual bool Load(sdf::ElementPtr _sdf) override;
66 
69  public: virtual bool Init() override;
70 
74  public: virtual bool Update(
75  const std::chrono::steady_clock::duration &_now) override;
76 
79  public: void SetLatitude(const math::Angle &_latitude);
80 
84  public: const math::Angle &Latitude() const;
85 
88  public: void SetLongitude(const math::Angle &_longitude);
89 
93  public: const math::Angle &Longitude() const;
94 
97  public: void SetAltitude(double _altitude);
98 
101  public: double Altitude() const;
102 
105  public: void SetVelocity(const math::Vector3d &_vel);
106 
109  public: const math::Vector3d &Velocity() const;
110 
114  public: bool HasConnections() const;
115 
120  public: void SetPosition(const math::Angle &_latitude,
121  const math::Angle &_longitude, double _altitude = 0.0);
122 
123  IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
126  private: std::unique_ptr<NavSatPrivate> dataPtr;
127  IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
128  };
129  }
130  }
131 }
132 
133 #endif
NavSat Sensor Class.
Definition: gz/sensors/NavSatSensor.hh:49
Definition: gz/sensors/AirPressureSensor.hh:31
a base sensor class
Definition: gz/sensors/Sensor.hh:59