增加测试广播中对他车位置修改
This commit is contained in:
@@ -12,6 +12,7 @@ import com.zhidao.support.obu.model.advance.MovingObjectInfo
|
||||
import com.zhidao.support.obu.model.advance.Position
|
||||
import com.zhidao.support.obu.model.advance.V2vThreat
|
||||
import com.zhidao.support.obu.model.advance.V2vThreatExt
|
||||
import kotlin.random.Random
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -62,9 +63,20 @@ class ObuTestTriggerReceiver : BroadcastReceiver() {
|
||||
cvxV2vThreatIndInfo.status = obuStatus
|
||||
cvxV2vThreatIndInfo.vehicle_id = "123321"
|
||||
|
||||
|
||||
// 设置位置
|
||||
val position = Position(0, 399739429, 1164115207, 20)
|
||||
val movingObjectInfo = MovingObjectInfo(0, position, 1800, 60)
|
||||
val randomLocation = Random.nextInt(100, 2000)
|
||||
|
||||
val position = Position(
|
||||
0, (399739429 + randomLocation).toLong(),
|
||||
(1164115207 + randomLocation).toLong(), 20
|
||||
)
|
||||
val movingObjectInfo = MovingObjectInfo(
|
||||
0,
|
||||
position,
|
||||
1800 +randomLocation,
|
||||
6000 +randomLocation
|
||||
)
|
||||
cvxV2vThreatIndInfo.basic_info = movingObjectInfo
|
||||
|
||||
MogoPrivateObuManager.INSTANCE.getMogoObuListener()
|
||||
|
||||
Reference in New Issue
Block a user