Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NavSat (GPS) sensor #177

Merged
merged 14 commits into from
Jan 5, 2022
Prev Previous commit
codecheck
Signed-off-by: Louise Poubel <[email protected]>
chapulina committed Jan 5, 2022
commit 1e65194054209b1ebb2e434ad7c72e7114f8dc98
6 changes: 4 additions & 2 deletions include/ignition/sensors/NavSatSensor.hh
Original file line number Diff line number Diff line change
@@ -78,15 +78,17 @@ namespace ignition
/// \param[in] _latitude Latitude of NavSat
public: void SetLatitude(const math::Angle &_latitude);

/// \brief Get the latitude of the NavSat, wrapped between +/- 180 degrees.
/// \brief Get the latitude of the NavSat, wrapped between +/- 180
/// degrees.
/// \return Latitude angle.
public: const math::Angle &Latitude() const;

/// \brief Set the longitude of the NavSat
/// \param[in] _longitude Longitude of NavSat
public: void SetLongitude(const math::Angle &_longitude);

/// \brief Get the longitude of the NavSat, wrapped between +/- 180 degrees.
/// \brief Get the longitude of the NavSat, wrapped between +/- 180
/// degrees.
/// \return Longitude angle.
public: const math::Angle &Longitude() const;

3 changes: 2 additions & 1 deletion src/NavSatSensor.cc
Original file line number Diff line number Diff line change
@@ -99,7 +99,8 @@ bool NavSatSensor::Load(const sdf::Sensor &_sdf)

if (!this->dataPtr->pub)
{
ignerr << "Unable to create publisher on topic [" << this->Topic() << "].\n";
ignerr << "Unable to create publisher on topic [" << this->Topic()
<< "]." << std::endl;
return false;
}