diff --git a/include/mrs_uav_state_estimators/processors/proc_tf_to_world.h b/include/mrs_uav_state_estimators/processors/proc_tf_to_world.h index 161f66f..1ee4572 100644 --- a/include/mrs_uav_state_estimators/processors/proc_tf_to_world.h +++ b/include/mrs_uav_state_estimators/processors/proc_tf_to_world.h @@ -89,10 +89,12 @@ void ProcTfToWorld::callbackGnss(const sensor_msgs::NavSatFix::C if (!std::isfinite(msg->latitude)) { ROS_ERROR_THROTTLE(1.0, "[%s] NaN detected in GNSS variable \"msg->latitude\"!!!", Processor::getPrintName().c_str()); + return; } if (!std::isfinite(msg->longitude)) { ROS_ERROR_THROTTLE(1.0, "[%s] NaN detected in GNSS variable \"msg->longitude\"!!!", Processor::getPrintName().c_str()); + return; } mrs_lib::UTM(msg->latitude, msg->longitude, &gnss_x_, &gnss_y_); @@ -122,6 +124,7 @@ std::tuple ProcTfToWorld::process(measurement_t& mea measurement(0) += gnss_x_; measurement(1) += gnss_y_; + ROS_INFO_THROTTLE(1.0, "[%s]: GNSS offset calculated at: [%.2f %.2f]", Processor::getPrintName().c_str(), gnss_x_, gnss_y_); return {true, true}; } /*//}*/