From 82788b731c3f514017695f81d7c7de7668d60dc6 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 1 Nov 2015 17:27:08 +0100 Subject: [PATCH] Fix G constant, emit updates more regularly --- src/comm/QGCXPlaneLink.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/comm/QGCXPlaneLink.cc b/src/comm/QGCXPlaneLink.cc index d150bb539..93eb6755f 100644 --- a/src/comm/QGCXPlaneLink.cc +++ b/src/comm/QGCXPlaneLink.cc @@ -595,7 +595,7 @@ void QGCXPlaneLink::readBytes() if (fabsf(groundspeed)<0.1f && alt_agl<1.0) { // TODO: Add centrip. acceleration to the current static acceleration implementation. - Eigen::Vector3f g(0, 0, -9.81f); + Eigen::Vector3f g(0, 0, -9.80665f); Eigen::Matrix3f R = euler_to_wRo(yaw, pitch, roll); Eigen::Vector3f gr = R.transpose().eval() * g; @@ -617,6 +617,7 @@ void QGCXPlaneLink::readBytes() } fields_changed |= (1 << 0) | (1 << 1) | (1 << 2); + emitUpdate = true; } // atmospheric pressure aircraft for XPlane 9 and 10 else if (p.index == 6) @@ -644,6 +645,8 @@ void QGCXPlaneLink::readBytes() rollspeed = p.f[1]; yawspeed = p.f[2]; fields_changed |= (1 << 3) | (1 << 4) | (1 << 5); + + emitUpdate = true; } else if ((xPlaneVersion == 10 && p.index == 17) || (xPlaneVersion == 9 && p.index == 18)) { -- 2.22.0