简体   繁体   English

静脉,o​​mnet ++和相扑中车辆状态的速度和位置不一致

[英]speed and position of vehicular status are not consistent reasonably in Veins,omnet++ and sumo

Used: Omnet++4.6, Sumo0.21.0 and Veins-3.0 二手:Omnet ++ 4.6,Sumo0.21.0和Veins-3.0
I tried to track a vehicle using RSU when a vehicle continuously send a beacon(WSM) contained Vx(velocity to x-axis),Vy(velocity to y-axis),position,speed in every second .I used open-street-map for this scenario. 我尝试使用RSU跟踪车辆当车辆连续地发送的信标(WSM)中含有Vx的(速度为x轴),VY(速度为y轴),位置,速度在每秒 .I使用开放式街景映射此方案。 After recorded beacon message(WSM) trough RSU,I found followings: 通过RSU记录信标消息(WSM)后,我发现以下内容:

t0=0.839078378444 id=0 x0=299.711 Vx0=-0.0273485 y0=542.695 Vy0=-1.58621 AngleRed0=1.58804 Speed=1.58645 t0 = 0.839078378444 id = 0 x0 = 299.711 Vx0 = -0.0273485 y0 = 542.695 Vy0 = -1.58621 AngleRed0 = 1.58804 Speed = 1.58645
t1=1.839078378444 id=0 x1=299.665 Vx1=-0.0607238 y2=540.03 Vy2=-3.52198 AngleRed1=1.58804 Speed=3.5225 t1 = 1.839078378444 id = 0 x1 = 299.665 Vx1 = -0.0607238 y2 = 540.03 Vy2 = -3.52198 AngleRed1 = 1.58804 Speed = 3.5225

I used following code to set the properties in WSM in vehicle node which has been retrieved from RSU's onBeacon method: 我使用以下代码在车辆节点中的WSM中设置属性,该属性已从RSU的onBeacon方法检索:
wsm->setSpeed(traci->getSpeed()); wsm-> setSpeed(traci-> getSpeed());
wsm->setAngleRad(traci->getAngleRad()); wsm-> setAngleRad(traci-> getAngleRad());
wsm->setvecX(traci->getCurrentSpeed().x); wsm-> setvecX(traci-> getCurrentSpeed()。x);
wsm->setvecY(traci->getCurrentSpeed().y); wsm-> setvecY(traci-> getCurrentSpeed()。y);
wsm->setSenderPos(traci->getCurrentPosition()); wsm-> setSenderPos(traci-> getCurrentPosition());
wsm->setCarId(getParentModule()->getIndex()); wsm-> setCarId(getParentModule()-> getIndex());

Now Calculation to check Vx and Vy are consistent: 现在检查Vx和Vy的计算是否一致:
At time t1 = 1.839078378444,(x1,y1) = (299.711,542.695),(x2,y2)=(299.665,540.03) 在时间t1 = 1.839078378444,(x1,y1)=(299.711,542.695),(x2,y2)=(299.665,540.03)
d=√(-0.046)²+(-2.665)² = 2.665396 So,1.588 = 91.032ᶿ, Cos(91.032)= -0.018008156, Speed=2.665396/1,Vx=Speed*Cosᶿ,Vx = 2.665396*Cos91.032=2.665396*(-0.018008156)= -0.0479 is not consistent with Vx0(-0.0273485) d =√(-0.046)²+(-2.665)²= 2.665396 So,1.588 =91.032ᶿ,Cos(91.032)= -0.018008156,Speed = 2.665396 / 1,Vx = Speed *Cosᶿ,Vx = 2.665396 * Cos91.032 = 2.665396 *( - 0.018008156)= -0.0479 与VX0 一致 (-0.0273485)
Vy= 2.66496 is not consistent with Vy0(-1.58621) and same for the others records. Vy = 2.66496与Vy0(-1.58621) 不一致 ,其他记录也相同。 Therefor, d/t=speed=2.665396 is not consistent with speed=3.5225. 为此,d / t为速度= 2.665396 与速度= 3.5225 是一致的 Any advise or solution or clarify the concept? 有什么建议或解决方案或澄清概念吗?

Your car seems to be speeding up. 您的汽车似乎正在加速。

If I understood you right, at the two time instants you measured, SUMO reports the car's speed first as 1.6 m/s, one second later as 3.5 m/s. 如果我理解正确,那么在您测量的两个瞬间,SUMO会首先报告汽车的速度为1.6 m / s,一秒后报告为3.5 m / s。

In my view, the distance you calculated (2.67 m) is reasonable. 我认为,您计算出的距离(2.67 m)是合理的。 You would expect your car to travel somewhere in-between 1.6 m and 3.5 m, which it does. 您可能希望您的汽车能够行驶在1.6 m至3.5 m之间的某个位置。

Note that, when you calculated the speed, you flipped the sign in y direction: remember that OMNeT++ uses a coordinate system where (0,0) is the top left. 请注意,在计算速度时,您将符号沿y方向翻转:请记住,OMNeT ++使用的坐标系是(0,0)在左上角。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM