Global Coordinate System

The position of a network level object within the global coordinate system is described by its latitude, longitude, and altitude. The latitude specifies how far north or south the object is, relative to the equator. Positive latitudes are in the northern hemisphere, negative in the southern. The longitude specifies how far east or west the object is, relative to the prime meridian. Positive longitudes, to +180°, are in the eastern hemisphere and negative longitudes, to -180°, are in the western. The altitude is the height of the object directly over the location determined by the latitude and longitude values. The altitude is measured in meters above sea level.

Figure 188: Global Coordinate System

Global Coordinate System

For subnetworks and nodes contained within a subnetwork whose coordinate system has units of degrees or arc seconds, the position–related attributes of these objects hold global position coordinates. For example, within the top subnetwork, a node’s “x position” attribute is its longitude, its “y position” attribute is its latitude, and its “altitude” attribute is its altitude in meters.

In whatever subnetwork a node is located, its global position can be obtained during simulation with the Kernel Procedure op_ima_obj_pos_get(). If all of a node’s parents are fixed subnets, the values returned for a fixed node do not change over time. For mobile and satellite nodes, the values returned reflect the position of the node at that moment in the simulation.

Figure 189: Fragment of a Process Model State Executive Determining Global Position Coordinates

/* This process just received the self interrupt that signals */
/* it to re-point the antenna at the mobile base station.     */
/* Obtain the (possibly) new coordinates of the base station. */
/* Note that only the latitude, longitude and altitude coords */
/* are of interest. The geocentric (x,y,z) coordinates are    */
/* not used.                                                  */
op_ima_obj_pos_get (base_station_objid, &lat, &lon, &alt, &tmp_dbl, &tmp_dbl,
	&tmp_dbl);
/* Set the pointing attributes of the antenna module. */
op_ima_obj_attr_set (antenna_mod_objid, “target latitude”, lat);
op_ima_obj_attr_set (antenna_mod_objid, “target longitude”, lon);
op_ima_obj_attr_set (antenna_mod_objid, “target altitude”, alt);
/* Schedule the next re-pointing timer. */
op_intrpt_schedule_self (op_sim_time () + REPOINT_TIMEOUT, REPOINT_TIMER);