diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 0d2f5a2..528c83d 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"permission_handler_apple","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_apple-9.4.5\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.2.12\\\\","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_android-12.0.13\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]},{"name":"permission_handler_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_windows-0.2.1\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","dependencies":[]},{"name":"permission_handler_html","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_html-0.1.3+2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_webrtc","dependencies":["path_provider"]},{"name":"libserialport","dependencies":[]},{"name":"open_settings","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":["permission_handler_android","permission_handler_apple","permission_handler_html","permission_handler_windows"]},{"name":"permission_handler_android","dependencies":[]},{"name":"permission_handler_apple","dependencies":[]},{"name":"permission_handler_html","dependencies":[]},{"name":"permission_handler_windows","dependencies":[]},{"name":"quick_blue","dependencies":[]},{"name":"wifi_iot","dependencies":[]},{"name":"wifi_scan","dependencies":[]}],"date_created":"2024-11-18 14:28:15.963593","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"permission_handler_apple","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_apple-9.4.5\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.2.12\\\\","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_android-12.0.13\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]},{"name":"permission_handler_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_windows-0.2.1\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\ly\\\\dart\\\\A\\\\new\\\\hy_tamping\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-11.1.1\\\\","dependencies":[]},{"name":"permission_handler_html","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler_html-0.1.3+2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_webrtc","dependencies":["path_provider"]},{"name":"libserialport","dependencies":[]},{"name":"open_settings","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":["permission_handler_android","permission_handler_apple","permission_handler_html","permission_handler_windows"]},{"name":"permission_handler_android","dependencies":[]},{"name":"permission_handler_apple","dependencies":[]},{"name":"permission_handler_html","dependencies":[]},{"name":"permission_handler_windows","dependencies":[]},{"name":"quick_blue","dependencies":[]},{"name":"wifi_iot","dependencies":[]},{"name":"wifi_scan","dependencies":[]}],"date_created":"2024-11-18 17:48:28.803196","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/lib/appbar.dart b/lib/appbar.dart index b7d1292..da7b851 100644 --- a/lib/appbar.dart +++ b/lib/appbar.dart @@ -91,20 +91,44 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { width: 10, ), Obx( - () => InkWell( - onTap: () { - // Navigator.push(context, - // MaterialPageRoute(builder: (context) => const ScenceMap())), - }, - child: Image( - image: const AssetImage('images/satellite.png'), - // width: 40, - color: appcontroller.isDarkMode.value - ? Colors.white70 - : const Color.fromARGB(200, 29, 28, 28), - height: 40, - ), - ), + () { + Color color = appcontroller.isDarkMode.value + ? Colors.white70 + : const Color.fromARGB(200, 29, 28, 28); + int status = realcontroller.status.value; + if (status == 4) { + color = Colors.green; + } else if (status == 1) { + color = Colors.red; + } else { + if (status != 0) { + color = Colors.blue; + } + } + String text = ""; + text = "${realcontroller.sa.value}/${realcontroller.sv.value}"; + + return InkWell( + onTap: () { + // Navigator.push(context, + // MaterialPageRoute(builder: (context) => const ScenceMap())), + }, + child: Row( + children: [ + Text( + text, + style: const TextStyle(fontSize: 12), + ), + Image( + image: const AssetImage('images/satellite.png'), + // width: 40, + color: color, + height: 40, + ) + ], + ), + ); + }, ), const SizedBox( width: 10, diff --git a/lib/pages/real/process.dart b/lib/pages/real/process.dart index ed939d9..6664fa3 100644 --- a/lib/pages/real/process.dart +++ b/lib/pages/real/process.dart @@ -114,8 +114,8 @@ class ProcessEntity { } - factory ProcessEntity.fromString(String str) { - List list = str.split(","); + factory ProcessEntity.fromList(List list) { + return ProcessEntity( utc:int.parse( list[2]), lat: double.parse(list[3]), diff --git a/lib/pages/real/real_controller.dart b/lib/pages/real/real_controller.dart index 586763d..7267a45 100644 --- a/lib/pages/real/real_controller.dart +++ b/lib/pages/real/real_controller.dart @@ -1,3 +1,4 @@ +import 'dart:math'; import 'dart:typed_data'; import 'dart:ui'; import 'package:cpnav/pages/setting/child_pages/XyChange/xy_change.dart'; @@ -178,6 +179,9 @@ class RealController extends GetxController { impact_force: []).obs; var dataCount = 0.obs; CoordTrans? coordTrans; + var status = 0.obs; + var sa = 0.obs; + var sv = 0.obs; reset() { sightOffset1.value = const Offset(3, 3); sightOffsetInit1.value = const Offset(0, 0); @@ -190,9 +194,23 @@ class RealController extends GetxController { var isDataVisible = false.obs; onBleData(Uint8List data) { String str = String.fromCharCodes(data); - - ProcessEntity process = ProcessEntity.fromString(str); - processdata.value = process; + String first = str.split("#POSA")[1]; + List list = first.split(","); + double baseLine = double.parse(list[7]); + double heading = double.parse(list[8]); + double pitch = double.parse(list[9]); + status.value = int.parse(list[1]); + sa.value = int.parse(list[10]); + List svStr = list[11].trim().split(" "); + sv.value = int.parse(svStr[0]); + ProcessEntity process = ProcessEntity.fromList(list); + processdata.update((value) { + // value.speed = process.speed; + value?.lat = process.lat; + value?.lng = process.lng; + value?.alt = process.height; + value?.utc = process.utc; + }); dataCount.value++; CoorTransModel trans = xyChangeController.coorTrans.value; coordTrans ??= CoordTrans(TransOptions( @@ -213,9 +231,19 @@ class RealController extends GetxController { mapController.deviceList[settingController.currentDevice.value?.tid]; if (centerDev != null) { // log("center${xyh.X},${xyh.Y}"); - centerDev.x.value = xyh.X; - centerDev.y.value = xyh.Y; + centerDev.update.value++; + double pitchRad = pitch * pi / 180; + double headingRad = (270 - heading) * pi / 180; //(270-) + centerDev.rotation.value = headingRad; + // 计算水平投影距离 + double dXY = baseLine * cos(pitchRad); + + // 计算副天线的坐标 + double carX = xyh.X + dXY * cos(headingRad); + double carY = xyh.Y + dXY * sin(headingRad); + centerDev.x.value = carX; + centerDev.y.value = carY; } } }