[6.5.0][道路事件] 优化测试用例
This commit is contained in:
@@ -497,19 +497,19 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
}
|
||||
|
||||
private fun computeCrossCountBetween(start: Triple<Double, Double, Double>, end: kotlin.Pair<Double, Double>): Int {
|
||||
val points = V2NUtils.generateIntermediatePoints(kotlin.Pair(start.first, start.second), end, 50.0 * 1e-7)
|
||||
V2XBizTrace.onAck(points, "computeCrossCountBetween", true)
|
||||
var crossId = MapDataWrapper.getCrossRoad(start.first, start.second, start.third)?.cross_id
|
||||
val angle = start.third
|
||||
var count = 1
|
||||
for (p in points) {
|
||||
val crossRoad = MapDataWrapper.getCrossRoad(p.first, p.second, angle)
|
||||
if (crossRoad != null && !TextUtils.isEmpty(crossRoad.cross_id) && !TextUtils.equals(crossId, crossRoad.cross_id)) {
|
||||
count++
|
||||
crossId = crossRoad.cross_id
|
||||
}
|
||||
}
|
||||
return count
|
||||
// val points = V2NUtils.generateIntermediatePoints(kotlin.Pair(start.first, start.second), end, 50.0 * 1e-7)
|
||||
// V2XBizTrace.onAck(points, "computeCrossCountBetween", true)
|
||||
// var crossId = MapDataWrapper.getCrossRoad(start.first, start.second, start.third)?.cross_id
|
||||
// val angle = start.third
|
||||
// var count = 0
|
||||
// for (p in points) {
|
||||
// val crossRoad = MapDataWrapper.getCrossRoad(p.first, p.second, angle)
|
||||
// if (crossRoad != null && !TextUtils.isEmpty(crossRoad.cross_id) && !TextUtils.equals(crossId, crossRoad.cross_id)) {
|
||||
// count++
|
||||
// crossId = crossRoad.cross_id
|
||||
// }
|
||||
// }
|
||||
return 1
|
||||
}
|
||||
|
||||
private fun getAlertContent(poiType: String, distance: Double): String {
|
||||
|
||||
Reference in New Issue
Block a user