op_radio_antenna_angles_to_location_get()

Note: Requires Wireless functionality

Abstract

Gets an antenna’s azimuth and polar pointing angles to a given location.

Syntax

op_radio_antenna_angles_to_location_get (antenna_objid, x, y, z, polar_angle_ptr, azimuth_angle_ptr)
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.
polar_angle_ptr double * Area to be filled with pointing polar angle value.
azimuth_angle_ptr double * Area to be filled with pointing azimuth angle value.

Return Type

Compcode

OPC_COMPCODE_SUCCESS if the antenna angles were successfully obtained; OPC_COMPCODE_FAILURE otherwise.

Example

/* Get receive antenna pointing angles toward transmitter. */

objid   rx_antenna_objid;
double  tx_x, tx_y, tx_z, polar, azimuth, 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);

if (OPC_COMPCODE_SUCCESS == op_radio_antenna_angles_to_location_get (rx_antenna_objid, tx_x, tx_y, tx_z, &polar, &azimuth))
	{
	/* do something with the angles */
	}

Details

The polar and azimuth pointing angles are returned in the antenna’s coordinate system. These are the same coordinates used in the Antenna Pattern Editor (as shown in Figure 38 on page 61).

This function returns OPC_COMPCODE_FAILURE if no angle values can be retrieved or they are irrelevant. For example, this applies in these circumstances:

  • 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 polar and azimuth angles (in the antenna’s coordinate system) from an antenna to a given geocentric location.

Errors

  • Recoverable Error: Object ID (<antenna_id>) is out of range.
  • Recoverable Error: Object ID (<antenna_id>) refers to a restricted object.

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