From d1717d87a01f8debec2d6267982f889037a8bd57 Mon Sep 17 00:00:00 2001 From: air <30444667+sszdot@users.noreply.github.com> Date: Fri, 20 Jun 2025 12:09:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afeat=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E9=A3=9E=E6=8E=A7=E9=80=9A=E8=BF=87=E4=B8=B2=E5=8F=A3?= =?UTF-8?q?=20=E5=8F=91=E9=80=81ADSB=E6=95=B0=E6=8D=AE=20=E5=88=B0MQTT?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B?= =?UTF-8?q?=E3=80=91=EF=BC=9A=20=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91?= =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- src/commser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commser.cpp b/src/commser.cpp index 9075476..378a40f 100644 --- a/src/commser.cpp +++ b/src/commser.cpp @@ -804,8 +804,8 @@ void mavlink_receiveCallback(uint8_t c) uint32_t icao = adsb.ICAO_address; float lat = adsb.lat / 1e7; float lon = adsb.lon / 1e7; - int alt = adsb.altitude; - float heading = adsb.heading / 10.0f; + int alt = adsb.altitude / 1000; // 转成米 + float heading = adsb.heading / 100.0f; // 转成度 // 构建 JSON 字符串 char jsonString[256];