From 7aa5f9f6e1cdc2c4633f6de2f742fa9fe72859fc Mon Sep 17 00:00:00 2001 From: donghongyu Date: Tue, 27 Aug 2024 11:10:19 +0800 Subject: [PATCH] =?UTF-8?q?[Routing]=201=E3=80=81=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=9A=84pointType=20//20240523=EF=BC=8C=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=AD=A4=E7=82=B9=E6=98=AF=E4=B8=AD=E9=97=B4?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E8=BF=98=E6=98=AF=E9=80=94=E5=BE=84=E7=82=B9?= =?UTF-8?q?=20-------=20true=EF=BC=9A=E7=AB=99=E7=82=B9=EF=BC=8C=20false?= =?UTF-8?q?=EF=BC=9A=E7=AE=80=E5=8D=95=E7=9A=84=E9=80=94=E5=BE=84=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../och/unmanned/taxi/bean/TaxiRoutingBean.kt | 3 +- .../taxi/ui/routing/TaxiRoutingModel.kt | 40 +++++++++++++++++-- .../autopilot/AutopilotControlParameters.kt | 11 +++++ 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/bean/TaxiRoutingBean.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/bean/TaxiRoutingBean.kt index 5b3e655399..52e416ba14 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/bean/TaxiRoutingBean.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/bean/TaxiRoutingBean.kt @@ -26,7 +26,8 @@ data class RoutingSite( var gcjLat: Double,// 高德坐标 var gcjLon: Double,// 高德坐标 var wgs84Lon: Double,//高精坐标 - var wgs84Lat: Double//高精坐标 + var wgs84Lat: Double,//高精坐标 + var pointType: Int // 1:途径点 2:禁行点 3:站点 ) /** diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/routing/TaxiRoutingModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/routing/TaxiRoutingModel.kt index 6957b952c0..209ec11c6f 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/routing/TaxiRoutingModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/routing/TaxiRoutingModel.kt @@ -19,10 +19,10 @@ import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.eagle.core.utilcode.util.NetworkUtils import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager -import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager +import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager.writeChainLog @@ -592,7 +592,24 @@ object TaxiRoutingModel { wayLatLons.add( AutopilotControlParameters.AutoPilotLonLat( mogoLatLng.wgs84Lat, - mogoLatLng.wgs84Lon + mogoLatLng.wgs84Lon, + when (mogoLatLng.pointType) { + 1 -> {//途径点 + false + } + + 2 -> {//禁行点 + false + } + + 3 -> {//站点 + true + } + + else -> { + false + } + } ) ) } @@ -604,7 +621,24 @@ object TaxiRoutingModel { blackLatLons.add( AutopilotControlParameters.AutoPilotLonLat( mogoLatLng.wgs84Lat, - mogoLatLng.wgs84Lon + mogoLatLng.wgs84Lon, + when (mogoLatLng.pointType) { + 1 -> {//途径点 + false + } + + 2 -> {//禁行点 + false + } + + 3 -> {//站点 + true + } + + else -> { + false + } + } ) ) } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.kt index 7fcc66a5f9..6e65ee612a 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/autopilot/AutopilotControlParameters.kt @@ -61,6 +61,9 @@ fun AutopilotControlParameters.toRouteInfo(): MessagePad.RouteInfo { routeInfo.startLocation = startLoc.build() routeInfo.endLocation = endLoc.build() + //20240523 用于表示判断是否是站点下单。默认false:起点下单,接管下单; true: 中间站点下单 + //routeInfo.isStation = false + val line = MessagePad.Line.newBuilder() this.autoPilotLine?.let { line.lineId = it.lineId @@ -204,6 +207,7 @@ class AutopilotControlParameters { class AutoPilotLonLat { var lat = 0.0 var lon = 0.0 + var isStation = false //20240523, 判断此点是中间站点还是途径点 ------- true:站点, false:简单的途径点 constructor() {} constructor(lat: Double, lon: Double) { @@ -211,10 +215,17 @@ class AutopilotControlParameters { this.lon = lon } + constructor(lat: Double, lon: Double,isStation:Boolean) { + this.lat = lat + this.lon = lon + this.isStation = isStation + } + override fun toString(): String { return "AutoPilotLonLat{" + "lat=" + lat + ", lon=" + lon + + ", isStation=" + isStation + '}' } }