OpenIPC开源FPV之Ardupilot配置

1. 源由

为了将折腾2~3天OpenIPC摄像头Ardupilot配置问题整理下,给各位即将碰到,尚未碰到的朋友准备一份小礼品!

OpenIPC FPV摄像头是一个非常原型的开源数字FPV摄像头,有着非常弹性的功能扩展可能性。并且也希望大家能够轻松上手,少折腾,当然如果有机会,可以往产品化方向落地。

2. 问题

《OpenIPC开源IPC之固件sysupgrade升级》中,其实已经提到了为什么要升级固件,主要原因是怀疑兼容性问题。

==》其实,并不是兼容性问题,而是Ardupilot的配置问题。

3. 分析

vdec内部OSD状态变量主要来自MAVLink命令:

  • MAVLINK_MSG_ID_RAW_IMU
  • MAVLINK_MSG_ID_SYS_STATUS
  • MAVLINK_MSG_ID_BATTERY_STATUS
  • MAVLINK_MSG_ID_RC_CHANNELS_RAW
  • MAVLINK_MSG_ID_GPS_RAW_INT
  • MAVLINK_MSG_ID_VFR_HUD
  • MAVLINK_MSG_ID_GLOBAL_POSITION_INT
  • MAVLINK_MSG_ID_ATTITUDE

3.1 MAVLINK_MSG_ID_RAW_IMU

MAVLink传递结构体:

#define MAVLINK_MSG_ID_RAW_IMU 27

MAVPACKED(
typedef struct __mavlink_raw_imu_t {
 uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
 int16_t xacc; /*<  X acceleration (raw)*/
 int16_t yacc; /*<  Y acceleration (raw)*/
 int16_t zacc; /*<  Z acceleration (raw)*/
 int16_t xgyro; /*<  Angular speed around X axis (raw)*/
 int16_t ygyro; /*<  Angular speed around Y axis (raw)*/
 int16_t zgyro; /*<  Angular speed around Z axis (raw)*/
 int16_t xmag; /*<  X Magnetic field (raw)*/
 int16_t ymag; /*<  Y Magnetic field (raw)*/
 int16_t zmag; /*<  Z Magnetic field (raw)*/
 uint8_t id; /*<  Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)*/
 int16_t temperature; /*< [cdegC] Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C).*/
}) mavlink_raw_imu_t;

OSD全局变量:

telemetry_raw_imu = imu.temperature;

3.2 MAVLINK_MSG_ID_SYS_STATUS

MAVLink传递结构体:

#define MAVLINK_MSG_ID_SYS_STATUS 1

MAVPACKED(
typedef struct __mavlink_sys_status_t {
 uint32_t onboard_control_sensors_present; /*<  Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present.*/
 uint32_t onboard_control_sensors_enabled; /*<  Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled.*/
 uint32_t onboard_control_sensors_health; /*<  Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.*/
 uint16_t load; /*< [d%] Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000*/
 uint16_t voltage_battery; /*< [mV] Battery voltage, UINT16_MAX: Voltage not sent by autopilot*/
 int16_t current_battery; /*< [cA] Battery current, -1: Current not sent by autopilot*/
 uint16_t drop_rate_comm; /*< [c%] Communication drop rate, (UART, I2C, SPI, CAN), dropped pack
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值