发送消息的方向(静脉 /omnet++)
是否有可能定义发送消息的方向?例如,发件人车只想向后面的车辆发送消息? 我想到使用定向天线; 我找到了这个功能:
double Antenna::getGain(Coord ownPos, Coord ownOrient, Coord otherPos)
但是我不知道如何使用它。 你能给我一个人吗?
Is there a possibility to define the direction of sending a message?? for example, the sender vehicle wants to send a message only to the vehicle behind?
I thought of using Directional antennas;
I found this function :
double Antenna::getGain(Coord ownPos, Coord ownOrient, Coord otherPos)
But i don't know how to use it.
would you give me a hand please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 http://veins.car2x.org/documentation/模块/#天线 - 简要:
*。**。 /VEINS/BLOB/VEINS-5.2/EXAMPLES/VEINS/OMNETPP.INI#L86“ rel =” nofollow noreferrer“> https://github.com/sommer/sommer/veins/veins/blob/veins-5.2/examples/examples/veins/veins/omnetpp。 Ini#l86 )。该示例仿真使用 htttps ://github.com/sommer/veins/blob/veins-5.2/examples/veins/antenna.xml#l35 。它是类型
sampledantenna1d
的类型,这意味着它使用单个参数定义了天线模式,samples
存储一系列增益样品,以等距间隔为0度,顺时针方向。以下是一个示例XML语句,使用非常粗的(四个)增益样品配置这种天线(+2.0 dbi在汽车的前面+2.0 dbi,+1.1 dbi在汽车的右侧,-4.0 dbi,在汽车后部-4.0 dbi,汽车左侧的+0.9 dbi)。
You can find an explanation of antenna patterns on http://veins.car2x.org/documentation/modules/#antennas - in brief:
*.**.nic.phy80211p.antenna
defines which antenna to use (see https://github.com/sommer/veins/blob/veins-5.2/examples/veins/omnetpp.ini#L86). The example simulation uses a monopole antenna defined in https://github.com/sommer/veins/blob/veins-5.2/examples/veins/antenna.xml#L35. It is of typeSampledAntenna1D
, which means that it defines an antenna pattern using a single parameter,samples
, which stores a series of gain samples, taken at equidistant intervals from 0 degrees, going clockwise.The following is an example XML statement configuring such an antenna using very coarse (four) gain samples (+2.0 dBi to the front of the car, +1.1 dBi to the right of the car, -4.0 dBi to the back of the car, +0.9 dBi to the left of the car).