|
|||||||||
| 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_CircularInstrument<Altitude>
uavsim.graphics.instruments.verticalspeedindicator.VerticalSpeedIndicator
public class VerticalSpeedIndicator
Defines a vertical speed indicator.
| Field Summary | |
|---|---|
private Altitude |
_altitudePrevious
the altitude at the previous sample |
private Altitude |
_rateOfChangeAverage
the average rate of change in altitude |
private Time |
_timePrevious
the time at the previous sample |
private static CircularFaceplateDescriptor<Altitude> |
FACEPLATE
the faceplate descriptor |
private static TickDescriptor<Altitude> |
MAJOR_TICKS
the major-ticks descriptor |
private static TickDescriptor<Altitude> |
MINOR_TICKS
the minor-ticks descriptor |
private static NeedleDescriptor |
NEEDLE
the needle descriptor |
private static NumberDescriptor<Altitude> |
NUMBERS
the numbers descriptor |
private static TextProperties |
NUMBERS_TEXT
the text properties of the numbers |
private static Altitude |
RATE_MAX
the maximum climb rate |
private static Altitude |
RATE_MIN
the maximum descent rate |
| Fields inherited from class uavsim.graphics.instruments.A_CircularInstrument |
|---|
_ringSize, DISK_COLOR, MOUNT_RING_COLOR, MOUNT_RING_INNER_SCALE |
| Fields inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
_canvasAnchor, _canvasSize, _graphics, _id |
| Constructor Summary | |
|---|---|
VerticalSpeedIndicator(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor)
Creates a vertical speed indicator. |
|
| Method Summary | |
|---|---|
Altitude |
getRateOfChange()
Gets the average rate of altitude change. |
AngleMathematical |
mapAngle_(Altitude rateOfChange)
Returns the angle corresponding to the value of a unit. |
void |
render(java.awt.Graphics graphics)
Renders the current state of the instrument. |
private void |
renderNeedle()
Renders the needle |
private void |
renderNumbers()
Renders the numbers. |
private void |
renderTicks()
Renders the major and minor ticks. |
private void |
sampleRateOfChange(Altitude altitude,
Time time)
Records an altitude entry to calculates the average rate of change per minute. |
java.lang.String |
toString()
|
void |
update(Altitude altitude,
Time time)
Updates the state of the instrument without rendering it. |
| Methods inherited from class uavsim.graphics.instruments.A_CircularInstrument |
|---|
mapAngle, renderDisk, renderMountRing |
| Methods inherited from class uavsim.graphics.instruments.A_Instrument |
|---|
getAnchor, getCanvasSize, getGraphics, getID, getParentComponent, handleControlCallback, 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 _altitudePrevious
private Altitude _rateOfChangeAverage
private Time _timePrevious
private static final CircularFaceplateDescriptor<Altitude> FACEPLATE
private static final TickDescriptor<Altitude> MAJOR_TICKS
private static final TickDescriptor<Altitude> MINOR_TICKS
private static final NeedleDescriptor NEEDLE
private static final NumberDescriptor<Altitude> NUMBERS
private static final TextProperties NUMBERS_TEXT
private static final Altitude RATE_MAX
private static final Altitude RATE_MIN
| Constructor Detail |
|---|
public VerticalSpeedIndicator(java.lang.String id,
int canvasSize,
CoordinateCartesianAbsolute canvasAnchor)
id - - the unique instrument identifiercanvasSize - - the square size of the instrument footprint in pixelscanvasAnchor - - the anchor position for the center of the canvas in pixels| Method Detail |
|---|
public Altitude getRateOfChange()
public AngleMathematical mapAngle_(Altitude rateOfChange)
rateOfChange - - the unit
public void render(java.awt.Graphics graphics)
render in class A_CircularInstrument<Altitude>graphics - - the graphics contextprivate void renderNeedle()
private void renderNumbers()
private void renderTicks()
private void sampleRateOfChange(Altitude altitude,
Time time)
altitude - - the altitudetime - - the timepublic java.lang.String toString()
toString in class java.lang.Object
public void update(Altitude altitude,
Time time)
altitude - - the altitudetime - - the time
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||