op_ima_traj_info_get()

Abstract

Returns the ground speed and ascent rate of a site in the trajectory segment corresponding to a given time, and the time until which the site will have those speeds.

Syntax

op_ima_traj_info_get (objid, time, ground_speed_ptr, ascent_rate_ptr, end_time_ptr)
Argument Type Description
objid Objid object ID of the site of interest
time double simulation time of interest (must be op_sim_time() or later)
ground_speed_ptr double * variable to be filled with the ground speed at time
ascent_rate_ptr double * variable to be filled with the ascent rate at time
end_time_ptr double * variable to be filled with the next simulation time at which one or both of the trajectory velocities change

Return Type

Compcode

OPC_COMPCODE_SUCCESS if the trajectory information is obtained; OPC_COMPCODE_FAILURE otherwise.

Example

/* Display ground speed, ascent rate, and end time for each trajectory segment */
/* of current object’s parent. */
double	    start_time, end_time, ground_speed, ascent_rate;

op_ima_obj_hname_get (op_id_parent (op_id_self ()), name, 256);

start_time = 0;
end_time = OPC_DBL_INFINITY;
do
	{
	retval = op_ima_traj_info_get (op_id_parent (op_id_self ()),
		start_time, &ground_speed, &ascent_rate, &end_time);

	start_time = end_time;

	if (retval == OPC_COMPCODE_SUCCESS)
		printf ("%-40sspd: %g, asc: %g, end: %g\n",
			name, ground_speed, ascent_rate, end_time);
	else
		printf ("%-40s: failed\n", name);
	}
while (end_time != OPC_DBL_INFINITY);

Details

If the specified site is fixed, the speeds returned will be those of a parent (possibly moving) site. An end time value of OPC_DBL_INFINITY is returned if there is no time limit on the movement. Ground speed and ascent rate are given in meters/second.

Purpose

Provides a way to obtain information about the ground speed and ascent rate of a site during a particular trajectory segment.

Errors

  • Recoverable Error: Object ID (<objid>) is out-of-range.
  • Recoverable Error: Object ID (<objid>) refers to a restricted object.
  • Recoverable Error: Object (<objid>) has incorrect type (<type>); node or antenna objects are expected.
  • Recoverable Error: Can't compute vector mobility for a mobile site inside a mobile subnet
  • Recoverable Error: Can't compute vector mobility for a mobile site inside a satellite subnet

Reference

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