From 677705bbbfce8d264288896089707f4adb6d7ceb Mon Sep 17 00:00:00 2001 From: ly <1507474767@qq.com> Date: Wed, 20 Nov 2024 13:12:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .flutter-plugins-dependencies | 2 +- lib/appbar.dart | 17 ++++++--- lib/pages/real/real_controller.dart | 36 +++++++++++++++++-- .../connect/config/socket_setting.dart | 2 +- plugins/scence_map | 2 +- 5 files changed, 49 insertions(+), 10 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 528c83d..9673d08 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 17:48:28.803196","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-19 08:59:08.276343","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 da7b851..f87002f 100644 --- a/lib/appbar.dart +++ b/lib/appbar.dart @@ -113,12 +113,21 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { // Navigator.push(context, // MaterialPageRoute(builder: (context) => const ScenceMap())), }, - child: Row( + child: Stack( children: [ - Text( - text, - style: const TextStyle(fontSize: 12), + const SizedBox( + width: 20, ), + Positioned( + left: -20, + child: Column( + children: [ + Text(text) + // Text("${realcontroller.sa.value}"), + // const Text("/"), + // Text("${realcontroller.sv.value}"), + ], + )), Image( image: const AssetImage('images/satellite.png'), // width: 40, diff --git a/lib/pages/real/real_controller.dart b/lib/pages/real/real_controller.dart index 7267a45..c26b124 100644 --- a/lib/pages/real/real_controller.dart +++ b/lib/pages/real/real_controller.dart @@ -1,9 +1,11 @@ import 'dart:math'; +import 'dart:developer' as developer; import 'dart:typed_data'; import 'dart:ui'; import 'package:cpnav/pages/setting/child_pages/XyChange/xy_change.dart'; import 'package:get/get.dart'; import 'package:scence_map/controllers/controller.dart'; +import 'package:scence_map/record_entity.dart'; // import 'package:flutter_webrtc/flutter_webrtc.dart'; import '../../models/pilePoint/coord_trans.dart'; @@ -225,8 +227,34 @@ class RealController extends GetxController { Offset offset = Offset(xyh.X, xyh.Y); if ((mapController.centerXY - offset).distance > 40) { mapController.centerXY = offset; - mapController.updateCount++; } + RecordEntity record = RecordEntity( + tid: 0, + tpId: -1, + id: 0, + startTime: DateTime.now(), + endTime: DateTime.now(), + lat: process.lat, + lng: process.lng, + name: "实时", + times: 1, + x: xyh.X, + y: xyh.Y, + strongDrop: 0, + ); + if (mapController.recordList.isEmpty) { + mapController.recordList.add(record); + } else { + int index = mapController.recordList + .lastIndexWhere((element) => element.tpId == -1); + if (index == -1) { + mapController.recordList.add(record); + } else { + mapController.recordList[index] = record; + } + } + + mapController.updateCount++; var centerDev = mapController.deviceList[settingController.currentDevice.value?.tid]; if (centerDev != null) { @@ -234,16 +262,18 @@ class RealController extends GetxController { centerDev.update.value++; double pitchRad = pitch * pi / 180; - double headingRad = (270 - heading) * pi / 180; //(270-) - centerDev.rotation.value = headingRad; + double headingRad = (heading) * pi / 180; //(270-) + centerDev.rotation.value = (heading + 90) * pi / 180; // 计算水平投影距离 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; + developer.log("carX:$carX,carY:$carY"); } } } diff --git a/lib/pages/setting/child_pages/connect/config/socket_setting.dart b/lib/pages/setting/child_pages/connect/config/socket_setting.dart index 69ffcbd..6fd88d4 100644 --- a/lib/pages/setting/child_pages/connect/config/socket_setting.dart +++ b/lib/pages/setting/child_pages/connect/config/socket_setting.dart @@ -8,7 +8,7 @@ import '../bluetooth_page.dart'; class SocketSetting { int port = 6060; - String ip = "192.168.1.206"; + String ip = "192.168.1.183"; bool isConnected = false; int times = 0; Socket? socket; diff --git a/plugins/scence_map b/plugins/scence_map index 2832f03..887a9ee 160000 --- a/plugins/scence_map +++ b/plugins/scence_map @@ -1 +1 @@ -Subproject commit 2832f031e1f01b2a0b1f285bc44d80121ecbddb6 +Subproject commit 887a9eeaf57b8c757df93ed09cb2ce65999057ea