JSci.astro.telescope
Class LX200

java.lang.Object
  extended byJSci.astro.telescope.LX200

public final class LX200
extends java.lang.Object


Field Summary
static int FOCUS_FAST
          Focus rates.
static int FOCUS_IN
          Focus directions.
static int FOCUS_OUT
           
static int FOCUS_SLOW
           
static int SLEW_CENTER
           
static int SLEW_EAST
           
static int SLEW_FIND
           
static int SLEW_GUIDE
           
static int SLEW_NORTH
          Slew directions.
static int SLEW_SLEW
          Slew rates.
static int SLEW_SOUTH
           
static int SLEW_WEST
           
 
Constructor Summary
LX200(java.lang.String port)
          Constructs an LX200 object.
 
Method Summary
static float altToFloat(java.lang.String alt)
          Convert alt from a string to a number.
static float azToFloat(java.lang.String az)
          Convert az from a string to a number.
 boolean checkPosition(float ra, float dec)
          Checks the scope's position.
 void close()
          Closes the connection to the scope.
static float decToFloat(java.lang.String dec)
          Convert dec from a string to a number.
 java.lang.String getAlt()
          Returns the current alt.
 java.lang.String getAz()
          Returns the current az.
 java.lang.String getDec()
          Returns the current dec.
 java.lang.String getLocalTime()
          Returns the local time.
 java.lang.String getRA()
          Returns the current RA.
 boolean isMoving()
          Check whether the scope is moving.
static float raToFloat(java.lang.String ra)
          Convert RA from a string to a number.
 void setFocusRate(int rate)
          Set focus rate.
 void setHighPrecision(boolean setHigh)
          Sets high precision.
 boolean setLocalTime(java.lang.String time)
          Sets the local time.
 void setLongFormat(boolean setLong)
          Sets long format.
 boolean setObjectCoords(java.lang.String ra, java.lang.String dec)
          Sets the object/target coordinates.
 void setSlewRate(int rate)
          Set slew rate.
 int slewToObject()
          Slew to the object coordinates.
 void startFocus(int direction)
          Start focus.
 void startSlew(int direction)
          Start slewing the scope.
 void stopFocus()
          Stop focus.
 void stopSlew(int direction)
          Stop slewing the scope.
 void syncCoords()
          Synchronize the scope coordinates to the object coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOCUS_FAST

public static final int FOCUS_FAST
Focus rates.

See Also:
Constant Field Values

FOCUS_SLOW

public static final int FOCUS_SLOW
See Also:
Constant Field Values

FOCUS_IN

public static final int FOCUS_IN
Focus directions.

See Also:
Constant Field Values

FOCUS_OUT

public static final int FOCUS_OUT
See Also:
Constant Field Values

SLEW_SLEW

public static final int SLEW_SLEW
Slew rates.

See Also:
Constant Field Values

SLEW_FIND

public static final int SLEW_FIND
See Also:
Constant Field Values

SLEW_CENTER

public static final int SLEW_CENTER
See Also:
Constant Field Values

SLEW_GUIDE

public static final int SLEW_GUIDE
See Also:
Constant Field Values

SLEW_NORTH

public static final int SLEW_NORTH
Slew directions.

See Also:
Constant Field Values

SLEW_EAST

public static final int SLEW_EAST
See Also:
Constant Field Values

SLEW_SOUTH

public static final int SLEW_SOUTH
See Also:
Constant Field Values

SLEW_WEST

public static final int SLEW_WEST
See Also:
Constant Field Values
Constructor Detail

LX200

public LX200(java.lang.String port)
Constructs an LX200 object.

Method Detail

raToFloat

public static float raToFloat(java.lang.String ra)
Convert RA from a string to a number.


decToFloat

public static float decToFloat(java.lang.String dec)
Convert dec from a string to a number.


altToFloat

public static float altToFloat(java.lang.String alt)
Convert alt from a string to a number.


azToFloat

public static float azToFloat(java.lang.String az)
Convert az from a string to a number.


setHighPrecision

public void setHighPrecision(boolean setHigh)
                      throws java.io.IOException
Sets high precision.

Throws:
java.io.IOException

setLongFormat

public void setLongFormat(boolean setLong)
                   throws java.io.IOException
Sets long format.

Throws:
java.io.IOException

setFocusRate

public void setFocusRate(int rate)
                  throws java.io.IOException
Set focus rate.

Throws:
java.io.IOException

startFocus

public void startFocus(int direction)
                throws java.io.IOException
Start focus.

Throws:
java.io.IOException

stopFocus

public void stopFocus()
               throws java.io.IOException
Stop focus.

Throws:
java.io.IOException

setSlewRate

public void setSlewRate(int rate)
                 throws java.io.IOException
Set slew rate.

Throws:
java.io.IOException

startSlew

public void startSlew(int direction)
               throws java.io.IOException
Start slewing the scope.

Parameters:
direction - the direction to start slewing in.
Throws:
java.io.IOException

stopSlew

public void stopSlew(int direction)
              throws java.io.IOException
Stop slewing the scope.

Parameters:
direction - the direction to stop slewing in.
Throws:
java.io.IOException

getRA

public java.lang.String getRA()
                       throws java.io.IOException
Returns the current RA.

Throws:
java.io.IOException

getDec

public java.lang.String getDec()
                        throws java.io.IOException
Returns the current dec.

Throws:
java.io.IOException

getAlt

public java.lang.String getAlt()
                        throws java.io.IOException
Returns the current alt.

Throws:
java.io.IOException

getAz

public java.lang.String getAz()
                       throws java.io.IOException
Returns the current az.

Throws:
java.io.IOException

setObjectCoords

public boolean setObjectCoords(java.lang.String ra,
                               java.lang.String dec)
                        throws java.io.IOException
Sets the object/target coordinates.

Throws:
java.io.IOException

slewToObject

public int slewToObject()
                 throws java.io.IOException
Slew to the object coordinates.

Returns:
0 if slew is possible, 1 if object is below the horizon, 2 if object is below the higher.
Throws:
java.io.IOException

checkPosition

public boolean checkPosition(float ra,
                             float dec)
                      throws java.io.IOException
Checks the scope's position.

Parameters:
ra - RA to check against.
dec - dec to check against.
Throws:
java.io.IOException

isMoving

public boolean isMoving()
                 throws java.io.IOException
Check whether the scope is moving.

Throws:
java.io.IOException

getLocalTime

public java.lang.String getLocalTime()
                              throws java.io.IOException
Returns the local time.

Throws:
java.io.IOException

setLocalTime

public boolean setLocalTime(java.lang.String time)
                     throws java.io.IOException
Sets the local time.

Throws:
java.io.IOException

syncCoords

public void syncCoords()
                throws java.io.IOException
Synchronize the scope coordinates to the object coordinates.

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes the connection to the scope.

Throws:
java.io.IOException