发送消息的方向(静脉 /omnet++)

发布于 2025-01-22 18:36:19 字数 189 浏览 3 评论 0原文

是否有可能定义发送消息的方向?例如,发件人车只想向后面的车辆发送消息? 我想到使用定向天线; 我找到了这个功能:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赠意 2025-01-29 18:36:19

您可以在 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)。

<Antenna type="SampledAntenna1D" id="patch">
  <parameter name="samples" type="string" value="2.0 1.1 -4.0 0.9"/>
</Antenna>

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 type SampledAntenna1D, 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).

<Antenna type="SampledAntenna1D" id="patch">
  <parameter name="samples" type="string" value="2.0 1.1 -4.0 0.9"/>
</Antenna>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文