Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jflight.vario
Class Vario  view Vario download Vario.java

java.lang.Object
  extended byjflight.vario.Vario
Direct Known Subclasses:
BrVario

public abstract class Vario
extends java.lang.Object

Basic class for Vario-access; Implements only the basic, device-independent methods. The other functions are declared abstract and have to be defined in the derived class for a specific Vario. All these functions define the interface that is/can be used by the main class.
Interface for the Vario-class(es).
The data supplied by any Vario are expected to be at least these:
A series of height-data and (optionally) windspeed-data.
The data are collected at regular intervalls. The intervall is also supplied.
Start-and endtime are optional.
There may be marks (defining a certain time) which also may have a coordinate. These coordinate values don't make sense in this application (supplied by the GPS).

Notes:
- If no speeddata are available the first speedvalue is set to -1.
- Datavalues that were taken on the ground are marked with an offset of -1000 in the speedvalue (except the first one). This is done in the data used internally only, not in the stored values.

Tbd:
- How does mark-setting affect the regular intervalls? - What about US-style settings: feet / feet per minute?

Multiple sets of flightdata in the vario may be joined to a single flight. This is because there may be problems when switching to the backup battery. The missing height-data shall be interpolated assuming the time difference information is valid. The speed-data are set to the glider-default.
If windspeed data are available the Vario-flight-data may be shortened by the data before launch and after landing by setting a windspeed threshhold. This can be done alternativly / in addition using constant height (threshhold) too. Should be confirmed by the user. Note that such an operation has to be done anyhow to map the vario-and GPS-data later. The values removed are not really removed but marked by a windspeed of -1.

Device-independence: All Classes shall be designed in such a way that the main program using them can rely on a basic set of methods that are implemented by all implementations regardless of the real Vario-device used.

Since:
JDK1.1.x

Field Summary
static int APPEND
          mode for list-management
protected static int BAD_CRC
           
protected  jflight.model.BaroContainer baroCont
           
private  int bufSize
           
private  jflight.model.VarioData curVarioData
           
protected static int IO_NOT_INITIALIZED
           
protected  boolean ioInit
           
protected  java.io.InputStream is
           
protected  java.io.OutputStream os
           
private  int pid
           
static int REPLACE
          mode for list-management
protected static int SUCCESS
           
 
Constructor Summary
Vario()
          Initializes the datastructures.
 
Method Summary
 void deinitIOStreams()
          Clears the stream-infos.
protected  void delay(int milli)
          delays some milliseconds *
abstract  int getBarogram(int flightNumber)
          Get a single barogram.
abstract  int getFlightBook()
          Get the flightbook from the vario
 void initIOStreams(java.io.InputStream is, java.io.OutputStream os)
          Stores the stream to use for Vario access.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPLACE

public static final int REPLACE
mode for list-management

See Also:
Constant Field Values

APPEND

public static final int APPEND
mode for list-management

See Also:
Constant Field Values

SUCCESS

protected static final int SUCCESS
See Also:
Constant Field Values

BAD_CRC

protected static final int BAD_CRC
See Also:
Constant Field Values

IO_NOT_INITIALIZED

protected static final int IO_NOT_INITIALIZED
See Also:
Constant Field Values

ioInit

protected boolean ioInit

os

protected java.io.OutputStream os

is

protected java.io.InputStream is

pid

private int pid

bufSize

private int bufSize

curVarioData

private jflight.model.VarioData curVarioData

baroCont

protected jflight.model.BaroContainer baroCont
Constructor Detail

Vario

public Vario()
Initializes the datastructures.

Method Detail

getBarogram

public abstract int getBarogram(int flightNumber)
                         throws java.io.IOException
Get a single barogram. The flight may be specified by a number, if the Vario supports this. Otherwise it is ignored. Bufer 0 is used.
tbd: add mode-flag for append-mode


getFlightBook

public abstract int getFlightBook()
Get the flightbook from the vario


initIOStreams

public void initIOStreams(java.io.InputStream is,
                          java.io.OutputStream os)
Stores the stream to use for Vario access.


deinitIOStreams

public void deinitIOStreams()
Clears the stream-infos.


delay

protected void delay(int milli)
delays some milliseconds *