op_ima_obj_pos_set_geocentric()

Abstract

Sets the position of a mobile site in the geocentric coordinate system.

Syntax

op_ima_obj_pos_set_geocentric (objid, x, y, z)
Argument Type Description
objid Objid object ID of the mobile site of interest (node or subnet)
[A site object ID can be obtained from several KPs in the Id and Topo packages: op_topo_parent(), op_topo_child(), op_id_from_userid(), and op_id_from_name().]
x double Cartesian X coordinate to set for the site
y double Cartesian Y coordinate to set for the site
z double Cartesian Z coordinate to set for the site

Return Type

Compcode

OPC_COMPCODE_FAILURE if an error occurs (see Errors section); OPC_COMPCODE_SUCCESS otherwise.

Example

obj_type = op_id_to_type (mob_site_id);
if (obj_type == OPC_OBJTYPE_NODE_MOB || obj_type == OPC_OBJTYPE_SUBNET_MOB)
	{
	op_ima_obj_pos_set_geocentric (mob_site_id, new_x, new_y, new_z);
	}

Details

The site position set by this KP is stated in the geocentric Cartesian coordinate system, {X / Y / Z}. This coordinate system has units of meters for all three coordinates. See “Geocentric Coordinate System“ on page 317 for a description of this coordinate system.

The mobile site specified by objid must not use other methods of assigning position, such as:

Purpose

This function provides a way to set the position of a mobile node or subnet by specifying its coordinates in the geocentric coordinate system.

Errors

  • Recoverable Error: Object ID (<objid>) is out-of-range.
  • Recoverable Error: Object ID (<objid>) refers to a restricted object.
  • Recoverable Error: Unable to set geocentric position for object (<objid>); it is not a mobile node or subnet (object type is <obj_type>).
  • Recoverable Error: Unable to set geocentric position for object (<objid>); it uses a trajectory.
  • Recoverable Error: Unable to set geocentric position for object (<objid>); its position is defined by a query callback.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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