Skip to content

Commit

Permalink
attempt at fixing xvert
Browse files Browse the repository at this point in the history
disabling sensors from sih broke it. enabling via param also did not fix
everything (why?) therefore, switch in sih.cpp depending on vehicle
type. find better sol monday. rebase this away in the end at all costs.
  • Loading branch information
mbjd committed Jan 31, 2025
1 parent a2a6c35 commit 7202b97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ param set-default EKF2_FUSE_BETA 0 # side slip fusion is currently not supported
param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1
param set-default SENS_EN_MAGSIM 1
param set-default SENS_EN_ARSPDSIM 1

param set-default VT_B_TRANS_DUR 5
param set-default VT_ELEV_MC_LOCK 0
Expand Down
10 changes: 6 additions & 4 deletions src/modules/simulation/simulator_sih/sih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,12 @@ void Sih::sensor_step()
reconstruct_sensors_signals(now);

// if ((_vehicle == VehicleType::FW || _vehicle == VehicleType::TS || _vehicle == VehicleType::SVTOL)
// && now - _airspeed_time >= 50_ms) {
// _airspeed_time = now;
// send_airspeed(now);
// }
// ultra hack. for svtol, SensorAirspeedSim.cpp seems to work. for ts, not. why? find out monday.
if ((_vehicle == VehicleType::FW || _vehicle == VehicleType::TS)
&& now - _airspeed_time >= 50_ms) {
_airspeed_time = now;
send_airspeed(now);
}

// distance sensor published at 50 Hz
if (now - _dist_snsr_time >= 20_ms
Expand Down

0 comments on commit 7202b97

Please sign in to comment.