public abstract class UsvController extends VehicleController
| Modifier and Type | Field and Description | 
|---|---|
| protected double | alongTrackRangealong track range remaining to reach goal point | 
| protected boolean | correctToTrackset to true if waypoint will follow a specified track to the waypoint (false is continuous to) | 
| protected double | crossTrackErrorlateral displacement from a commanded track | 
| protected double | offTrackAngleDegreesangle computed from arc tangent of alongTrackRange and crossTrackError | 
| protected double | propCommandcommanded port propeller command | 
| protected double | psiCommandcommanded heading -- may or may not be relevant for individual inheriting control modes | 
| protected double | psiErrorangular offset in degrees from a commanded track | 
| protected double | rudderCommandcommanded rudder setting | 
| protected double | THRUSTCONVERSION | 
| protected UsvExecution | usvExecutionreference to main class of this usvExecution | 
| Constructor and Description | 
|---|
| UsvController(UsvExecution execution)Creates a new instance of Controller | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract void | computeControls()computes usvExecution controls based on type of controller and current state/command | 
| protected void | computeRudderCommands()Computes the rudder setting to maintain a commanded heading. | 
| void | setControls()applies the computed control settings for the rudder, propellers, and lateral body thrusters | 
| protected void | updateCrossTrackError()Computes the current crosstrack error | 
protected final double THRUSTCONVERSION
protected UsvExecution usvExecution
protected double rudderCommand
protected double propCommand
protected double psiCommand
protected double crossTrackError
protected double alongTrackRange
protected double offTrackAngleDegrees
protected boolean correctToTrack
protected double psiError
public UsvController(UsvExecution execution)
execution - instance of UsvExecutionpublic abstract void computeControls()
protected void updateCrossTrackError()
protected void computeRudderCommands()
public void setControls()