17 #ifndef IGNITION_SENSORS_NAVSAT_HH_
18 #define IGNITION_SENSORS_NAVSAT_HH_
22 #include <ignition/common/SuppressWarning.hh>
23 #include <sdf/Sensor.hh>
25 #include "gz/sensors/config.hh"
26 #include "gz/sensors/navsat/Export.hh"
35 inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
60 public:
virtual bool Load(
const sdf::Sensor &_sdf)
override;
65 public:
virtual bool Load(sdf::ElementPtr _sdf)
override;
69 public:
virtual bool Init()
override;
75 const std::chrono::steady_clock::duration &_now)
override;
121 const math::Angle &_longitude,
double _altitude = 0.0);
123 IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
127 IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
NavSat Sensor Class.
Definition: gz/sensors/NavSatSensor.hh:50
const math::Angle & Longitude() const
Get the longitude of the NavSat, wrapped between +/- 180 degrees.
void SetAltitude(double _altitude)
Set the altitude of the NavSat.
void SetVelocity(const math::Vector3d &_vel)
Set the velocity of the NavSat in ENU world frame.
NavSatSensor()
Constructor.
double Altitude() const
Get NavSat altitude above sea level.
virtual bool Load(sdf::ElementPtr _sdf) override
Load the sensor with SDF parameters.
virtual bool Load(const sdf::Sensor &_sdf) override
Load the sensor based on data from an sdf::Sensor object.
virtual bool Update(const std::chrono::steady_clock::duration &_now) override
Update the sensor and generate data.
void SetLatitude(const math::Angle &_latitude)
Set the latitude of the NavSat.
void SetPosition(const math::Angle &_latitude, const math::Angle &_longitude, double _altitude=0.0)
Easy short hand for setting the position of the sensor.
void SetLongitude(const math::Angle &_longitude)
Set the longitude of the NavSat.
virtual bool Init() override
Initialize values in the sensor.
bool HasConnections() const
Check if there are any subscribers.
virtual ~NavSatSensor()
Destructor.
const math::Angle & Latitude() const
Get the latitude of the NavSat, wrapped between +/- 180 degrees.
const math::Vector3d & Velocity() const
Get the velocity of the NavSat sensor in the ENU world frame.
a base sensor class
Definition: gz/sensors/Sensor.hh:60
Definition: gz/sensors/AirPressureSensor.hh:32