View Javadoc
1 /* 2 * TelescopeInterface.java 3 * 4 * Copyright (c) 2003, Raben Systems, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: 9 * 10 * Redistributions of source code must retain the above copyright notice, 11 * this list of conditions and the following disclaimer. 12 * 13 * Redistributions in binary form must reproduce the above copyright notice, 14 * this list of conditions and the following disclaimer in the documentation 15 * and/or other materials provided with the distribution. 16 * 17 * Neither the name of Raben Systems, Inc. nor the names of its contributors 18 * may be used to endorse or promote products derived from this software 19 * without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * POSSIBILITY OF SUCH DAMAGE. 32 * 33 */ 34 35 package com.raben.telescope.comm; 36 import java.awt.geom.Point2D; 37 import java.io.IOException; 38 import java.util.Calendar; 39 40 /*** 41 * Define the telescope interface 42 * @author Vern Raben 43 * @version $Revision: 1.2 $ $Date: 2003/09/08 16:29:53 $ 44 */ 45 public interface TelescopeInterface { 46 47 /*** 48 * Cancel current GoTo command 49 * @exception IOException may occur 50 */ 51 void cancelGoTo() throws IOException; 52 53 /*** 54 * Go to the specified coordinate in right ascension/declination 55 * @param coordinate in right ascension and declination 56 * @exception IOException may occur 57 */ 58 void goToRightAscensionDeclination(Point2D coordinate) 59 throws IOException; 60 61 /*** 62 * GoTo the specified coordinate in azimuth and altitude 63 * @param coordinate in azimuth and altitude 64 * @exception IOException may occur 65 */ 66 void goToAzimuthAltitude(Point2D coordinate) throws IOException; 67 68 /*** 69 * Get current coordinate 70 * @return Coordinate in right ascension declination 71 * @exception IOException may occur 72 */ 73 Point2D getRightAscensionDeclination() throws IOException; 74 75 /*** 76 * Get current coordinate 77 * @return Coordinate in azimuth and altitude 78 * @exception IOException may occur 79 */ 80 Point2D getAzimuthAltitude() throws IOException; 81 82 /*** 83 * Check if telescope is aligned 84 * @return True if telescope is aligned, false otherwise 85 * @exception IOException may occur 86 */ 87 boolean isAligned() throws IOException; 88 89 /*** 90 * Check if telescope is communitating with serial port 91 * @return True if communication was successful, false otherwise 92 * @exception IOException may be thrown 93 */ 94 boolean isCommunicating() throws IOException; 95 96 /*** 97 * Check if telescope is slewing 98 * @return True if slewing, false otherwise 99 * @exception IOException may occur 100 */ 101 boolean isSlewing() throws IOException; 102 103 /*** 104 * Get controller version 105 * @return String 106 * @exception IOException may occur 107 */ 108 String getHandControlVersion() throws IOException; 109 110 /*** 111 * Set telescope tracking mode 112 * @param mode 0=off, 1=alt/az, 2= eq-n, 3=eq-s 113 * @exception IOException may occur 114 */ 115 void setTrackingMode(int mode) throws IOException; 116 117 /*** 118 * Initialize connection to telescope 119 * @exception IOException may occur 120 */ 121 void connect() throws IOException; 122 123 /*** 124 * Check if telescope is connected 125 * @return true if connected 126 */ 127 boolean isConnected(); 128 129 /*** 130 * Close connection to telescope 131 */ 132 void close(); 133 134 /*** 135 * Set the telescope model 136 * @param model of telescope @see TelescopeModel 137 */ 138 void setTelescopeModel(TelescopeModel model); 139 140 /*** 141 * Get telescope model 142 * @return TelescopeModel 143 */ 144 TelescopeModel getTelescopeModel(); 145 146 147 /*** Check if GPS is linked 148 * @return boolean true if GPS is linked, false otherwise 149 * @exception IOException may occur 150 */ 151 boolean isGpsLinked() throws IOException; 152 153 /*** Get Calendar date from GPS interface 154 * @return Calendar 155 * @exception IOException may occur 156 */ 157 Calendar getGpsDateTime() throws IOException; 158 159 /*** Get telescope coordinate from GPS interface 160 * @return Geographic coordinate of telescope in degrees 161 * @exception IOException may occur 162 */ 163 Point2D getGpsCoordinate() throws IOException; 164 165 /*** 166 * Set telescope properties 167 * @param props Properties for setting up telescope such as comm port, baud 168 * rate etc, refer to Javadoc for particular telescope model 169 */ 170 void setProperties(java.util.Properties props); 171 172 /*** 173 * Get telescope properties 174 * @return Properties 175 */ 176 java.util.Properties getProperties(); 177 178 /*** 179 * Set debug flag 180 * @param debug flag 181 */ 182 void setDebug(boolean debug); 183 184 /*** 185 * Get debug flag 186 * @return boolean 187 */ 188 boolean isDebug(); 189 190 /*** 191 * Set azimuth tracking rate 192 * Note - tracking will return to default in approximately 20 seconds 193 * unless tracking is turned off @see setTrackingMode 194 * @param trackRate in arc-sec/sec 195 * @exception IOException may occur 196 */ 197 void setAzimuthTrackingRate(int trackRate) throws IOException; 198 199 /*** Set altitude tracking rate 200 * Note - tracking will return to default in approximately 20 seconds 201 * unless tracking is turned off @see setTrackingMode 202 * @param trackRate in arc-sec/sec 203 * @exception IOException may occur 204 */ 205 void setAltitudeTrackingRate(int trackRate) throws IOException; 206 207 /*** 208 * Move telescope in azimuth 209 * @param direction true = right, false = left 210 * @param rate 0=stop,1=slow, 9=fast 211 */ 212 public void moveInAzimuth(boolean direction, int rate) throws IOException; 213 214 /*** 215 * Move telescope in altitude 216 * @param direction true = up, false = down 217 * @param rate 0=stop, 1=slow, 9=fast 218 */ 219 public void moveInAltitude(boolean direction, int rate) throws IOException; 220 221 }

This page was automatically generated by Maven