Skip to content

Commit 28172ad

Browse files
authored
Update qmekf_sim.cpp
1 parent f6993bd commit 28172ad

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

bbn_wave_freq_m5atomS3/data-sim/qmekf_sim.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,18 @@ void process_wave_file(const std::string &filename, float dt, bool with_mag) {
9898
else
9999
mekf.measurement_update_acc_only(acc_f);
100100

101-
// Filter quaternion → Euler (nautical deg) for output
102101
auto coeffs = mekf.quaternion(); // [x,y,z,w]
103102
Quaternionf q(coeffs(3), coeffs(0), coeffs(1), coeffs(2));
104-
float r_est, p_est, y_est;
105-
quat_to_euler_nautical(q, r_est, p_est, y_est);
106103

104+
float r_est_a, p_est_a, y_est_a;
105+
quat_to_euler_aero(q, r_est_a, p_est_a, y_est_a);
106+
107+
// Convert aerospace → nautical (ENU / Z-up)
108+
float r_est = r_est_a;
109+
float p_est = p_est_a;
110+
float y_est = y_est_a;
111+
aero_to_nautical(r_est, p_est, y_est);
112+
107113
rows.push_back({
108114
rec.time,
109115
r_ref_n, p_ref_n, y_ref_n, // ref (nautical)

0 commit comments

Comments
 (0)