op_radio_antenna_gain_to_location_get()

Note: Requires Wireless functionality

Abstract

Gets an antenna’s gain to a given location.

Syntax

op_radio_antenna_gain_to_location_get (antenna_objid, x, y, z)
Argument Type Description
antenna_objid Objid Antenna of interest.
x double Geocentric x coordinate of location of interest.
y double Geocentric y coordinate of location of interest.
z double Geocentric z coordinate of location of interest.

Return Type

double

Antenna gain in direction of specified location, in dB. (If the gain cannot be obtained, 0.0 is returned.)

Example

/* Get receive antenna gain toward transmitter. */

objid   rx_antenna_objid;
double  tx_x, tx_y, tx_z, gain;

/* Obtain the geocentric coordinates of the transmitter. */
tx_x = op_td_get_dbl (pkptr, OPC_TDA_RA_TX_GEO_X);
tx_y = op_td_get_dbl (pkptr, OPC_TDA_RA_TX_GEO_Y);
tx_z = op_td_get_dbl (pkptr, OPC_TDA_RA_TX_GEO_Z);

/* Obtain the receiver antenna objid. */
rx_antenna_objid = op_td_get_int (pkptr, OPC_TDA_RA_RX_ANT_OBJID);

gain = op_radio_antenna_gain_to_location_get (rx_antenna_objid, tx_x, tx_y, tx_z);

Details

This function returns OPC_COMPCODE_FAILURE if no angle values to the location can be retrieved or they are irrelevant. For example, this applies when

  • no antenna module is present (therefore, the antenna is isotropic)
  • the antenna module uses an isotropic pattern
  • the antenna and target locations are identical

Purpose

Provides a mechanism for getting the gain of an antenna in the direction of a specified location.

Errors

  • None.

Reference

  • None.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com