FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Waypoint reference tracker
+ Collaboration diagram for Waypoint reference tracker:

Gives a desired position, heading, yaw rate and speed for a path of straight segments between waypoints, with a circle arc at each inner waypoint. A state, TrackState, is the distance travelled along the path: its rate is the vessel velocity (horizontal) projected on the direction of the path. The desired values are for the point on the path a distance Lookahead ahead of that distance. On a straight segment the speed is the speed of that segment; on an arc it is a blend of the speeds of the straight segments before and after. The waypoints are in the horizontal plane (the down coordinate is 0). The input arrays have N waypoints, at least 2.

Input ports

Name Width Description
PositionNED 3 Position of the vessel in the NED frame
VelocityNED 3 Velocity of the vessel in the NED frame (the horizontal part is used)

Output ports

Name Width Description
DesiredSurgeBody 1 Desired speed (see StraightSegmentU)
DesiredYawNED 1 Desired heading
DesiredYawRateNED 1 Desired yaw rate: 0 on a straight segment, and the speed of the vessel along the path divided by the radius on an arc (positive to starboard)
DesiredPosition 3 Desired position on the path

Configuration parameters

Name Width Description
WaypointN N North coordinates of the waypoints. Required. Its size sets N
WaypointE N East coordinates of the waypoints. Required
WaypointR N Distance before and after an inner waypoint where the arc starts and ends. Required
StraightSegmentU N-1 Speed on each straight segment. Required
Lookahead 1 Distance along the path from the position of the vessel to the desired point. Default 0. Unit not stated in the code
TrackColor 3 Colour of the path, RGB. Default 1, 0, 0. Builds with visualization only
RemovedColor 3 Colour of the removed corners, RGB. Default about 0.33, 0.33, 0.33. Builds with visualization only
SectorColor 3 Colour of the arc sectors, RGB. Default about 0.46, 0.46, 0.46. Builds with visualization only
SightColor 3 Colour of the line of sight, RGB. Default 0, 0, 1. Builds with visualization only

States

Name Width Description
TrackState 1 Distance along the path. Initial value: the projection of the initial position on the straight line of the leg that the code picks from the closest waypoint, not below 0