Trajectory Script Syntax

NI GNSS Simulation Toolkit Help

Edition Date: April 2013

Part Number: 372446D-01

»View Product Info
Download Help (Windows Only)

The following details the syntax to use in a trajectory script for each trajectory command. For examples of script files, refer to the Creating Trajectory Script Files topic.

begin

Trajectory script must start with a begin command. You cannot include more than one begin command in a given trajectory script. You must include the begin command to the Trajectory Script String property or NIGPS_TRAJECTORY_SCRIPT_STRING attribute in On The Fly Trajectory Script Mode only for the first time you enter this command.

Trajectory Command: Straight

Use this command to move the receiver along a straight line.

The syntax for a straight command is shown in the following example:

straight heading_type distance duration altitude_change

The following example shows the syntax when the Trajectory Script Climb Enabled property is set to FALSE or the NIGPS_TRAJECTORY_SCRIPT_CLIMB_ENABLED attribute is set to NIGPS_VAL_FALSE:

straight heading_type distance duration

Straight trajectory parameter definitions:

  • heading_type
    • constant_heading: Receiver heading is kept constant along the trajectory.
    • great_circle: Receiver trajectory is kept along the path of the great circle.
  • distance (s)
    • Specifies the distance to be traveled, in meters, in a given duration.
    • Must be greater than 0 meters.
  • duration (t)
    • Specifies the time taken, in seconds, to travel the given distance.
    • Must be greater than 20 ms.
  • altitude_change (h)
    • Specifies the altitude to be climbed, in meters, in a given duration.

Trajectory Command: Arc

Use this command to move the receiver along an arc. Moving along an arc is typically useful in changing the heading of a receiver. You also can use this command if there are two straight trajectories in succession in different directions. In this case, use the arc command so the direction of the receiver is changed for the next straight command.

The syntax for an arc command is shown in the following example:

arc turn_radius turn_angle duration altitude_change

The following example shows the syntax when the Trajectory Script Climb Enabled property is set to FALSE or the NIGPS_TRAJECTORY_SCRIPT_CLIMB_ENABLED attribute is set to NIGPS_VAL_FALSE:

arc turn_radius turn_angle duration

Arc trajectory parameter definitions:

  • turn_radius
    • Specifies the arc radius in meters.
    • Must be greater than 0 meters.
  • turn_angle
    • Specifies the arc angle in degrees.
    • Valid values range from -360 to +360.
    • If the value is positive, the receiver is moving clockwise. Otherwise, it is moving counter clockwise.
  • duration (t)
    • Specifies the time taken, in seconds, to travel along the specified arc.
    • Must be greater than 20 ms.
  • altitude_change (h)
    • Specifies the altitude to be climbed, in meters, in a given duration.

Trajectory Command: Halt

Use this command to bring the receiver to a stop. If the receiver is currently moving when this command is executed, the receiver moves some distance in its current heading before stopping. The distance traveled before the receiver stops depends on the speed of the receiver when this command is executed.

The syntax for a halt command is shown in the following example:

halt heading_type duration

Halt trajectory parameter definitions:

  • heading_type
    • constant_heading: Receiver heading is kept constant along the trajectory.
    • great_circle: Receiver trajectory is kept along the path of the great circle.
  • duration
    • Specifies the time needed, in seconds, for the receiver to come to a halt.
    • Must be greater than 20 ms.

Trajectory Command: Waypoint

Use this command if the trajectory of the receiver is specified using a list of waypoints. This command also specifies speed at a waypoint.

The syntaxes for a waypoint command are shown in the following example:

waypoint heading_type latitude longitude altitude speed
waypoint heading_type latitude longitude altitude duration=duration_time

Waypoint trajectory parameter definitions:

  • heading_type
    • constant_heading: Receiver heading is kept constant along the trajectory.
    • great_circle: Receiver trajectory is kept along the path of the great circle.
  • latitude
    • Specifies the latitude, in degrees, of the receiver.
  • longitude
    • Specifies the longitude, in degrees, of the receiver.
  • altitude
    • Specifies the altitude, in meters, of the receiver.
  • speed
    • Specifies the speed, in meters/second, of the receive, at a waypoint.
  • duration=
    • Specifies the string constant to identify waypoint command with duration as the last parameter in the command.
  • duration_time
    • Specifies the time needed, in seconds, to travel the waypoints distance.


Notes  
  • The toolkit ignores the altitude parameter, if the Trajectory Script Climb Enabled property is set to FALSE or the NIGPS_TRAJECTORY_SCRIPT_CLIMB_ENABLED attribute is set to NIGPS_VAL_FALSE.
  • Trajectories having change only in altitude and not in latitude and longitude can be simulated using waypoint command with duration parameter.
  • If the waypoint with speed parameter corresponds to a travel path that requires less than 20 ms travel duration, the toolkit ignores the waypoint command and reads the next command in the trajectory script.
  • latitude and longitude values must be specified with a 10-digit precision to simulate trajectory paths with travel duration less than 1 s using waypoint command with duration parameter.
Notes  
  • If waypoint is the first command after begin in trajectory script
    • The toolkit ignores the initial location and heading values provided through property nodes or set attribute functions. The parameters specified in the waypoint commands are taken as the initial parameters.
    • You may specify the Initial Vd property or NIGPS_RECEIVER_VELOCITY_LTP_INITIAL_VD attribute if the Trajectory Script Climb Enabled property is set to TRUE or the NIGPS_TRAJECTORY_SCRIPT_CLIMB_ENABLED attribute is set to NIGPS_VAL_TRUE.
    • You may specify the Initial Speed property or NIGPS_RECEIVER_VELOCITY_LTP_INITIAL_SPEED attribute if the waypoint command is with duration parameter.
  • If the second command is also waypoint, the toolkit calculates the heading based on the two waypoints. Otherwise, the toolkit uses it from the initial heading property.

end

Every trajectory script must conclude with an end command. You must include the end command to the Trajectory Script String property or NIGPS_TRAJECTORY_SCRIPT_STRING attribute to end the trajectory in the On the Fly Trajectory Script Mode.

WAS THIS ARTICLE HELPFUL?

Not Helpful