com.raben.telescope.comm
Class MeadeTelescope

java.lang.Object
  |
  +--com.raben.telescope.comm.MeadeTelescope
All Implemented Interfaces:
TelescopeInterface

public class MeadeTelescope
extends java.lang.Object
implements TelescopeInterface

Implementation of the telescope interface for Meade LX200

Version:
$Revision: 1.3 $ $Date: 2003/09/11 15:59:52 $ ISSUE - under construction - not all methods implemented - not debugged - not tested - DO NOT USE
Author:
Vern Raben

Constructor Summary
MeadeTelescope()
          Creates a new instance of MeadeLx200
 
Method Summary
 void cancelGoTo()
          Cancel current GoTo command
 void close()
          Close connection to telescope
 void connect()
          Initialize connection to telescope
 java.awt.geom.Point2D getAzimuthAltitude()
          Get current coordinate
 java.awt.geom.Point2D getGpsCoordinate()
          Get telescope coordinate from GPS interface
 java.util.Calendar getGpsDateTime()
          Get Calendar date from GPS interface
 java.lang.String getHandControlVersion()
          Get controller version
 java.lang.String getPortName()
          Get port being used
 java.util.Properties getProperties()
          Get telescope properties
 java.awt.geom.Point2D getRightAscensionDeclination()
          Get current equatorial coordinate
 TelescopeModel getTelescopeModel()
          Get telescope model
 void goToAzimuthAltitude(java.awt.geom.Point2D coordinate)
          GoTo the specified coordinate in azimuth and altitude
 void goToRightAscensionDeclination(java.awt.geom.Point2D coordinate)
          Go to the specified coordinate in right ascension/declination
 boolean isAligned()
          Check if telescope is aligned
 boolean isCommunicating()
          Check if telescope is communitating with serial port
 boolean isConnected()
          Check if telescope is connected
 boolean isDebug()
          Get debug flag
 boolean isGpsLinked()
          Check if GPS is linked
 boolean isSlewing()
          Check if telescope is slewing
 void moveInAltitude(boolean direction, int rate)
          Move telescope in altitude
 void moveInAzimuth(boolean direction, int rate)
          Move telescope in azimuth
 void setAltitudeTrackingRate(int trackRate)
          Set altitude tracking rate
 void setAzimuthTrackingRate(int trackRate)
          Set azimuth tracking rate Note - tracking will return to default in approximately 20 seconds unless tracking is turned off @see setTrackingMode
 void setDebug(boolean debug)
          Set debug flag
 void setEncodingType(int type)
          Set type of encoding used
 void setPortName(java.lang.String port)
          Set port to use for connection
 void setProperties(java.util.Properties props)
          Set telescope properties
 void setTelescopeModel(TelescopeModel model)
          Set the telescope model
 void setTrackingMode(int mode)
          Set telescope tracking mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeadeTelescope

public MeadeTelescope()
Creates a new instance of MeadeLx200

Method Detail

cancelGoTo

public void cancelGoTo()
                throws java.io.IOException
Cancel current GoTo command

Specified by:
cancelGoTo in interface TelescopeInterface
Throws:
java.io.IOException - may be thrown

close

public void close()
Close connection to telescope

Specified by:
close in interface TelescopeInterface

getAzimuthAltitude

public java.awt.geom.Point2D getAzimuthAltitude()
                                         throws java.io.IOException
Get current coordinate

Specified by:
getAzimuthAltitude in interface TelescopeInterface
Returns:
Horizon coordinate (azimuth and altitude in degrees)
Throws:
java.io.IOException - may occur

getGpsCoordinate

public java.awt.geom.Point2D getGpsCoordinate()
                                       throws java.io.IOException
Get telescope coordinate from GPS interface

Specified by:
getGpsCoordinate in interface TelescopeInterface
Returns:
Geographic coordinate of telescope in degrees may be null
Throws:
java.io.IOException - may occur ISSUE - not implemented

getGpsDateTime

public java.util.Calendar getGpsDateTime()
                                  throws java.io.IOException
Get Calendar date from GPS interface

Specified by:
getGpsDateTime in interface TelescopeInterface
Returns:
Calendar may be null
Throws:
java.io.IOException - may occur ISSUE - Not implemented

getHandControlVersion

public java.lang.String getHandControlVersion()
                                       throws java.io.IOException
Get controller version

Specified by:
getHandControlVersion in interface TelescopeInterface
Returns:
String
Throws:
java.io.IOException - may occur ISSUE - not implemented

getPortName

public java.lang.String getPortName()
Get port being used

Returns:
String (default is COM1)

getRightAscensionDeclination

public java.awt.geom.Point2D getRightAscensionDeclination()
                                                   throws java.io.IOException
Get current equatorial coordinate

Specified by:
getRightAscensionDeclination in interface TelescopeInterface
Returns:
Coordinate in right ascension declination
Throws:
java.io.IOException - may occur

goToAzimuthAltitude

public void goToAzimuthAltitude(java.awt.geom.Point2D coordinate)
                         throws java.io.IOException
GoTo the specified coordinate in azimuth and altitude

Specified by:
goToAzimuthAltitude in interface TelescopeInterface
Parameters:
coordinate - in azimuth and altitude
Throws:
java.io.IOException - may occur ISSUE - not implemented

goToRightAscensionDeclination

public void goToRightAscensionDeclination(java.awt.geom.Point2D coordinate)
                                   throws java.io.IOException
Go to the specified coordinate in right ascension/declination

Specified by:
goToRightAscensionDeclination in interface TelescopeInterface
Parameters:
coordinate - in right ascension and declination
Throws:
java.io.IOException - may occur ISSUE - not implemented

connect

public void connect()
             throws java.io.IOException
Initialize connection to telescope

Specified by:
connect in interface TelescopeInterface
Throws:
java.io.IOException - may occur

isConnected

public boolean isConnected()
Check if telescope is connected

Specified by:
isConnected in interface TelescopeInterface
Returns:
true if connected

isAligned

public boolean isAligned()
                  throws java.io.IOException
Check if telescope is aligned

Specified by:
isAligned in interface TelescopeInterface
Returns:
True if telescope is aligned, false otherwise
Throws:
java.io.IOException - may occur ISSUE - Not implemented

isCommunicating

public boolean isCommunicating()
                        throws java.io.IOException
Check if telescope is communitating with serial port

Specified by:
isCommunicating in interface TelescopeInterface
Returns:
True if communication was successful, false otherwise
Throws:
java.io.IOException - may occur ISSUE - not implemented

isGpsLinked

public boolean isGpsLinked()
                    throws java.io.IOException
Check if GPS is linked

Specified by:
isGpsLinked in interface TelescopeInterface
Returns:
boolean true if GPS is linked, false otherwise
Throws:
java.io.IOException - may occur ISSUE - not implemented

isSlewing

public boolean isSlewing()
                  throws java.io.IOException
Check if telescope is slewing

Specified by:
isSlewing in interface TelescopeInterface
Returns:
True if slewing, false otherwise
Throws:
java.io.IOException - may occur ISSUE - not implemented

setEncodingType

public void setEncodingType(int type)
                     throws java.io.IOException
Set type of encoding used

Parameters:
type - 0=Nexstar 5,8 and original GT type 1=Nexstar GPS and new GTs (16 bit precision) type 2=Nexstar GPS (32 bit precision)
Throws:
java.io.IOException - may occur ISSUE - not implemented

setPortName

public void setPortName(java.lang.String port)
Set port to use for connection

Parameters:
port - Name of port (default is COM1)

setTrackingMode

public void setTrackingMode(int mode)
                     throws java.io.IOException
Set telescope tracking mode

Specified by:
setTrackingMode in interface TelescopeInterface
Parameters:
mode - Tracking mode (0=off,1=alt-az,2=eq-n,3=eq-s)
Throws:
java.io.IOException - may occur ISSUE - doesn't distinguish between N/S polar mode how does meade do this?

getTelescopeModel

public TelescopeModel getTelescopeModel()
Get telescope model

Specified by:
getTelescopeModel in interface TelescopeInterface
Returns:
TelescopeModel

setTelescopeModel

public void setTelescopeModel(TelescopeModel model)
Set the telescope model

Specified by:
setTelescopeModel in interface TelescopeInterface
Parameters:
model - of telescope @see TelescopeModel ISSUE - generic Meade model not implemented

getProperties

public java.util.Properties getProperties()
Get telescope properties

Specified by:
getProperties in interface TelescopeInterface
Returns:
Properties

setProperties

public void setProperties(java.util.Properties props)
Set telescope properties

Specified by:
setProperties in interface TelescopeInterface
Parameters:
props - Properties for setting up telescope such as comm port, baud rate etc, refer to javadoc for particular manufacture

isDebug

public boolean isDebug()
Get debug flag

Specified by:
isDebug in interface TelescopeInterface
Returns:
boolean

setDebug

public void setDebug(boolean debug)
Set debug flag

Specified by:
setDebug in interface TelescopeInterface
Parameters:
debug - True if debug mode is to be set

setAzimuthTrackingRate

public void setAzimuthTrackingRate(int trackRate)
                            throws java.io.IOException
Set azimuth tracking rate Note - tracking will return to default in approximately 20 seconds unless tracking is turned off @see setTrackingMode

Specified by:
setAzimuthTrackingRate in interface TelescopeInterface
Parameters:
trackRate - in arc-sec/sec
Throws:
java.io.IOException - may occur

setAltitudeTrackingRate

public void setAltitudeTrackingRate(int trackRate)
                             throws java.io.IOException
Set altitude tracking rate

Specified by:
setAltitudeTrackingRate in interface TelescopeInterface
Parameters:
trackRate - in arc-sec/sec
Throws:
java.io.IOException - may occur ISSUE - Not implemented

moveInAltitude

public void moveInAltitude(boolean direction,
                           int rate)
                    throws java.io.IOException
Move telescope in altitude

Specified by:
moveInAltitude in interface TelescopeInterface
Parameters:
direction - 0=up, 1=down
rate - 0=stop, 1=slow to 9=fast
java.io.IOException

moveInAzimuth

public void moveInAzimuth(boolean direction,
                          int rate)
                   throws java.io.IOException
Move telescope in azimuth

Specified by:
moveInAzimuth in interface TelescopeInterface
Parameters:
direction - false = left, true = right
rate - 0=stop,1=slow to 9=fast
java.io.IOException


Copyright © 2003 Raben Systems, Inc.. All Rights Reserved.