Segment-Based Trajectory File Format
Segment-based trajectories rely on ASCII-format trajectory (.trj) files to specify the trajectory, including coordinates and traversal times. You can create a trajectory file with any text editor, using the format given in the following figure and table.
Figure 7: Segment-Based Trajectory File Format
Version: 5
Position_Unit: <position_unit>
Altitude_Unit: <altitude_unit>
Coordinate_Method: <coordinate_method>
Altitude_Method: <altitude_method>
locale: <locale>
Calendar_Start: <start_time>
Execute_Count: <execute_count>
Reverse_Trajectory: <reverse_trajectory>
Reverse_Wait_Time: <reverse_wait_time>
Coordinate_Count: <coordinate_count>
# X Position ,Y Position ,Altitude ,Traverse Time ,Wait Time ,Pitch ,Yaw ,Roll
<x_coord_0> ,<y_coord_0> ,<alt_0> ,<trav_time_0> ,<wait_time_0> ,<pitch_0> ,<yaw_0> ,<roll_0)>
<x_coord_1> ,<y_coord_1> ,<alt_1> ,<trav_time_1> ,<wait_time_1> ,<pitch_1> ,<yaw_1> ,<roll_1)>
…
<x_coord_n> ,<y_coord_n> ,<alt_n> ,<trav_time_n> ,<wait_time_n> ,<pitch_n> ,<yaw_n> ,<roll_n)>
The following table contains an alphabetical list and descriptions of the fields in a trajectory file.
Table 4: Trajectory File Fields
| Field Name | Keyword | Description |
|---|---|---|
altitude_method |
Altitude_Method |
Specifies how the alt_n value of positions are interpreted. The only valid value is “absolute”. |
altitude_unit |
Altitude_Unit |
Units for alt_n.Valid values are “Kilometers”, “Meters”, “Miles”, “Feet”, and “Local”. If “Local”, the trajectory uses the coordinate system of the subnetwork in which it is used. |
alt_n |
Absolute altitude above sea level for position n (double). Note: Trajectory altitudes override the altitude attribute of the mobile node to which the trajectory is assigned. |
|
calendar_start |
Calendar_Start |
Reserved for future use. The only valid value is “unused”. |
coordinate_count |
Coordinate_Count |
Number of positions defined in the trajectory file (integer). |
coordinate_method |
Coordinate_Method |
Specifies how the x_coord_n and y_coord_n values of positions are interpreted. Valid values are:- “relative” – x and y coordinates are interpreted as offsets from the site’s initial position relative to its parent subnetwork. The first position in the file must be 0,0. - “fixed” – x and y coordinates are interpreted as absolute coordinates within the parent subnetwork. |
execute_count |
Execute_Count |
Specifies how many times the trajectory should be repeated. See Options for Following a Segment-Based Trajectory for more information. |
locale |
locale |
Reserved for future use. The only valid value is “C”. |
pitch_n |
Pitch for position n (double). Valid values are: - Degrees, where 0 is parallel to the ground, positive values represent “nose up”, and negative values represent “nose down”. - “autocomputed” – The pitch value will be set such that node orientation matches the motion vector for each trajectory segment. - “unspecified” – Same as 0 degrees. |
|
position_unit |
Position_Unit |
Units for the x_coord_n and y_coord_n values of position n.Valid values are “Degrees”, “Kilometers”, “Meters”, “Miles”, “Feet”, and “Local”. If “Local”, the trajectory uses the coordinate system of the subnetwork in which it is used. Note: If a mobile site resides within a mobile subnetwork, the parent subnetwork’s motion affects the site’s motion only if the trajectory is defined in non-degree coordinates (such as feet or meters). See Relative Movement in Segment-Based Trajectories for more information. |
reverse_trajectory |
Reverse_Trajectory |
Specifies whether the trajectory should be followed in reverse. Valid values are “yes” and “no”. See Options for Following a Segment-Based Trajectory for more information. |
reverse_wait_time |
Reverse_Wait_Time |
Specifies how long a site should wait at the end position of the trajectory before reversing course and following the trajectory back to the beginning position. Same format as trav_time_n. See Options for Following a Segment-Based Trajectory for more information. |
roll_n |
Roll for position n (double). Valid values are: - Degrees, where 0 is parallel to the ground, positive values represent “bank right”, and negative values represent “bank left”. - “unspecified” – Same as 0 degrees. |
|
trav_time_n |
Traverse time from position n-1 to position n, expressed in a standard time format (6:18:59) or an HMS format (6h18m59s). The HMS format does not require all three fields; 6h18m or 18m are valid. Decimals are permitted only in the right-most unit: 6:18:59.5 and 18.5m are valid entries, but 6.5:18:59 and 6h18.5m59s are not. If you enter a simple value like 23 or 59, the value is interpreted as seconds. | |
version_number |
Version |
File format version (integer). Must be “5”. |
wait_time_n |
Length of time the site waits at position n before continuing on to the next position. Same format as trav_time_n. |
|
x_coord_n |
X coordinate for position n (double). This is the position’s longitude, if the unit is degrees. | |
y_coord_n |
Y coordinate for position n (double). This is the position’s latitude, if the unit is degrees. | |
yaw_n |
Yaw for position n (double). Valid values are: - Degrees, where 0 is north, positive values represent eastward rotation, and negative values represent westward rotation. - “autocomputed” – The yaw value will be set such that node orientation matches the motion vector for each trajectory segment. - “unspecified” – Same as 0 degrees. |