mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
Pass acc data in mG in SCALED_IMU to comply with mavlink standard
https://mavlink.io/en/messages/common.html#SCALED_IMU pyflix@0.13
This commit is contained in:
@@ -186,7 +186,8 @@ class Flix:
|
||||
self._trigger('motors', self.motors)
|
||||
|
||||
if isinstance(msg, mavlink.MAVLink_scaled_imu_message):
|
||||
self.acc = self._mavlink_to_flu([msg.xacc / 1000, msg.yacc / 1000, msg.zacc / 1000])
|
||||
ONE_G = 9.80665
|
||||
self.acc = self._mavlink_to_flu([msg.xacc * ONE_G / 1000, msg.yacc * ONE_G / 1000, msg.zacc * ONE_G / 1000])
|
||||
self.gyro = self._mavlink_to_flu([msg.xgyro / 1000, msg.ygyro / 1000, msg.zgyro / 1000])
|
||||
self._trigger('acc', self.acc)
|
||||
self._trigger('gyro', self.gyro)
|
||||
|
||||
Reference in New Issue
Block a user