public abstract class UavController extends VehicleController
Modifier and Type | Field and Description |
---|---|
protected static double |
aileronCommand
commanded aileron setting
|
protected double |
alongTrackRange
along track range remaining to reach goal point
|
protected boolean |
correctToTrack
set to true if path to waypoint is over a specific track (false for continuous to)
|
protected double |
crossTrackError
distance (m) from the nearest point on the commanded track
|
protected double |
error
current error in the value controlled by this controller
|
protected double |
errorIntegral
integral of the error of the value controlled by this controller
|
protected double |
maxIntegral
maximum value that the error integral will be allowed to reach
|
protected double |
offTrackAngleDegrees
angle computed from arc tangent of alongTrackRange and crossTrackError
|
protected double |
pdOnlyTime
amount of time after a new command that control will only be PD (not PID)
|
protected static double |
powerCommand
commanded power setting.
|
protected double |
psiError
angular offset in degrees from a commanded track
|
protected boolean |
reset
true if this is the constraints of this controller have been reset
|
protected static double |
rudderCommand
commanded rudder setting
|
protected static double |
stabilatorCommand
commanded stabilator setting
|
protected double |
timePIDControl
vehicle time when control will switch from PD to PID (if applicable)
|
protected static UavExecution |
uavExecution
reference to main class of this uavExecution
|
protected double |
xCommand
x position of the commanded waypoint
|
protected double |
xStart
starting point y position of the commanded track to the waypoint waypoint
|
protected double |
yCommand
y position of the commanded waypoint
|
protected double |
yStart
starting 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()