This commit is contained in:
zhongchao
2022-03-15 12:22:34 +08:00
1568 changed files with 13876 additions and 72455 deletions

View File

@@ -1,28 +0,0 @@
package com.mogo.eagle.core.data.autopilot;
/**
* @author congtaowang
* @since 2020/10/22
*
* 域控制器 控制指令发送
*
*/
public class AutopilotControlCmdParameter {
public String action;
public Object result;
public AutopilotControlCmdParameter(String action, Object result) {
this.action = action;
this.result = result;
}
@Override
public String toString() {
return "AutoPilotControlCmdParameter{" +
"action='" + action + '\'' +
", result=" + result +
'}';
}
}

View File

@@ -1,79 +0,0 @@
package com.mogo.eagle.core.data.autopilot;
import java.util.List;
/**
* @author donghongyu
* @since 2021/09/22
* <p>
* 启动自动驾驶参数
* <p>
* {
* "action": "aiCloudToStartAutopilot",
* "result": {
* "endLatLon": {
* "lat": 40.2023065,
* "lon": 116.7328583
* },
* "isSpeakVoice": false,
* "speedLimit": 0.0,
* "startLatLon": {
* "lat": 40.20070823669507,
* "lon": 116.73264342448671
* },
* "startName": "HYKXC",
* "endName": "HYJC",
* "vehicleType": 10,
* "wayLatLons": null
* }
* }
*/
public class AutopilotControlParameters {
public String startName="";
public String endName="";
public AutoPilotLonLat startLatLon;
public List<AutoPilotLonLat> wayLatLons;
public AutoPilotLonLat endLatLon;
public float speedLimit;
public int vehicleType;// 运营类型
/**
* 是否播放adas的 开始自动驾驶 语音
*/
public boolean isSpeakVoice = true;
public static class AutoPilotLonLat {
public double lat;
public double lon;
public AutoPilotLonLat() {
}
public AutoPilotLonLat(double lat, double lon) {
this.lat = lat;
this.lon = lon;
}
@Override
public String toString() {
return "AutoPilotLonLat{" +
"lat=" + lat +
", lon=" + lon +
'}';
}
}
@Override
public String toString() {
return "AutopilotControlParameters{" +
"startName='" + startName + '\'' +
", endName='" + endName + '\'' +
", startLatLon=" + startLatLon +
", wayLatLons=" + wayLatLons +
", endLatLon=" + endLatLon +
", speedLimit=" + speedLimit +
", vehicleType=" + vehicleType +
", isSpeakVoice=" + isSpeakVoice +
'}';
}
}

View File

@@ -0,0 +1,116 @@
package com.mogo.eagle.core.data.autopilot
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLonLat
import mogo.telematics.pad.MessagePad
/**
* @author donghongyu
* @since 2021/09/22
*
*
* 启动自动驾驶参数
*
*
* {
* "action": "aiCloudToStartAutopilot",
* "result": {
* "endLatLon": {
* "lat": 40.2023065,
* "lon": 116.7328583
* },
* "isSpeakVoice": false,
* "speedLimit": 0.0,
* "startLatLon": {
* "lat": 40.20070823669507,
* "lon": 116.73264342448671
* },
* "startName": "HYKXC",
* "endName": "HYJC",
* "vehicleType": 10,
* "wayLatLons": null
* }
* }
*/
fun AutopilotControlParameters.toRouteInfo(): MessagePad.RouteInfo{
val routeInfo = MessagePad.RouteInfo.newBuilder()
val startLoc = routeInfo.startLocationBuilder
val endLoc = routeInfo.endLocationBuilder
this.startLatLon?.let {
startLoc.latitude = it.lat
startLoc.longitude = it.lon
}
this.endLatLon?.let {
endLoc.latitude = it.lat
endLoc.longitude = it.lon
}
this.wayLatLons?.forEach {
val locBuilder = MessagePad.Location.newBuilder()
locBuilder.latitude = it.lat
locBuilder.longitude = it.lon
routeInfo.addWayPoints(locBuilder.build())
}
routeInfo.startName = this.startName
routeInfo.endName = this.endName
routeInfo.vehicleType = this.vehicleType
routeInfo.isSpeakVoice = this.isSpeakVoice
routeInfo.speedLimit = this.speedLimit.toDouble()
routeInfo.startLocation = startLoc.build()
routeInfo.endLocation = endLoc.build()
return routeInfo.build()
}
class AutopilotControlParameters {
@JvmField
var startName = ""
@JvmField
var endName = ""
@JvmField
var startLatLon: AutoPilotLonLat? = null
@JvmField
var wayLatLons: List<AutoPilotLonLat>? = null
@JvmField
var endLatLon: AutoPilotLonLat? = null
var speedLimit = 0f
@JvmField
var vehicleType // 运营类型
= 0
/**
* 是否播放adas的 开始自动驾驶 语音
*/
@JvmField
var isSpeakVoice = true
class AutoPilotLonLat {
var lat = 0.0
var lon = 0.0
constructor() {}
constructor(lat: Double, lon: Double) {
this.lat = lat
this.lon = lon
}
override fun toString(): String {
return "AutoPilotLonLat{" +
"lat=" + lat +
", lon=" + lon +
'}'
}
}
override fun toString(): String {
return "AutopilotControlParameters{" +
"startName='" + startName + '\'' +
", endName='" + endName + '\'' +
", startLatLon=" + startLatLon +
", wayLatLons=" + wayLatLons +
", endLatLon=" + endLatLon +
", speedLimit=" + speedLimit +
", vehicleType=" + vehicleType +
", isSpeakVoice=" + isSpeakVoice +
'}'
}
}

View File

@@ -64,9 +64,5 @@ class AutopilotStatusInfo : Serializable {
*/
var pilotmode = 0
/**
* 底盘的自动驾驶状态 0非自动驾驶1自动驾驶
*/
var control_pilotmode = 0
}

View File

@@ -1,4 +1,4 @@
package com.mogo.eagle.core.data.deva.chain
package com.mogo.eagle.core.data.chain
class ChainConstant {
@@ -13,11 +13,7 @@ class ChainConstant {
const val CHAIN_LINK_LOG_ADAS_INIT = "-adasInitStatus"
const val CHAIN_LINK_LOG_ADAS_MSG = "-adasWsMsg"
const val CHAIN_ALIAS_CODE_UDP_INIT = "PAD_ADAS_UDP_INIT"
const val CHAIN_ALIAS_CODE_UDP_CONNECT_ADDRESS = "PAD_ADAS_UDP_CONNECT_ADDRESS"
const val CHAIN_ALIAS_CODE_WEB_SOCKET_OPEN = "PAD_ADAS_WEB_SOCKET_OPEN"
const val CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_JSON = "PAD_ADAS_WEB_SOCKET_MESSAGE_JSON"
const val CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_BYTE = "PAD_ADAS_WEB_SOCKET_MESSAGE_BYTE"
const val CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA = "PAD_ADAS_MESSAGE_AUTOPILOT_RECT_DATA"
const val CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE = "PAD_ADAS_MESSAGE_AUTOPILOT_CAR_STATE"
const val CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS = "PAD_ADAS_MESSAGE_AUTOPILOT_STATUS"

View File

@@ -1,4 +1,4 @@
package com.mogo.eagle.core.data.deva.chain
package com.mogo.eagle.core.data.chain
class ChainLogParam {

View File

@@ -1,23 +0,0 @@
package com.mogo.eagle.core.data.deva.scene
class SceneConstant {
companion object {
//lib包
const val M_ADAS = "lib-mogo-adas_"
//核心module
const val M_NETWORK = "core-network_"
//core业务module
const val M_DEVA = "core-impl-deva_"
const val M_OBU = "core-impl-obu_"
const val M_DISPATCH = "core-impl-dispatch_"
const val M_V2X = "core-impl-v2x_"
const val M_HMI = "core-impl-hmi_"
//旧module
const val M_ROUTE = "old-module-service_"
const val M_OTHER = "all-modules_"
}
}

View File

@@ -1,15 +0,0 @@
package com.mogo.eagle.core.data.deva.scene
class SceneLogCache {
var tagMap:MutableMap<String,Boolean>? = null
var logger:Boolean = true
constructor(tagMap: MutableMap<String, Boolean>?, logger: Boolean) {
this.tagMap = tagMap
this.logger = logger
}
}

View File

@@ -1,5 +1,7 @@
package com.mogo.eagle.core.data.trafficlight
import mogo.telematics.pad.MessagePad
fun TrafficLightResult.currentRoadTrafficLight(): TrafficLightStatus? {
return TrafficLightStatusHelper.getCurrentRoadTrafficLight(this)
}
@@ -8,6 +10,23 @@ fun TrafficLightResult.currentRoadIsRight():Boolean{
return TrafficLightStatusHelper.currentRoadIsRight(this)
}
fun TrafficLightResult.toTrafficLightDetail():MessagePad.TrafficLightDetail{
val trafficLightBuilder = MessagePad.TrafficLightDetail.newBuilder()
val left = trafficLightBuilder.leftBuilder
val mid = trafficLightBuilder.midBuilder
val right = trafficLightBuilder.rightBuilder
left.phaseNo = this.laneList.left.phaseNo
left.color = this.laneList.left.color
left.remain = this.laneList.left.remain
mid.phaseNo = this.laneList.mid.phaseNo
mid.color = this.laneList.mid.color
mid.remain = this.laneList.mid.remain
right.phaseNo = this.laneList.right.phaseNo
right.color = this.laneList.right.color
right.remain = this.laneList.right.remain
return trafficLightBuilder.build()
}
/**
* 路口红绿灯请求返回数据
*/