完成点 初始
This commit is contained in:
@@ -555,8 +555,6 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
|
||||
'outer':
|
||||
// 核心修改:根据机器人模式选择不同的坐标源
|
||||
(_currentRobotMode == RobotMode.robot ? _robotModeWgsPoints : gcjOuterPoints).map((point) {
|
||||
// Robot模式:_robotModeWgsPoints本身就是WGS84坐标,无需转换
|
||||
// Point模式:gcjOuterPoints是GCJ02坐标,需要转换为WGS84
|
||||
final wgs84 = _currentRobotMode == RobotMode.robot
|
||||
? point // Robot模式直接使用原始WGS84坐标
|
||||
: gcj02ToWgs84(point.latitude, point.longitude); // Point模式转换
|
||||
@@ -2025,9 +2023,14 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
|
||||
final devicesState = context.watch<DevicesCubit>().state;
|
||||
// 2. 读取 isFinishWork 数据(修正拼写,设置默认值)
|
||||
bool isFinishWork = devicesState.isFinshWork ?? false;
|
||||
// 初始化默认值
|
||||
String yaw = '--';
|
||||
String satelliteCnt = '--';
|
||||
double? arriLatitude = devicesState.arriLatitude;
|
||||
double? arriLongitude = devicesState.arriLongitude;
|
||||
LatLng? targetLatLng;
|
||||
if (arriLatitude != null && arriLongitude != null) {
|
||||
targetLatLng = LatLng(arriLatitude, arriLongitude);
|
||||
_traceManager.upsert(targetLatLng, TPAction.ADD);
|
||||
}
|
||||
|
||||
double currentLat = 0.0;
|
||||
double currentLng = 0.0;
|
||||
bool obfFlag = false; //障碍物标志位
|
||||
@@ -2052,8 +2055,8 @@ class _MapPageEnterpriseState extends State<MapPageEnterprise> {
|
||||
//debugPrint("路径规划四十数据 - 经纬度:");
|
||||
//debugPrint(" RunningStatus纬度:${updatedState.status.latitude}");
|
||||
//debugPrint(" RunningStatus经度:${updatedState.status.longitude}");
|
||||
//debugPrint("${updatedState.status.obstacleFlag},${updatedState.status.qual},${updatedState.status.controlMode}");
|
||||
//debugPrint("${updatedState.status.headingStatus},${updatedState.status.yaw}");
|
||||
// debugPrint("障碍物${updatedState.status.obstacleFlag}");
|
||||
// debugPrint("初始化${updatedState.status.headingStatus}");
|
||||
|
||||
// 提取经纬度并更新本地变量
|
||||
currentLat = updatedState.status.latitude;
|
||||
|
||||
Reference in New Issue
Block a user