public abstract class UavController extends VehicleController
| Modifier and Type | Field and Description | 
|---|---|
| protected static double | aileronCommandcommanded aileron setting | 
| protected double | alongTrackRangealong track range remaining to reach goal point | 
| protected boolean | correctToTrackset to true if path to waypoint is over a specific track (false for continuous to) | 
| protected double | crossTrackErrordistance (m) from the nearest point on the commanded track | 
| protected double | errorcurrent error in the value controlled by this controller | 
| protected double | errorIntegralintegral of the error of the value controlled by this controller | 
| protected double | maxIntegralmaximum value that the error integral will be allowed to reach | 
| protected double | offTrackAngleDegreesangle computed from arc tangent of alongTrackRange and crossTrackError | 
| protected double | pdOnlyTimeamount of time after a new command that control will only be PD (not PID) | 
| protected static double | powerCommandcommanded power setting. | 
| protected double | psiErrorangular offset in degrees from a commanded track | 
| protected boolean | resettrue if this is the constraints of this controller have been reset | 
| protected static double | rudderCommandcommanded rudder setting | 
| protected static double | stabilatorCommandcommanded stabilator setting | 
| protected double | timePIDControlvehicle time when control will switch from PD to PID (if applicable) | 
| protected static UavExecution | uavExecutionreference to main class of this uavExecution | 
| protected double | xCommandx position of the commanded waypoint | 
| protected double | xStartstarting point y position of the commanded track to the waypoint waypoint | 
| protected double | yCommandy position of the commanded waypoint | 
| protected double | yStartstarting point y position of the commanded track to the waypoint waypoint | 
| Constructor and Description | 
|---|
| UavController(UavExecution execution)Creates a new instance of Controller | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract void | computeControls()computes uavExecution controls based on type of controller and current state/command | 
| void | setControls()applies the computed control settings for the rudder, propellers, and lateral body thrusters | 
| protected void | updateCrossTrackError()Computes the current crosstrack error | 
protected static UavExecution uavExecution
protected boolean reset
protected static double powerCommand
protected static double rudderCommand
protected static double stabilatorCommand
protected static double aileronCommand
protected double pdOnlyTime
protected double timePIDControl
protected double error
protected double errorIntegral
protected double maxIntegral
protected double xCommand
protected double yCommand
protected double xStart
protected double yStart
protected boolean correctToTrack
protected double crossTrackError
protected double alongTrackRange
protected double offTrackAngleDegrees
protected double psiError
public UavController(UavExecution execution)
execution - instance of UavExecutionprotected void updateCrossTrackError()
public abstract void computeControls()
public void setControls()