diff --git a/sw/airborne/subsystems/gps/gps_sim_nps.c b/sw/airborne/subsystems/gps/gps_sim_nps.c index 1e90f382dac..f503977b6ff 100644 --- a/sw/airborne/subsystems/gps/gps_sim_nps.c +++ b/sw/airborne/subsystems/gps/gps_sim_nps.c @@ -75,6 +75,12 @@ void gps_feed_value(void) #endif SetBit(gps_nps.valid_fields, GPS_VALID_COURSE_BIT); + gps_nps.pacc = 650; + gps_nps.hacc = 450; + gps_nps.vacc = 200; + gps_nps.sacc = 100; + gps_nps.pdop = 650; + if (gps_has_fix) { gps_nps.num_sv = 11; gps_nps.fix = GPS_FIX_3D; diff --git a/sw/simulator/nps/nps_fdm_jsbsim.cpp b/sw/simulator/nps/nps_fdm_jsbsim.cpp index 2760222c645..96a33a1a8d4 100644 --- a/sw/simulator/nps/nps_fdm_jsbsim.cpp +++ b/sw/simulator/nps/nps_fdm_jsbsim.cpp @@ -180,6 +180,10 @@ void nps_fdm_init(double dt) FDMExec->RunIC(); + // Fix getting initial incorrect accel measurements + for(uint16_t i = 0; i < 1500; i++) + FDMExec->Run(); + init_ltp(); #if DEBUG_NPS_JSBSIM @@ -679,7 +683,7 @@ static void init_ltp(void) /* Current date in decimal year, for example 2012.68 */ /** @FIXME properly get current time */ - double sdate = 2014.5; + double sdate = 2019.0; llh_from_jsbsim(&fdm.lla_pos, propagate); /* LLA Position in decimal degrees and altitude in km */