|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
jaron.autopilot.FlightGearMotionSensor
public class FlightGearMotionSensor
The FlightGearMotionSensor
connects to the FlightGear flight
simulator and provides its motion data.
FlightGearMotionSensor
runs as a thread and by instantiating it
waits for the incoming connection from FG (at port 5555 by
default).
The instantiating has to be done before FG starts up, or else
FG reports a connection error and terminates.
Be aware that running FG and a Java application that uses the
FlightGearMotionSensor
needs a computer with sufficient performance.
The consequence of a lack of performance is, that some of the data sent by FG
could be lost because of timing issues. In this case you could run FG and the
Java application on two different machines via a network connection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
DEFAULT_PORT
The default port that is used for the incoming connection. |
static float |
DEFAULT_UPDATE_FREQUENCY
The default update frequency of the FlightGearGpsReceiver
is set to 10.0f Hz. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
FlightGearMotionSensor()
Creates a new FlightGearMotionSensor and starts a Thread
that listens for incoming connections. |
|
FlightGearMotionSensor(int port)
Creates a new FlightGearMotionSensor and starts a Thread
that listens for incoming connections. |
Method Summary | |
---|---|
Signal |
getAirSpeed()
Returns the airspeed signal which is used for the event handling mechanism. |
Signal |
getPitchAngle()
Returns the pitch angle signal which is used for the event handling mechanism. |
Signal |
getPitchAngularRate()
Returns the angular pitch rate signal which is used for the event handling mechanism. |
Signal |
getRollAngle()
Returns the roll angle signal which is used for the event handling mechanism. |
Signal |
getRollAngularRate()
Returns the angular roll rate signal which is used for the event handling mechanism. |
Signal |
getVerticalSpeed()
Returns the vertical speed signal which is used for the event handling mechanism. |
Signal |
getYawAngularRate()
Returns the angular yaw rate signal which is used for the event handling mechanism. |
void |
run()
|
void |
setUpdateFrequency(float updateFrequency)
Sets the update frequency for the FlightGearMotionSensor . |
void |
shutDown()
Disconnects the FlightGear client. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float DEFAULT_UPDATE_FREQUENCY
FlightGearGpsReceiver
is set to 10.0f Hz.
public static final int DEFAULT_PORT
Constructor Detail |
---|
public FlightGearMotionSensor(int port)
FlightGearMotionSensor
and starts a Thread
that listens for incoming connections.
port
- the port the receiver listens topublic FlightGearMotionSensor()
FlightGearMotionSensor
and starts a Thread
that listens for incoming connections. It listens on the default port
DEFAULT_PORT
.
DEFAULT_PORT
Method Detail |
---|
public Signal getPitchAngle()
Signal
public Signal getRollAngle()
Signal
public Signal getAirSpeed()
Signal
public Signal getVerticalSpeed()
Signal
public Signal getPitchAngularRate()
Signal
public Signal getRollAngularRate()
Signal
public Signal getYawAngularRate()
Signal
public void setUpdateFrequency(float updateFrequency)
FlightGearMotionSensor
.
updateFrequency
- the new frequency in Hzpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void shutDown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |