Description
pose_cov_msg.pose .pose = pose_msg.pose ;
pose_cov_msg.header = pose_msg.header ;
pose_cov_msg.pose .covariance [0 ] = 0.01 ;
pose_cov_msg.pose .covariance [7 ] = 0.01 ;
pose_cov_msg.pose .covariance [14 ] = 0.01 ;
pose_cov_msg.pose .covariance [21 ] = 0.01 ;
pose_cov_msg.pose .covariance [28 ] = 0.01 ;
pose_cov_msg.pose .covariance [35 ] = 0.01 ;
// covariance matrix
double h_covariance = pow (latlonmsg->h_accuracy * 1e-3 , 2 ); // Convert mm to m and take the ^2 for going from std to cov
double v_covariance = pow (latlonmsg->v_accuracy * 1e-3 , 2 ); // Convert mm to m and take the ^2 for going from std to cov
navsatfix_msg.position_covariance [0 ] = h_covariance; // x = 0, 0
navsatfix_msg.position_covariance [4 ] = h_covariance; // y = 1, 1
navsatfix_msg.position_covariance [8 ] = v_covariance; // z = 2, 2
navsatfix_msg.position_covariance_type = sensor_msgs::msg::NavSatFix::COVARIANCE_TYPE_DIAGONAL_KNOWN ;
Reactions are currently unavailable
You can’t perform that action at this time.
duro_gps_driver/src/duro_node.cpp
Lines 309 to 316 in 517aa60
duro_gps_driver/src/duro_node.cpp
Lines 194 to 200 in 517aa60