GPS simulation: Manage delays correctly

The GPS simulation now mimicks the real driver more closely and should provide even GPS delays. The delays themselves are set by the simulator, and default to 120 ms for Gazebo
This commit is contained in:
Lorenz Meier
2017-08-02 12:18:48 +02:00
parent 7d46858ae4
commit 9d49690f17
4 changed files with 33 additions and 18 deletions

View File

@@ -261,6 +261,7 @@ void Simulator::update_sensors(mavlink_hil_sensor_t *imu)
void Simulator::update_gps(mavlink_hil_gps_t *gps_sim)
{
RawGPSData gps = {};
gps.timestamp = gps_sim->time_usec;
gps.lat = gps_sim->lat;
gps.lon = gps_sim->lon;
gps.alt = gps_sim->alt;