mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
AP_GPS: allow Replay to set last sample time
This commit is contained in:
parent
2f4f38b85f
commit
5ddb872b79
@ -492,7 +492,7 @@ AP_GPS::setHIL(uint8_t instance, GPS_Status _status, uint64_t time_epoch_ms,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set accuracy for HIL
|
// set accuracy for HIL
|
||||||
void AP_GPS::setHIL_Accuracy(uint8_t instance, float vdop, float hacc, float vacc, float sacc, bool _have_vertical_velocity)
|
void AP_GPS::setHIL_Accuracy(uint8_t instance, float vdop, float hacc, float vacc, float sacc, bool _have_vertical_velocity, uint32_t sample_ms)
|
||||||
{
|
{
|
||||||
GPS_State &istate = state[instance];
|
GPS_State &istate = state[instance];
|
||||||
istate.vdop = vdop * 100;
|
istate.vdop = vdop * 100;
|
||||||
@ -503,6 +503,10 @@ void AP_GPS::setHIL_Accuracy(uint8_t instance, float vdop, float hacc, float vac
|
|||||||
istate.have_vertical_accuracy = true;
|
istate.have_vertical_accuracy = true;
|
||||||
istate.have_speed_accuracy = true;
|
istate.have_speed_accuracy = true;
|
||||||
istate.have_vertical_velocity |= _have_vertical_velocity;
|
istate.have_vertical_velocity |= _have_vertical_velocity;
|
||||||
|
if (sample_ms != 0) {
|
||||||
|
timing[instance].last_message_time_ms = sample_ms;
|
||||||
|
timing[instance].last_fix_time_ms = sample_ms;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -314,7 +314,7 @@ public:
|
|||||||
uint16_t hdop);
|
uint16_t hdop);
|
||||||
|
|
||||||
// set accuracy for HIL
|
// set accuracy for HIL
|
||||||
void setHIL_Accuracy(uint8_t instance, float vdop, float hacc, float vacc, float sacc, bool _have_vertical_velocity);
|
void setHIL_Accuracy(uint8_t instance, float vdop, float hacc, float vacc, float sacc, bool _have_vertical_velocity, uint32_t sample_ms);
|
||||||
|
|
||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user