|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.graphics.instruments.A_Instrument
uavsim.graphics.instruments.A_RectangularInstrument
uavsim.graphics.instruments.autopilot.Autopilot
public class Autopilot
Defines an autopilot selector with altitude and heading hold. Altitude is selected here; heading comes from a directional gyro.
| Field Summary | |
|---|---|
private Altitude |
_altitude
the desired altitude |
private PushButton |
_buttonEnable
the enable pushbutton |
private static ButtonProperties |
_buttonEnableProperties
the enable-button properties |
private A_DirectionalGyro |
_directionalGyro
the directional gyro providing the heading hold |
private boolean |
_isEngaged
whether the autopilot is engaged |
private Knob |
_knobPrimary
the primary knob for setting the altitude |
private static KnobProperties |
_knobPrimaryProperties
the primary-knob properties |
private Knob |
_knobSecondary
the secondary knob for setting the altitude |
private static KnobProperties |
_knobSecondaryProperties
the secondary-knob properties |
private static CoordinateCartesianRelative |
ALTITUDE_DISPLAY_ANCHOR_SCALE
the anchor position of the altitude text relative to the center of the instrument |
private static Altitude |
ALTITUDE_MAX
the maximum altitude |
private static TextProperties |
ALTITUDE_TEXT
the text properties of the altitude |
private static CoordinateCartesianRelative |
ALTITUDE_WINDOW_ANCHOR_SCALE
the anchor position of the altitude window relative to the center of the instrument |
private static java.awt.Color |
ALTITUDE_WINDOW_BODY_COLOR
the color of the altitude window body |
private static java.awt.Color |
ALTITUDE_WINDOW_OUTLINE_COLOR
the color of the altitude window outline |
private static Scaler |
ALTITUDE_WINDOW_OUTLINE_SCALE
the size scale of the window outline relative to the instrument size |
private static ScalerPair |
ALTITUDE_WINDOW_SIZE_SCALE
the size scale of the window relative to the instrument size |
private static TextProperties |
BUTTON_LABEL_PROPERTIES
the text properties of the button label |
private static java.awt.Color |
COLOR_DISENGAGED
the color of the engage button indicating that the autpilot is disengaged |
private static java.awt.Color |
COLOR_ENGAGED
the color of the engage button indicating that the autpilot is engaged |
private static RectangularFaceplaceDescriptor |
FACEPLATE
the faceplace |
private static TextProperties |
KNOB_LABEL_PROPERTIES
the text properties of the knob label |
private static Altitude |
KNOB_PRIMARY_STEP
the major change in altitude caused by adjusting the primary knob |
private static Altitude |
KNOB_SECONDARY_STEP
the minor change in altitude caused by adjusting the primary knob |
| Fields inherited from class uavsim.graphics.instruments.A_RectangularInstrument |
|---|
_faceplaceDescriptor, _faceSize |
| Fields inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
_canvasAnchor, _canvasSize, _graphics, _id |
| Constructor Summary | |
|---|---|
Autopilot(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor,
A_DirectionalGyro directionalGyro)
Creates an autopilot control. |
|
| Method Summary | |
|---|---|
private void |
configureControls()
Configures the controls. |
Altitude |
getAltitude()
Gets the azimuth. |
void |
handleControlCallback(ControlCallbackEvent event)
Handles an event from a registered control. |
boolean |
isEngaged()
Returns whether the autopilot is engaged. |
void |
render(java.awt.Graphics graphics)
Renders the current state of the instrument. |
private void |
renderAltitudeWindow()
Renders the altitude window. |
private void |
renderControls()
Renders the controls. |
java.lang.String |
toString()
|
| Methods inherited from class uavsim.graphics.instruments.A_RectangularInstrument |
|---|
getFaceSize, renderBox |
| Methods inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
getAnchor, getCanvasSize, getGraphics, getID, getParentComponent, hasControls, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, refresh, registerControl, setCanvasAnchor, setCanvasSize, setParentComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Altitude _altitude
private final PushButton _buttonEnable
private static final ButtonProperties _buttonEnableProperties
private final A_DirectionalGyro _directionalGyro
private boolean _isEngaged
private final Knob _knobPrimary
private static final KnobProperties _knobPrimaryProperties
private final Knob _knobSecondary
private static final KnobProperties _knobSecondaryProperties
private static final CoordinateCartesianRelative ALTITUDE_DISPLAY_ANCHOR_SCALE
private static final Altitude ALTITUDE_MAX
private static final TextProperties ALTITUDE_TEXT
private static final CoordinateCartesianRelative ALTITUDE_WINDOW_ANCHOR_SCALE
private static final java.awt.Color ALTITUDE_WINDOW_BODY_COLOR
private static final java.awt.Color ALTITUDE_WINDOW_OUTLINE_COLOR
private static final Scaler ALTITUDE_WINDOW_OUTLINE_SCALE
private static final ScalerPair ALTITUDE_WINDOW_SIZE_SCALE
private static final TextProperties BUTTON_LABEL_PROPERTIES
private static final java.awt.Color COLOR_DISENGAGED
private static final java.awt.Color COLOR_ENGAGED
private static final RectangularFaceplaceDescriptor FACEPLATE
private static final TextProperties KNOB_LABEL_PROPERTIES
private static final Altitude KNOB_PRIMARY_STEP
private static final Altitude KNOB_SECONDARY_STEP
| Constructor Detail |
|---|
public Autopilot(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor,
A_DirectionalGyro directionalGyro)
id - - the unique instrument identifiercanvasSize - - the square size of the instrument footprint in pixelscanvasAnchor - - the anchor position for the center of the canvas in pixelsdirectionalGyro - - the directional gyro providing the desired course| Method Detail |
|---|
private void configureControls()
public Altitude getAltitude()
public void handleControlCallback(ControlCallbackEvent event)
handleControlCallback in class A_Instrumentevent - - the callback eventpublic boolean isEngaged()
public void render(java.awt.Graphics graphics)
render in class A_RectangularInstrumentgraphics - - the graphics contextprivate void renderAltitudeWindow()
private void renderControls()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||