com.raben.telescope.comm
Class CelestronCommand

java.lang.Object
  |
  +--com.raben.telescope.comm.CelestronCommand

public class CelestronCommand
extends java.lang.Object

Facade to generate command string for various Celestron telescope models

Author:
Vern Raben

Constructor Summary
CelestronCommand()
          Creates a new instance of CelestronCommandAdapter
 
Method Summary
 java.lang.String alignmentComplete()
          Get alignment complete command
 java.lang.String cancelGoTo()
          Get cancel goto command
 void decodeHexadecimal(java.lang.String str, java.awt.geom.Point2D coord)
          Decode hexadecimal string to coordinate
 java.lang.String getAzimuthAltitude()
          Get azimuth/altitude command
 java.lang.String getRightAscensionDeclination()
          Get right ascension/declination command
 TelescopeModel getTelescopeModel()
          Get telescope model
 java.lang.String goToAzimuthAltitude(double azimuth, double altitude)
          Get goto azimuth and altitude command string
 java.lang.String goToRightAscensionDeclination(double ra, double decl)
          Get GoTo right ascension declination command string
 java.lang.String handControlVersion()
          Get hand control version command
 boolean isHighPrecision()
          Check if high precision coordinates are set
 void setHighPrecision(boolean highPrecision)
          Set whether high precision mode should be used (ISSUE - what if high precision not available)
 void setTelescopeModel(TelescopeModel model)
          Set telescope model
 java.lang.String trackingMode(int mode)
          Get tracking mode command string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CelestronCommand

public CelestronCommand()
Creates a new instance of CelestronCommandAdapter

Method Detail

setTelescopeModel

public void setTelescopeModel(TelescopeModel model)
Set telescope model

Parameters:
model - Telescope model

getTelescopeModel

public TelescopeModel getTelescopeModel()
Get telescope model

Returns:
The telescope model

setHighPrecision

public void setHighPrecision(boolean highPrecision)
Set whether high precision mode should be used (ISSUE - what if high precision not available)

Parameters:
highPrecision - True if high precision coordinates

isHighPrecision

public boolean isHighPrecision()
Check if high precision coordinates are set

Returns:
true if high precision (24 bit) mode

goToAzimuthAltitude

public java.lang.String goToAzimuthAltitude(double azimuth,
                                            double altitude)
Get goto azimuth and altitude command string

Parameters:
azimuth - in degress (0 to 360)
altitude - in degrees (0 to 90)
Returns:
Command string for selected telescope model

goToRightAscensionDeclination

public java.lang.String goToRightAscensionDeclination(double ra,
                                                      double decl)
Get GoTo right ascension declination command string

Parameters:
ra - Right ascension in hours (0 to 24)
decl - Declination in degrees (-90 to 90)
Returns:
Command string for selected telescope model

getAzimuthAltitude

public java.lang.String getAzimuthAltitude()
Get azimuth/altitude command

Returns:
String containing command to get azimuth/altitude

getRightAscensionDeclination

public java.lang.String getRightAscensionDeclination()
Get right ascension/declination command

Returns:
Command string

decodeHexadecimal

public void decodeHexadecimal(java.lang.String str,
                              java.awt.geom.Point2D coord)
Decode hexadecimal string to coordinate

Parameters:
str - String to be decoded
coord - Coordinate whose values are to be set

handControlVersion

public java.lang.String handControlVersion()
Get hand control version command

Returns:
Command to get hand control version

cancelGoTo

public java.lang.String cancelGoTo()
Get cancel goto command

Returns:
Command to cancel goto

alignmentComplete

public java.lang.String alignmentComplete()
Get alignment complete command

Returns:
Command to check if alignment complete

trackingMode

public java.lang.String trackingMode(int mode)
Get tracking mode command string

Parameters:
mode - 0=off,1=altaz,2=eq-n,3=eq-s
Returns:
command string


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