We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ca490a commit 60978edCopy full SHA for 60978ed
src/witmotion_ros.cpp
@@ -426,8 +426,8 @@ void ROSWitmotionSensorController::gps_process(const witmotion_datapacket &packe
426
msg.header.stamp = ros::Time::now();
427
msg.status.service = sensor_msgs::NavSatStatus::SERVICE_GPS;
428
msg.status.status = sensor_msgs::NavSatStatus::STATUS_FIX;
429
- msg.latitude = latitude_deg + (latitude_min / 60.f);
430
- msg.longitude = longitude_deg + (longitude_min / 60.f);
+ msg.latitude = std::floor(latitude_deg) + (latitude_min / 60.f);
+ msg.longitude = std::floor(longitude_deg) + (longitude_min / 60.f);
431
msg.altitude = have_ground_speed ? gps_altitude : NAN;
432
msg.position_covariance_type = have_accuracy ? sensor_msgs::NavSatFix::COVARIANCE_TYPE_DIAGONAL_KNOWN :
433
sensor_msgs::NavSatFix::COVARIANCE_TYPE_UNKNOWN;
0 commit comments