2 * This file is part of INAV Project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
27 typedef struct __attribute__((packed
)) {
28 uint8_t quality
; // [0;255]
31 } mspSensorOpflowDataMessage_t
;
33 typedef struct __attribute__((packed
)) {
34 uint8_t quality
; // [0;255]
35 int32_t distanceMm
; // Negative value for out of range
36 } mspSensorRangefinderDataMessage_t
;
38 typedef struct __attribute__((packed
)) {
39 uint8_t instance
; // sensor instance number to support multi-sensor setups
40 uint16_t gpsWeek
; // GPS week, 0xFFFF if not available
43 uint8_t satellitesInView
;
44 uint16_t horizontalPosAccuracy
; // [cm]
45 uint16_t verticalPosAccuracy
; // [cm]
46 uint16_t horizontalVelAccuracy
; // [cm/s]
50 int32_t mslAltitude
; // cm
51 int32_t nedVelNorth
; // cm/s
54 uint16_t groundCourse
; // deg * 100, 0..36000
55 uint16_t trueYaw
; // deg * 100, values of 0..36000 are valid. 65535 = no data available
62 } mspSensorGpsDataMessage_t
;
64 typedef struct __attribute__((packed
)) {
68 int16_t temp
; // centi-degrees C
69 } mspSensorBaroDataMessage_t
;
71 typedef struct __attribute__((packed
)) {
75 int16_t temp
; // centi-degrees C
76 } mspSensorAirspeedDataMessage_t
;
78 typedef struct __attribute__((packed
)) {
81 int16_t magX
; // mGauss, front
82 int16_t magY
; // mGauss, right
83 int16_t magZ
; // mGauss, down
84 } mspSensorCompassDataMessage_t
;