移动子网对象
移动子网对象的用法与固定子网对象基本相同。它们可以嵌套在其他子网(Subnet)中,构成子网层次。与固定子网不同,移动子网不能通过单工、双工或总线链路连接,移动子网内部的对象也不能通过这些链路与任何外部对象连接。表示移动子网对象的默认图标如下图所示。
图 59:默认移动子网图标

在网络顶层,移动子网对象位于具有纬度、经度和高度规格的全局坐标系中。进而,在每个子网内,用户可以通过为显示选择单位和网格间隔来定义一个笛卡尔坐标系。与子网相关联的某个区域称为子网范围(subnetwork extent)。该范围定义了子网的边界。例如,如果一个子网在 x 方向的范围为 2000 米、在 y 方向的范围为 3000 米,且以点 (a,b) 为中心,则该子网内的对象的位置可以在 (a-1000 米, b-1500 米) 与 (a+1000 米, b+1500 米) 之间。
移动子网对象属性
移动子网对象的内置属性按字母顺序列示如下。
表 19:子网对象属性
| Name | Editing Data Type |
|---|---|
| altitude | double |
| altitude modeling | enumerated |
| ascent rate | string |
| attribute promotion | toggle |
| bearing | double |
| color | color |
| creation data | string |
| creation source | string |
| creation timestamp | date |
| financial cost | string |
| ground speed | string |
| icon name | string |
| map | typed file |
| minimized icon | minimized icon |
| name | string |
| outline color | color |
| pitch | double |
| position cache time granularity | double |
| priority | integer |
| roll | double |
| sys id | integer |
| threshold | double |
| trajectory | typed file |
| trajectory_speed_override | toggle double |
| unit | integer |
| user id | integer |
| x position | double |
| y position | double |
| yaw | double |
altitude
该属性表示移动子网距离地球表面海平面的高度,单位为米。
如果指定了轨迹文件,则每当移动节点需要更新其位置时,该值都会被自动重新计算。如果未指定轨迹文件,则可以通过内核过程(Kernel Procedure)op_ima_obj_attr_set_dbl() 动态更新该值。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | double |
| Access | read / write | read / write |
| Default Value | 0.0 | |
| Units | meters | |
| Constraints | None |
altitude modeling
该属性决定仿真内核(Simulation Kernel)如何解释对象的 altitude 属性。共有三种设置:
- relative to subnet – 该 altitude 设置被解释为对象相对于当前子网的高度。
- absolute – 该 altitude 设置是对象相对于全球海平面的高度。
- relative to terrain – 该 altitude 设置是对象相对于下垫地形(山脉、山谷、海洋等)的高度。
| Editing | Simulation | |
|---|---|---|
| Data Type | enumerated | enumerated |
| Access | read / write / promote | read |
| Default Value | relative to subnet | |
| Units | N/A | |
| Constraints | See description |
ascent rate
该属性指定移动子网的垂直速度。仅当子网的 trajectory 属性设置为 VECTOR 时使用。该属性字符串由一个数值后跟一个速度单位组成,如“3 meter/sec”。速度单位要么是“knot”,要么是一个长度单位(meter、kilometer、feet、mile 或 nautical mile)与一个时间单位(sec、min、hour)以“/”分隔的组合。
| Editing | Simulation | |
|---|---|---|
| Data Type | string | string |
| Access | read / write / promote | read / write |
| Default Value | None | |
| Units | See description | |
| Constraints | None |
attribute promotion
该属性允许你控制已提升(promoted)属性的显示。启用时,包含在子网内的对象的提升属性会显示在子网的属性列表中。禁用时,提升属性不显示,也不会提升到子网的父级。
当模型包含多层嵌套子网、每个子网又有许多节点和许多提升属性时,该属性最为有用。在这种情况下,显示任何子网(尤其是顶层子网)的 Attributes 对话框,或滚动浏览属性列表,都可能缓慢而繁琐。建议将该属性设置为“disabled”,除非你需要显示或修改子网上某个提升属性的值。
该属性的值对仿真行为没有影响。
| Editing | Simulation | |
|---|---|---|
| Data Type | toggle | N/A |
| Access | read / write | N/A |
| Default Value | disabled | |
| Units | N/A | |
| Constraints | None |
bearing
该属性指定移动子网相对于正北方向的方位角(0 - 北,90 - 东,180 - 南,270 - 西)。仅当子网的 trajectory 属性设置为 VECTOR 时使用。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | double |
| Access | read / write / promote | read / write |
| Default Value | 0.0 | |
| Units | degrees | |
| Constraints | 0.0 <= bearing < 360.0 |
color
该属性指定移动子网轨迹的颜色,用于在显示中描绘。该属性对仿真没有影响。color 属性的取值范围为 RGB000 到 RGB333,其中每个数字是 0 到 3(含)之间的整数。第一个数字越大越偏红,第二个数字越大越偏绿,第三个数字越大越偏蓝。因此 RGB000 对应黑色,RGB333 对应白色,RGB300 对应红色,依此类推。
| Editing | Simulation | |
|---|---|---|
| Data Type | color | N/A |
| Access | read / write | N/A |
| Default Value | RGB333 | |
| Units | N/A | |
| Constraints | None |
creation data
该属性指定关于对象创建的附加信息。
| Editing | Simulation | |
|---|---|---|
| Data Type | string | not applicable |
| Access | read/write | not applicable |
| Default Value | “” | |
| Units | ||
| Constraints |
creation source
该属性指定对象是如何创建的。
| Editing | Simulation | |
|---|---|---|
| Data Type | string | not applicable |
| Access | read/write | not applicable |
| Default Value | “Object Palette” | |
| Units | ||
| Constraints |
creation timestamp
该属性指定对象何时被创建。
| Editing | Simulation | |
|---|---|---|
| Data Type | date | not applicable |
| Access | read/write | not applicable |
| Default Value | ||
| Units | ||
| Constraints |
financial cost
该属性指定购买或维护该对象的成本。
| Editing | Simulation | |
|---|---|---|
| Data Type | string | string |
| Access | read/write/promote | read/write |
| Default Value | “0.00” | |
| Units | ||
| Constraints |
ground speed
该属性指定移动子网相对于地面的速度。仅当子网的 trajectory 属性设置为 VECTOR 时使用。该属性字符串由一个数值后跟一个速度单位组成,如“3 meter/sec”。速度单位要么是“knot”,要么是一个长度单位(meter、kilometer、feet、mile 或 nautical mile)与一个时间单位(sec、min、hour)以“/”分隔的组合。
| Editing | Simulation | |
|---|---|---|
| Data Type | string | string |
| Access | read / write / promote | read / write |
| Default Value | None | |
| Units | See description | |
| Constraints | None |
icon name
该属性允许用户修改用于在网络图中表示子网的位图。图标可以用图标编辑器创建。该属性的值对仿真行为没有影响。
| Editing | Simulation | |
|---|---|---|
| Data Type | icon | N/A |
| Access | read / write | N/A |
| Default Value | subnet | |
| Units | N/A | |
| Constraints | None |
map
该属性指定一个带 .cds 后缀的制图数据集文件的名称(属性值中不包含该后缀),其内容显示在 Project Editor 中。
该属性对仿真没有影响。
| Editing | Simulation | |
|---|---|---|
| Data Type | typed file | N/A |
| Access | read / write | N/A |
| Default Value | None | |
| Units | N/A | |
| Constraints |
minimized icon
该属性指定当缩放导致子网小到无法用其原始图标表示时,子网将如何显示。
| Editing | Simulation | |
|---|---|---|
| Data Type | minimized icon | not applicable |
| Access | read/write | not applicable |
| Default Value | “circle/#FF0000” | |
| Units | ||
| Constraints |
name
该属性指定用于标识目的的文本字符串。在仿真过程中,它通常用于执行路由、辅助调试以及查找对象 ID(Object ID)。子网名称会出现在其包含的每个对象的名称中,每一级层次用一个“.”分隔。例如,如果 subnet_1 层次嵌套在 subnet_2 中,则 subnet_2 的全名为“top.subnet_1.subnet_2”。该属性的值对仿真没有影响。
| Editing | Simulation | |
|---|---|---|
| Data Type | string | string |
| Access | read / write | read |
| Default Value | mobile_subnet_n, n >= 0 |
|
| Units | N/A | |
| Constraints | unique name, no dots, not “top” |
outline color
该属性指定子网周边显示的颜色,用于在 Project Editor 中描绘。该属性对仿真没有影响。outline color 属性的取值范围为 RGB000 到 RGB333,其中每个数字是 0 到 3(含)之间的整数。第一个数字越大越偏红,第二个数字越大越偏绿,第三个数字越大越偏蓝。因此 RGB000 对应黑色,RGB333 对应白色,RGB300 对应红色,依此类推。如果不想显示子网的周边,可以从颜色面板中选择黑色将其隐藏。
| Editing | Simulation | |
|---|---|---|
| Data Type | color | N/A |
| Access | read / write | N/A |
| Default Value | RGB133 | |
| Units | N/A | |
| Constraints | None |
pitch
该属性指定移动子网在空间中姿态的 pitch 分量。姿态的其余分量是 roll 和 yaw。如果指定了轨迹文件,仿真内核会根据当前轨迹段设置自动更新该属性的值。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | double |
| Access | read / write / promote | read / write |
| Default Value | 0.0 | |
| Units | degrees | |
| Constraints | None |
position cache time granularity
该属性指定一个时间窗口,在该窗口内假定移动子网的位置不变,不会重新计算。默认值设置为 op_runsim 的 default_site_position_cache_time_granularity 属性的值。
| Editing | Simulation | |
|---|---|---|
| Data Type | N/A | double |
| Access | N/A | read / write |
| Default Value | see description | |
| Units | seconds | |
| Constraints | None |
priority
当多个事件被调度在同一仿真时刻时,该属性用于决定它们的执行顺序。优先级较高的事件先执行。事件优先级按层次评估:子网优先级的权重高于节点优先级,节点优先级的权重又高于模块优先级。在评估发生在模块上的事件的优先级时,只考虑最低层父子网的优先级。
| Editing | Simulation | |
|---|---|---|
| Data Type | integer | integer |
| Access | read / write / promote | read / write |
| Default Value | 0 | |
| Units | N/A | |
| Constraints | absolute value <= 32,000 |
roll
该属性指定移动子网在空间中姿态的 roll 分量。姿态的其余分量是 pitch 和 yaw。如果指定了轨迹文件,仿真内核会根据当前轨迹段设置自动更新该属性的值。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | double |
| Access | read / write / promote | read / write |
| Default Value | 0.0 | |
| Units | degrees | |
| Constraints | None |
sys id
该属性包含一个用于标识目的的正的只读整数。系统为每个移动子网对象分配一个唯一的编号。该编号通常与对象创建的顺序对应:第一个创建的子网的 sys id 为 0,第二个子网的 sys id 为 1,一般地,第 n 个子网的 sys id 为 n-1。它可以用于,例如,在路由中识别某个移动子网,或在遍历移动子网以访问其属性时使用,或一般地,在需要唯一整数标识的任何场合。该属性仅存在于仿真过程中。
| Editing | Simulation | |
|---|---|---|
| Data Type | N/A | integer |
| Access | N/A | read |
| Default Value | None | |
| Units | N/A | |
| Constraints | unique for each mobile subnetwork object |
threshold
该属性影响子网在不同缩放级别下的显示特性。如果其值高于地图的当前分辨率,子网将以缩微图标显示。通常,该属性用于确保网络图在较高缩放级别下不被图标弄得杂乱。地图的当前分辨率可以在 Project Editor 中通过 Set View Properties 命令确定。在顶层子网中,该属性以像素/度为单位;在所有其他子网级别中,以像素/子网单位为单位。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | N/A |
| Access | read / write | N/A |
| Default Value | 0.0 | |
| Units | N/A | |
| Constraints | See description |
trajectory
该属性指定对象在仿真过程中的运动。有效设置为 VECTOR、NONE,或带 .trj 后缀的 ASCII 轨迹文件的名称(属性设置中不包含该后缀)。
如果 trajectory 设置为 VECTOR,则对象的 bearing、ground speed 和 ascent rate 属性决定其运动。
如果 trajectory 设置为 NONE,对象将保持静止,除非其位置属性通过诸如 op_ima_obj_attr_set() 的内核过程被直接修改。
如果 trajectory 设置为某个轨迹文件名,应用程序使用轨迹文件来确定对象的运动。轨迹文件指定一组路径段,用于确定对象在给定时刻的位置。文件可以包含所有路径段统一的穿越时间(固定间隔轨迹),也可以为每个段指定各自的穿越时间(可变间隔轨迹)。
注: 如果移动对象位于移动子网内,并使用基于段的轨迹,则只有当轨迹以非度坐标(feet、miles 等)定义时,父子网的运动才会影响该对象的运动。
有关创建和使用不同类型轨迹的更多信息,参见“Trajectories” on page 14。
| Editing | Simulation | |
|---|---|---|
| Data Type | enumerated/ file name | N/A |
| Access | read / write / promote | N/A |
| Default Value | None | |
| Units | N/A | |
| Constraints | See description |
trajectory_speed_override
该属性指定移动站点在沿指定轨迹运动时使用的速度。
沿基于段的轨迹运动的移动站点的速度在轨迹定义中指定。该速度对每个段可以不同。你可以通过设置该属性来覆盖轨迹中指定的速度。该属性设置的速度将用于轨迹的所有段。
有关创建和使用基于段的轨迹的更多信息,参见“Segment-Based Trajectories” on page 14。
| Editing | Simulation | |
|---|---|---|
| Data Type | toggle double | N/A |
| Access | read / write / promote | N/A |
| Default Value | None | |
| Units | meters/sec | |
| Constraints | None |
unit
该属性包含子网内对象所使用的单位。该值是 OpT_Ima_Obj_Position_Unit_Type 值之一(参见 Table 68 “Object Position Unit Type Symbolic Constants” on page 19)。
注: 要确定某个子网的跨度或位置的单位,必须获取该子网的父子网的 unit 属性。
| Editing | Simulation | |
|---|---|---|
| Data Type | not applicable | integer |
| Access | not applicable | read |
| Default Value | ||
| Units | ||
| Constraints |
user id
该属性是一个用于用户自定义标识目的的整数。与 sys id 不同,它不一定具有唯一性,但它是可读写变量,用户可以按任何需要的方式赋值。
| Editing | Simulation | |
|---|---|---|
| Data Type | integer | integer |
| Access | read / write / promote | read / write |
| Default Value | 0 | |
| Units | N/A | |
| Constraints | None |
x position
该属性指定子网范围中心的 x 坐标,以及子网图标在 Project Editor 中显示位置的 x 坐标。其值以父子网的单位指定。当指定单位为度时,它对应中心点的经度。正值表示东经度数,负值表示西经度数。
如果指定了轨迹文件,仿真内核通过在轨迹文件中相邻点之间线性插值来自动更新该属性的值。使用相对轨迹时,初始的 x position 值作为偏移量加到轨迹文件中所有 x 坐标上。使用绝对轨迹时,x position 的初始值无关紧要,因为在仿真开始时它会被轨迹文件中的第一个 x 坐标替换。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | double |
| Access | read / write | read / write |
| Default Value | N/A | |
| Units | See description | |
| Constraints |
y position
该属性指定子网范围中心的 y 坐标,以及子网图标在 Project Editor 中显示位置的 y 坐标。其值以父子网的单位指定。当指定单位为度时,它对应中心点的纬度。正值表示北纬度数,负值表示南纬度数。
如果指定了轨迹文件,仿真内核通过在轨迹文件中相邻点之间线性插值来自动更新该属性的值。使用相对轨迹时,初始的 y position 值作为偏移量加到轨迹文件中所有 y 坐标上。使用绝对轨迹时,y position 的初始值无关紧要,因为在仿真开始时它会被轨迹文件中的第一个 y 坐标替换。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | double |
| Access | read / write | read / write |
| Default Value | N/A | |
| Units | See description | |
| Constraints |
yaw
该属性指定移动子网在空间中姿态的 yaw 分量。姿态的其余分量是 roll 和 pitch。如果指定了轨迹文件,仿真内核会根据当前轨迹段设置自动更新该属性的值。
| Editing | Simulation | |
|---|---|---|
| Data Type | double | double |
| Access | read / write / promote | read / write |
| Default Value | 0.0 | |
| Units | degrees | |
| Constraints | None |