mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:23:34 +08:00
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:
@@ -111,6 +111,7 @@ struct RawAirspeedData {
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct RawGPSData {
|
||||
int64_t timestamp;
|
||||
int32_t lat;
|
||||
int32_t lon;
|
||||
int32_t alt;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user