|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjaron.gui.Panel
jaron.pde.ArtificialHorizon
public class ArtificialHorizon
The ArtificialHorizon
class provides a virtual horizon like device for
the Processing Development Environment.
It has two inputs for elevator and aileron deflection and two inputs for
pitch and roll angle. It usually gets the values for these inputs by another
object or objects through the EventListener
mechanism.
Reversing the effective direction for elevator, aileron, pitch and roll is done by
swapping the high and the low values of the corresponding signals.
Have a look at the example of the UAVsim
for the usage of the
ArtificialHorizon
.
Field Summary |
---|
Fields inherited from class jaron.gui.Panel |
---|
content, frame, labelBottom, labelLeft, labelRight, labelTop |
Constructor Summary | |
---|---|
ArtificialHorizon(processing.core.PApplet applet,
int left,
int top)
Creates a new ArtificialHorizon object for the Processing Development
Environment (PDE) at a certain position. |
|
ArtificialHorizon(processing.core.PApplet applet,
int left,
int top,
int width,
int height)
Creates a new ArtificialHorizon object for the Processing Development
Environment (PDE) at a certain position and with a certain width and height. |
Method Summary | |
---|---|
void |
draw()
Draws the artificial horizon to the screen. |
Signal |
getAileron()
Returns a reference to a Signal object containing a value that
represents the current deflection of the aileron. |
Signal |
getElevator()
Returns a reference to a Signal object containing a value that
represents the current deflection of the elevator. |
Signal |
getPitch()
Returns a reference to a Signal object containing a value that
represents the current pitch angle in degrees (not radians). |
Signal |
getRoll()
Returns a reference to a Signal object containing a value that
represents the current roll angle in degrees (not radians). |
void |
setDebug(java.lang.Boolean debug)
Sets the debugging flag which determines if the debugging informations should be printed to the console. |
void |
setMaxDeflection(int maxDeflection)
Sets the maximum deflection that is used for the conversion of the aileron/elevator values into degrees. |
Methods inherited from class jaron.gui.Panel |
---|
getContent, getFrame, getLabelBottom, getLabelLeft, getLabelRight, getLabelTop, setContent, setFrame, setLabelBottomHeight, setLabelLeftWidth, setLabelRightWidth, setLabelTopHeight |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArtificialHorizon(processing.core.PApplet applet, int left, int top, int width, int height)
ArtificialHorizon
object for the Processing Development
Environment (PDE) at a certain position and with a certain width and height.
applet
- a reference to the PDE applet that provides the drawing environmentleft
- the component's position from the lefttop
- the component's position from topheight
- the component's heightwidth
- the component's widthpublic ArtificialHorizon(processing.core.PApplet applet, int left, int top)
ArtificialHorizon
object for the Processing Development
Environment (PDE) at a certain position.
applet
- a reference to the PDE applet that provides the drawing environmentleft
- the component's position from the lefttop
- the component's position from topMethod Detail |
---|
public void draw()
draw
method of the Processing Development Environment. This
ensures that the horizon is updated periodically.
public Signal getAileron()
Signal
object containing a value that
represents the current deflection of the aileron.setHigh
and setLow
methods of the Signal class.
Signal
object containing the current aileron valueSignal
public Signal getElevator()
Signal
object containing a value that
represents the current deflection of the elevator.setHigh
and setLow
methods of the Signal class.
Signal
object containing the current elevator valueSignal
public Signal getPitch()
Signal
object containing a value that
represents the current pitch angle in degrees (not radians).
Signal
object containing the current pitch angleSignal
public Signal getRoll()
Signal
object containing a value that
represents the current roll angle in degrees (not radians).
Signal
object containing the current roll angleSignal
public void setDebug(java.lang.Boolean debug)
debug
- set to true
if additional debugging information
should be printedpublic void setMaxDeflection(int maxDeflection)
maxDeflection
- maximum deflection in degrees
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |