[6100][adas]数据上车L4场景NDE车龙数据接口,增加是否有车龙判断方法
This commit is contained in:
@@ -11,6 +11,22 @@ import perception.FusionTrafficLightOuterClass
|
||||
*/
|
||||
interface IMoGoAutopilotIdentifyListener {
|
||||
|
||||
/**
|
||||
* 判断是否有车龙
|
||||
*/
|
||||
fun isLongVehicleQueue(
|
||||
type: Int,
|
||||
polygon: List<MessagePad.Location>?
|
||||
): Boolean {
|
||||
// 检查 type 是否为 707 表示NED陈数据
|
||||
val isRoadCongested = type == 707
|
||||
// 检查 polygon 是否不为空且个数大于 1
|
||||
val hasEnoughPolygonPoints = (polygon?.size ?: 0) > 1
|
||||
// 同时满足两个条件
|
||||
return isRoadCongested && hasEnoughPolygonPoints
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 识别交通元素数据发生更新
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user