public abstract class UuvController extends VehicleController
| Modifier and Type | Field and Description | 
|---|---|
| protected double | alongTrackRangealong track range remaining to reach goal point | 
| protected double | bowLateralThrusterCommandcommanded bow lateral thruster setting. | 
| protected double | bowVerticalThrusterCommandcommanded bow vertical thruster setting. | 
| protected boolean | correctToTrackset to true if vehicle will try to follow a specified track between waypoints (false is point continuously towards waypoint, or no track applicable) | 
| protected double | crossTrackErrorlateral displacement from a commanded track | 
| protected double | depthErrordepth error (difference between actual and commanded depth or altitude | 
| protected double | depthErrorIntegraldepth error integral used in PID control | 
| protected double | depthPidTimevehicle time (absolute) to switch from PD to PID control | 
| protected double | MAXDEPTHERRORmaximum value to allow depth error integral to reach | 
| protected double | offTrackAngleDegreesangle computed from arc tangent of alongTrackRange and crossTrackError | 
| protected boolean | openLoopHeadingwhether to automatically adjust heading | 
| protected double | pdOnlyTimetime after changing speed or depth commands to use PD control before switching to PID | 
| protected double | portPropellerCommandcommanded 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 boolean | speedControlResettrue if a new speed was specified this loop | 
| protected double | speedErrorspeed error (difference between actual and commanded speed in meters per second) | 
| protected double | stbdPropellerCommandcommanded starboard propeller command | 
| protected double | sternLateralThrusterCommandcommanded stern lateral thruster setting. | 
| protected double | sternVerticalThrusterCommandcommanded stern vertical thruster setting. | 
| protected double | thetaCommandcommanded pitch -- may or may not be relevant for individual inheriting control modes | 
| protected double | THRUSTCONVERSIONTODO what is this? | 
| protected double | turningRpmrpm propellers turn at when adjusting without rudder | 
| protected UuvExecution | uuvExecutionreference to main class of this uuv | 
| protected double | zCommandcommanded z position | 
| Constructor and Description | 
|---|
| UuvController(UuvExecution execution)Creates a new instance of Controller | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | adjustPropellersForSteeringIfNoRudders()Adjusts the required propeller settings if needed | 
| protected boolean | checkRudderAvailable()Checks control coefficients to determine if rudder is available. | 
| abstract void | computeControls()computes auv controls based on type of controller and current state/command | 
| protected void | computeLateralThrusterCommands()Computes the fin settings to maintain commanded heading | 
| protected void | computePropellerCommands()Computes the required propeller settings | 
| protected void | computeRudderCommands()Computes the rudder setting to maintain a commanded heading,
 can be overridden by inheriting classes if different behavior is desired. | 
| protected void | computeVerticalThrusterCommands()Computes and applies vertical thruster settings for depth control | 
| double | getBowLateralThrusterCommand() | 
| double | getCrossTrackError() | 
| double | getPortPropellerCommand() | 
| double | getPsiCommand() | 
| double | getRudderCommand() | 
| double | getSpeedCommand() | 
| double | getStbdPropellerCommand() | 
| double | getSternLateralThrusterCommand() | 
| double | getThetaCommand() | 
| boolean | isClosedLoopSpeed() | 
| void | readControls()read uuv controls from an external source, default implementation is to compute them | 
| void | setCommandedSpeed(double speed) | 
| void | setControls()applies the computed control settings for the rudder, propellers, and lateral body thrusters | 
| protected void | setPropellersRPM(double portCommand,
                double stbdCommand)Set propellers RPM (will automatically clamp to allowed limits) | 
| void | unsetClosedLoopSpeed()Turns off closed loop speed control and uses fixed-speed prop control | 
| protected void | updateCrossTrackError()Computes the current crossTrackError and alongTrackRange in order to steer towards goal destination, also computes psierror | 
protected final double THRUSTCONVERSION
protected UuvExecution uuvExecution
protected boolean speedControlReset
protected final double pdOnlyTime
protected double speedError
protected double bowLateralThrusterCommand
protected double sternLateralThrusterCommand
protected double rudderCommand
protected double portPropellerCommand
protected double stbdPropellerCommand
protected double psiCommand
protected double thetaCommand
protected double crossTrackError
protected double alongTrackRange
protected double offTrackAngleDegrees
protected double psiError
protected boolean correctToTrack
protected double depthPidTime
protected double depthError
protected double depthErrorIntegral
protected final double MAXDEPTHERROR
protected double bowVerticalThrusterCommand
protected double sternVerticalThrusterCommand
protected double zCommand
protected double turningRpm
protected boolean openLoopHeading
public UuvController(UuvExecution execution)
execution - UuvExecution instancepublic double getBowLateralThrusterCommand()
public double getCrossTrackError()
public double getPortPropellerCommand()
public double getSpeedCommand()
public boolean isClosedLoopSpeed()
public double getPsiCommand()
public double getRudderCommand()
public double getStbdPropellerCommand()
public double getSternLateralThrusterCommand()
public double getThetaCommand()
public void setCommandedSpeed(double speed)
speed - meters per second being commandedpublic void unsetClosedLoopSpeed()
public abstract void computeControls()
public void readControls()
protected void updateCrossTrackError()
protected boolean checkRudderAvailable()
protected void computeRudderCommands()
protected void computeLateralThrusterCommands()
protected void computeVerticalThrusterCommands()
protected void computePropellerCommands()
protected void adjustPropellersForSteeringIfNoRudders()
protected void setPropellersRPM(double portCommand,
                    double stbdCommand)
portCommand - RPMstbdCommand - RPMpublic void setControls()