|
FhSim
3.1.0
Marine systems simulation
|
Heading controller for performing a IMO Zig-Zag maneuver.
Collaboration diagram for Zig-Zag maneuver:Heading controller for performing a standard IMO Zig-Zag maneuver. Optional rudderangle/offset from initial heading. 20/20 as standard
From TimeOfExecute the RudderAngle output is the rudder angle command (in radians). The heading is the third component of StateRotation. The first call after TimeOfExecute stores the heading as the initial heading. The rudder angle changes sign each time the heading has moved OffsetFromInitialHeading away from the initial heading in the direction of the rudder angle sign, and that counts one turn. When the count has passed NumberOfTurns the output is 0. Before TimeOfExecute the output is 0. The first rudder angle has the sign of the first turn direction: p gives a negative angle and s a positive angle.
Only the third component of StateRotation is used. The others are registered.
| Name | Width | Description |
|---|---|---|
| StatePosition | 3 | Position of the ship. Not used |
| StateRotation | 3 | Euler angles of the ship; the third component is the heading (radians) |
| StateTheta | 4 | Orientation quaternion. Not used |
| StateVelocity | 3 | Velocity of the ship. Not used |
| Name | Width | Description |
|---|---|---|
| RudderAngle | 1 | Rudder angle command in radians |
| Name | Width | Description |
|---|---|---|
| RudderAngle | 1 | Size of the rudder angle in degrees. Default 20 |
| OffsetFromInitialHeading | 1 | Heading offset in degrees at which the rudder changes sign. Default 20 |
| TimeOfExecute | 1 | Start time of the maneuver. Default 5. Unit not stated in the code |
| DirectionOfFirstTurn | 1 | String p or P (negative first rudder angle) or s or S (positive). Required. Any other value is a parameter error |
| NumberOfTurns | 1 | Integer. Number of rudder changes counted before the output goes to 0. Default 3 |