Skip to content

Commit 904f5fe

Browse files
committed
SITL: make simulated SBP2 vastly more accurate
I have no idea if this is actually the sort of number which these devices will return. However, for the EKF to be happy with the GPS the reported speed accuracy must be much lower than the SBP2 driver reports when we give it these numbers. It might be that we are interpretting these fields incorrectly in the driver and that the simulator is, in fact, correct.
1 parent 5ea6633 commit 904f5fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/SITL/SIM_GPS_SBP2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ void GPS_SBP2::publish(const GPS_Data *d)
9292
velned.n = 1e3 * d->speedN;
9393
velned.e = 1e3 * d->speedE;
9494
velned.d = 1e3 * d->speedD;
95-
velned.h_accuracy = 5e3;
96-
velned.v_accuracy = 5e3;
95+
velned.h_accuracy = 1e3 * 0.5;
96+
velned.v_accuracy = 1e3 * 0.5;
9797
velned.n_sats = d->have_lock ? _sitl->gps_numsats[instance] : 3;
9898
velned.flags = 1;
9999
sbp_send_message(SBP_VEL_NED_MSGTYPE, 0x2222, sizeof(velned), (uint8_t*)&velned);

0 commit comments

Comments
 (0)