Home
coen-2004-project-07.. - Computer Engineering
Contents
1. else System out println ERROR No RBNB host defined return establish a connection with all the equipment located 41 at the Ground Station predictInterpreter new PredictClientInterpreter host powerInterpreter new PowerStripClientInterpreter host xcrInterpreter new TransceiverInterpreter host antennalnterpreter new AntennaClientInterpreter host while true T Command Input KKK InputStreamReader isr new InputStreamReader System in BufferedReader br new BufferedReader isr messageString null try System out print Please Enter Command if messageString br readLine null validate command for Predict Le predictInterpreter validateCommand messageString predictInterpreter sendCommand messageString 1 validate command for Serial Power Strip else if powerInterpreter validateCommand messageString powerInterpreter sendCommand messageString 1 validate command for Transceiver else if xcrInterpreter validateCommand messageString xcrInterpreter sendCommand messageString 1 validate command for Labjack Antenna Controller else if antennalnterpreter validateCommand messageString antennalnterpreter sendCommand messageString 1 else error message if the user does not enter in a valide command for devices System out println NnERROR If
2. Description initializes the mapped variables for the control of the X Predict program Precondition No Precondition lt P gt Postcondition all variables are initialized to its default value public PredictServerInterpreter commandArray 0 update commandArray 1 poss commandArray 2 pass commandArray 3 help KOR KR k kok k kok k RR k kok I KKK kCk ck k kk k kc k Ck kck KKK KKK RK KKK KKK KK KK KK kok Accessors amp Mutators KKK KK e e x x Kk k kok k kok k k kk E he E E e e e e Ck k kc k Ck kck ck kck ck kok ck k kk d Description This function validates a user command lt P gt Precondition The user input must be sent of type String P Postcondition If the command is a valide command this function return true Else it returns false public boolean validateCommand String command return getCommandIndex command 1 Description This sends the command to the Predict program lt P gt Precondition The command from the user must be sent of type String lt P gt Postcondition If the command is a valid command then the command X is sent and function returns the information coming from the x Program Else the function returns null 73 public String performCommand String command String subCommand int commandIndex getCommandIndex command System out printin command System out pri
3. Author Peter Salas L lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt lt P gt version Created 2 20 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class is used for validating user inputs and interpreting inputs to the actual commands that the Ground Station accepts for remote access Specifically this class validates commands for Predict the Satellite Tracker Program To esblish a connection with the Ground Station located at Santa Clara University Engineering Department For more information on DataTurbine and it s functionality please refer to the RBNB website http rbnb creare com import java io import java util public class PredictClientInterpreter Oko k kok k kok k Koko k kok k kok k kok k Kk kok kk Kk kk kk kCk Ck kCk Ck k kc k Ck kck ck K kk k ckck ck kk e ke KK RR KR kok kk k kk kok kok Constructor KKKKKKKKKKK KOK KK KK kok ko kok k kok k kok k K kok k kok KKK KKK k kok k kk k kc k Ck kck ck kok ck kok KKK trol of tablishes a can tablish a If this kk Description initializes the mapped variables for the con Predict Satellite Tracker This constructor also es connection to the Ground Station using DT so that it send commands to the device lt P gt Precondition The IP of the DT Server must be given to es connection lt P gt
4. n can tation is the Serial Power Strip that is located at the Santa Clara University Ground S tation is the be found at com baytech baytech rpc2 asp located at Santa Clara ne that he Kantronics 9612 Packet is located at Santa Clara ICOM 910 Dual Band n on the RACE System and it s please refer to the RACE B ts into desired folder located in the Root RACE Serve and handling errors on the To run the batch file from your desktop shortcut to these batch files Section H5 Using RACE Server Program Instruc tions On How to Use RACE Server After Unzipping the Race Server Program in the Star To s RACE root directory t up Tomcat Server bat This brings up two windows a b you to first window says One window will start Started at address The other window will Press any key say you S tart the RBNB Server and Applications up the RBNB Server Server bat 2001 2002 and Design Reports directory to start r for more information RACE Server you can create a hould see one batch file dir of dtHardware gt RACE_Server bat double click Wait for the words shows on the screen Start RBNB Server to continue Started at address and then prompt ONLY continue once the 126 NOTE An error will occur with the Server application 4 Select th 5 Pre
5. int npAZ int npEL 0 int sa int sa CurrAZ _currEL bool again true bool cont true float ant currAZ ant currEL errorEL errorAZ help if nargs 1 printf AntennaAutoTracker options n printf t track n printf a antenna orientation n printf s satellite position n exit 1 else if nargs gt 1 antenna orientation if strcmp args 1 a 0 readCurrentAntennaOrientation amp ant_currAZ amp ant_curr printf ANTENNA nazimuth d nelevation d n int an int ant currEL 0 5 satellite position else if strcmp args 1 s 0 SatPosition amp sat currAZ amp sat_currEL EL t currAZ 0 5 printf SAPPHIRE nazimuth d nelevation d n sat_currAZ sat_curr O p lt 90 start autotracking else if strcmp args 1 t 0 if SatPosition amp sat_currAZ amp sat_currEL printf Satellite is currently in view n printf Autotracking n Sleep 5000 while SatPosition amp sat_currA2Z amp sat curr O E amp amp L kbhit cont true while cont amp amp kbhit Sleep 500 SatPosition amp sat_currAZ amp sat currEL readCurrentAntennaOrientation amp ant currAZ amp ant currEL errorEL ant currEL float sat currEL errorAZ ant currAZ float sat currAZ system cls
6. Eve ntListener static CommPortIdentifier portId static Enumeration portList 115 tatic String messageString 0 n outputBufferEmptyFlag int stx boolea tic tic ta La false tic tatic tatic hread ta InputStream inputStream OutputStream outputStream SerialPort serialPort readThread Hu un u tic boolea tic ta ta n portfound boolean dataReady tatic String sBuffer static int num private static final int BASE private int numberOfCommands private static String command false false S S S wi 16 public static void main String args DataTurbine transceiverDT new DataTurbine String host variable to store address of host String plugInName sendTransceiver name of the plugin that will be used to read information from DT String sendChannel sattest receiveTransceiver text the location of the channel to write information to DT String commport COMI the desired serial port to communicate on Transceiver handleXCR new Transceiver System out println Welcome to the Transceiver to Data Turbine program if args length gt 0 host args 0 System out println Connecting to host else Sys return tem out println ERROR No RBNB host defined plugin used to create a channel that you will read from when client writes to
7. 106 String templ 0 String temp2 bcdValue 0 String temp3 bcdValue 1 String temp4 bcdValue 2 String temp5 bcdValue 4 String temp6 0 BCD format order must be reversed dataBCD2 temp5 temp6 dataBCD3 temp3 temp4 dataBCD4 templ temp2 if format looks like xxx else if input substring 8 length 3 String templ 0 String temp2 bcdValue 0 String temp3 bcdValue 1 String temp4 bcdValue 2 BCD format order must be reversed dataBCD3 temp3 temp4 dataBCD4 templ temp2 if format looks like xxx xxx x else String templ 0 String temp2 bcdValue 0 String temp3 bcdValue 1 String temp4 bcdValue 2 String temp5 bcdValue 4 String temp6 bcdValue 5 String temp7 bcdValue 6 String temp8 bcdValue 8 BCD format order must be reversed dataBCD1 temp7 temp8 dataBCD2 temp5 temp6 dataBCD3 temp3 temp4 dataBCD4 templ temp2 public void setULink cmdNo 07 subCmdNo DO public void setDLink cmdNo 07 subCmdNo D1 public void resetToDefault 107 cmdNo 00 subCmdNo 00 dataBCD1 00 dataBCD2 00 dataBCD3 00 dataBCD4 00 function validates the XCR Command Tf THIS FUNCTION VALIDATES THE MAIN COMMAND RETU
8. Postcondition all variables are initialized to its default value a connection was made successfully to the DT Server constructor will return with no errors If there is an error connecting then the constructor will return with an RBNB DataTurbine error S public PredictClientInterpreter String host commandArray 0 predict update commandArray 1 predict poss commandArray 2 predict pass commandArray 3 predict help 61 dt openSinkConnection host PredictClientSink dt addChannelSend sattest sendPredict text KOR KR KKK KK I II I RI A kk RR KKK KK KK KK KK KK KKK Accessors amp Mutators KKK e x e e e KK KOR RR kok k kok k RR A RAK KR RAK kc k Ck kck I KRK KKR KKR d Description This function validates a user command lt P gt Precondition The user input must be sent of type String P Postcondition If the command is a valide command this function K return true Else it returns false public boolean validateCommand String command return getCommandIndex command 1 Description This sends the command to the Ground Station lt P gt Precondition The command from the user must be sent of type T String lt P gt Postcondition If the command is a valid command then the command K is sent and function returns true Else the function returns false public boolean sendCommand String command int wait int index
9. TNCDT java 1 12 98 06 25 SMI Copyright c 1998 Sun Microsystems Inc All Rights Reserved Sun grants you Licensee a non exclusive royalty free license to use modify and redistribute this software in source and binary code form provided that i this copyright notice and license appear on all copies of the software and ii Licensee does not utilize the software in a manner which is disparaging to Sun This software is provided AS IS without a warranty of any kind ALL EXPRESS OR IMPLIED CONDITIONS REPRESENTATIONS AND WARRANTIES INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT ARE HEREBY EXCLUDED SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE PROFIT OR DATA OR FOR DIRECT NDIRECT SPECIAL CONSEQUENTIAL INCIDENTAL OR PUNITIVE DAMAGES I ch HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES T This sof
10. printf Satellite Az sd t t Satellite El dWMn sat currAZ sat currEL printf Antenna Az Sd NtNt Antenna El din int ant currAZ 0 5 int ant currEL 0 5 printf XnElevation error D f n errorEL printf Azimuth error f n errorA2 if errorEL gt THRESH_DEG antennaMoveDown 1 else if errorEL THRESH DEG antennaMoveUp if errorAZ THRESH DEG antennaRotateNeg else if errorAZ THRESH DEG antennaRotatePos if errorEL THRESH DEG amp amp errorEL THRESH DEG antennaSTOPEL if errorAZ lt THRESH DEG amp amp errorAZ THRESH_DEG antennaSTOPAZ 91 if errorEL lt THRESH DEG amp amp errorEL THRESH DEG amp amp errorAZ THRESH DEG amp amp errorAZ gt THRESH DEG antennaSTOPALL cont false else printf nSatellite is currently NOT in view n npAZ getNextPassAZ printf nMoving antenna to n d degrees elevation and n d degrees azimuth nfor next pass n npEL npAZ Sleep 5000 Motion Test code printf Moving up n antennaMoveUp Sleep 1000 antennaSTOPALL Sleep 1000 printf Moving down n antennaMoveDown 1 Sleep 1000 antennaSTOPALL Sleep 1000 pri
11. BAS tCmdNo BASE tSubCmdNo BASE tEndOfMsg BASE Excep handleXC handleXC tion e tDLin R resetToDefault th command 2 k Gl handleXC Preamble BAS handleXC handleXC handleXC handleXC handleXC handleXC R ge R ge Preamble BAS Dfal Dfal Gl tXCRAddr B Gl tAddr BAS tCmdNo BASE tSubCmdNo BASE tEndofMsg BASE Excep tion e R resetToDefault 119 System out println sent to serial n try Thread sleep 200 catch Exception e sBuffer some string value to write to Echo dataReady true stx 0 public TransceiverServer numberOfCommands 3 command new String numberOfCommands command 0 xcr sf command sets frequency command 1 xcr su command selects uplink mode command 2 xcr sd command selects downlink mode try serialPort SerialPort portId open TNCDTApp 2000 catch PortInUseException e try A inputStream serialPort getInputStream outputStream serialPort getOutputStream catch IOException e try serialPort addEventListener this catch TooManyListenersException e serialPort notifyOnDataAvailable true try serialPort setSerialPortParams 9600 SerialPort DATABITS 8
12. SerialPort STOPBITS 1 SerialPort PARITY NONE catch UnsupportedCommOperationException e readThread new Thread this readThread start public void run try Thread sleep 20000 catch InterruptedException e public void serialEvent SerialPortEvent event switch event getEventType case SerialPortEvent BI case SerialPortEvent OE case SerialPortEvent F case SerialPortEvent P ct ct Gr ct E Ed Dd os ee 120 case SerialPortEvent CD case SerialPortEvent CTS case SerialPortEvent DSR case SerialPortEvent RI case SerialPortEvent OUTPUT BUFFER EMPTY break case SerialPortEvent DATA AVAILABLE byte readBuffer new byte 24 Gl try while inputStream available gt 0 int numBytes inputStream read readBuffer if stx 0 dataReady true sBuffer sBuffer new String readBuffer catch IOException e break 121 Appendix H Section H1 Server Side Directory Structure A series of batch files were created to make it easier to start up the Server Side Applications and Services The Server Side directory when unzipped is formated as shown below There is a specific batch file that loads up a specific device service in each folder M ore information about each individual batch file can be found below in Section 2 FH dtHardware C Antenna_And_Predict C3 Power Strip C RBNB
13. The command The subcomma The response ROR Invalid Comm send commands to if an invalid co elcome to the Pre Predict text nnel DT ments that come in from DT T portion of the dtMessage nd portion of the dtMessage from the Predict Program and n Type help for Predict Software mmand from the user dict to Data Turbine user must specify the IP of the DT Server System out println Connecting to host s 67 else System out println ERROR No RBNB host defined return Establishes a connection to the DT Server predictDT openPluginConnection host plugInName predictDT addChannelReceive text predictDT registerReceiveChannel predictDT openSinkConnection host PredictServerSink predictDT addChannelSend sendChannel System out println Connected while true dtMessage predictDT rec information on DT iveMessage 1 Blocking request for Break the message up into parts countArgs PredictServer countArguments dtMessage command PredictServer getArgument dtMessage 1 subCommand PredictServer getArgument dtMessage 2 if predictInterpreter validateCommand command System out println validate Worked n perform command and save the output if subCommand null output predictInterpreter performCommand command else output predictInte
14. COEN 2002 PROJECT 10 pdf 24 See Appendix E 6 27 DOS command based Overall Dr Kitts is very pleased with the improvements made on the system and he will be using the system in the near future Dan Schuet is also pleased with the overall system However his only problem with the current Client Side program is that the TNC currently depends on Matlab Although he is very familiar with the Matlab program he does not have a copy of it at home therefore reducing his access He hopes that future upgrades of the system will reduce this dependency yet not eliminate the ability to use Matlab 28 Chapter 6 Experimentation and Testing 6 1 Testing Results Unfortunately this year s senior design team did not finish the complete system until late Spring 2004 quarter This did not leave very much time for conducting a thorough system performance test nor gather user experience results We do have our day to day experience and generalized system response times Below is a table with the average round trip times that we hand calculated for several typical ground station communication and control These times reflect the responsiveness of the system from the initial sending of a command till a response is seen on the client side Device Average RTT seconds Packet Modem TNC 2 637 Serial Power Strip 2 578 Predict 1 856 Antenna 1 575 Transceiver 3 635 Table 6 1 Response Times of RACE System
15. Interpreter Predict Antenna Controller DataTurbine Figure A 1 Client Side OM Diagram Structure Section A2 Server Side Class Structure PowerStrip Transceiver Predict Antenna Controller INTERFACE COMM Port API Figure A 2 Server Side OM Diagram Structure 40 Appendix B Section B1 Client Input Client Side Author Peter Salas lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt lt P gt version Created 4 13 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class integrates all ech import java io import java util import java lang import com rbnb sapi public class ClientInput static String messageString null public static void main String args String host Variable used to specify where DT Host is PredictClientInterpreter predictInterpreter Interpreter for Predict PowerStripClientInterpreter powerInterpreter Interpreter for Power Strip TransceiverInterpreter xcrInterpreter Interpreter for Transceiver AntennaClientInterpreter antennalnterpreter Interpreter for Labjack Antenna Controller System out println RACE Command Input Screen n if args length gt 0 host args 0 user must enter in the IP of DT Server System out println Connecting to host
16. NOTE These times do not reflect the response time of sending and receiving a response from a Satellite This time is dependent on strength of the link connection between the ground station and the satellite and the natural propagation speed of radio waves through space We have also noted the overall system integrity Within a one month test period of logging remotely into the ground station controls there have had no system failures In other words we have not had to reboot the RACE server software However because the ground station runs on a Windows OS it is recommended that the ground station 29 computer be formatted and rebooted every so often to maintain overall system performance The tests results gathered here are inconclusive and we recommend further testing There is a strong possibility that the system will be installed at the Hawaii Ground Station and other interested institutions Hopefully during the course of the summer conclusive test results and figures will be collected 6 2 RACE Installation Metric Figure 6 1 Installation of RACE at NASA AMES Research Lab We have also successfully installed the RACE system at the NASA Ames Laboratory in Moffet Field CA It was a large success because this was the first clean install of all the components of RACE Approximate total time for the setup is about an hour However since we are familiar with the setup process it may take more time 30 Chapter 7
17. getCommandIndex command switch index case 0 if countArguments command gt 2 String message getArgument command 2 getArgument command 3 dt sendMessage message wait return true return false case 1 if countArguments command gt 2 String message getArgument command 2 to getArgument command 3 dt sendMessage message wait return true return false case 2 if countArguments command gt 2 String message getArgument command 2 to getArgument command 3 dt sendMessage message wait return true return false case 3 dt sendMessage help wait return true 62 default return false Description This goes through the mapped commands of Predict and bs returns the index of that command lt P gt Precondition The user command must be sent of type String lt P gt Postcondition If the command is valid then this function returns the index of the command If the command is not valid this x function returns 1 private int getCommandIndex String command for int i20 i lt numCommand itt if command toLowerCase startsWith commandArray i return i return 1 Description This counts the number of arguments in a message of type String lt P gt Precondition A message of type String must be sent lt P gt Postcondition the number of words in a message is returned lt P gt NOTE Words are
18. popd rem pause pause Echo Start Applications pushd Antenna_And_Predict start runAntennaServer popd rem pause pushd Antenna_And_Predict start runPredictServer popd rem pause pushd PowerStrip start runPowerServer popd rem pause pushd TNC start runTNCServer popd rem pause pushd XCR 123 start runXCRServer popd rem pause echo Finished starting RBNB Server and Applications 124 Section H4 Installation Instructions INSTALLATION I System Requirements 233 MHz Processor recommend 800 MHz 128 MB RAM recommend 256 MB RAM Internet Connection preferable broadband connection installed or able to install Java Runtime Environment NOTE II Setup des a Go to http rbnb creare com E System has been tested to run under Windows2000 and XP click on downloads on the side bar b download Windows self installing executable If you don t have the Java Virtual machine installed on your machine 2 Gs 4 c a b download the latest version of J2SE C a b a a choose Windows includes JVM Go to java sun com Click on Downloads on the or at least J2SE v1 4 2 install to desired location Set environment variables after download open file and follow installation instructions sidebar w Java Runtime Environment JR Di set classpath under user variables to dir of DataTurb
19. 129 Section 14 Picture of RACE Client Program gt Predict Response Window to 179 219 19 118 1313 FACE Iramsce iver Pernprre Winden RTT T co 129 21 19 118 3333 et ing to 129 218 19 1 ST MEM Conmected Dr WINDOWS system Dani exe RACE Cent Input Cormand lapat pa ing to 1 1 19 21853333 Figure I 1 RACE Client Program 130 Section I5 Installation Instructions INSTALLATION II System Requirements 233 MHz Processor Internet Connection preferable broadband connection installed or able to install Java Runtime Environment NOTE System has been tested to run under Windows2000 and XP Although it has yet to be tested under Setup 1 Go to http rbnb creare com a click on downloads on the side bar b download Windows self installing executable if you don t have the Java Virtual machine installed on your machine choose Windows includes JVM c after download open file and follow installation instructions 2 Go to java sun com a Click on Downloads on the sidebar b download the latest version of J2SE or at least J2SE v1 4 2 w Java Runtime Environment JR C install to desired location Gl 3 Set environment variables a set classpath under user variables to dir of DataTurbine NRBNB V2 1 MbinNrbnb jar dir of DataTurbine gt RBNB_V2 1 bin source jar dir of DataTurbine gt RBNB_V2 1 bin rbnbjview jar d
20. ROMEO 98 Terminal Node Controller Server Side 98 HH 104 Transceiver Client amp Server Side 104 Transceiver Interpreter Client Side 109 38 o Section G3 o Section G4 e Appendix H o Section H1 o Section H2 o Section H3 o Section H4 o Section H5 e Appendix I o SectionIl o Section D o Section I3 o Section I4 o Section I5 o Section I6 o Section I7 e Appendix J o Section Jl o Section J2 Transceiver Echo Client Side 113 Transceiver Server Server Side 115 RNA 123 Server Side Directory Structure 122 Individual Batch Files aa ke 122 Main Batch Pile 2 ee oer 123 Installation Instructions sss eee ee 124 Using RACE Server Program sese eee 125 Se u ET ER TM eee 127 Client Side Directory Structure 127 Individual Batch Files eee 127 Mam Batch File u 20er 128 Picture of RACE Client Program 129 Installation Instructions sese eee eee ee 130 Using RACE Client Program e 131 Matlab Configuration and User Manual 134 Q 136 LBE CEDE 136 Use Case Descriptions ska Ben 137 39 Appendix A Section Al Client Side Class Structure DataTurbine PowerStrip Transceiver
21. X kk kk d KKK KKK KR ke ke e ke kok kok Constructor KOKCKCKCKCk Ck k KK KK RK KK KOR KR KKK kok k KI K kk K kk kok k kk k kk kk k kk k KRK kc k Ck kck ck kok KKK Description Precondition Postcondition all communication lt P gt none lt P gt public DataTurbine plugin new PlugIn source new Source sink new Sink sMap new ChannelMap aMap new ChannelMap rMap new ChannelMap sNum 1 aNum 1 rNum 1 initializes the variables for DataTurbine variables are initialized to its default value 44 KOK ROR kok k kok k K kk KKK I KKK KKK kCk Ck kCk Ck k k ck kckck kckok ck ckok ck k kk f RR KKK e e KKK Accessors amp Mutators KOK KK KK ke e e e e x KOR KR KKK kok k KR kok RR I Ck kCk Ck KR Ck k kc k kk kck ck ckok OR kk Description opens a plugin connection given the address of the rbnb server and the name of the plugin the user wants to open lt P gt Precondition user must provide the address of the rbnbserver host and the name of the plugin that the user wants to establish P Postcondition function will attempt to establish a connection else the function will print out the stack trace error public void openPluginConnection String rbnbServer String pluginName try plugin OpenRBNBConnection rbnbServer pluginName catch SAPIException se se printStackTrace Descri
22. deliminated by spaces Er private static int countArguments String message StringTokenizer st new StringTokenizer message return st countTokens Description Gets the specific argument in a message lt P gt Precondition A message of type String must be sent Also the Specific argument that the user wants to extract must be sent So if you want the 2nd word then send the number 2 P Postcondition The word that the user requested is returned If the i word does not exist i e There is no second word argument then the function returns null private static String getArgument String message int argNum int count 1 StringTokenizer st new StringTokenizer message while st hasMoreTokens if count argNum return st nextToken count st nextToken return null 63 The number of commands private int numCommand 4 private String commandArray new String numCommand mapped command array private DataTurbine dt new DataTurbine Establish connection to DT 64 Section D2 Predict Echo Client Side Author Peter Salas lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt P version Created 2 18 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class is used for rece
23. human in the loop remote operation coupled with some automation Santa Clara University is creating a series of communication ground stations under the framework of the Remote Accessible Communications Environment RACE system which provides the software and tools to allow remote control of these stations Many of these satellite capable amateur radio communications stations are used typically by university satellite builders This year s team re designed the current ground station control system to handle better streaming information as well as to improve the remote control of the ground station We accomplished successfully the following goals a more versatile system to handle various interfaces such as MATLAB and LabView a more efficient method for remote control of the ground station an improved latency of the system and a successful installation and performance commanding the ground station from a remote location The resulting system will advance the usage of this control network which will assist distributed research and education for institutions researchers and students throughout the world Acknowledgements To Dr Neil Quinn and Dr Chris Kitts for their help with the overall vision planning and design of the RACE project We thank you for your invaluable guidance and assistance with our project A portion of this work was supported by the National Science Foundation under Grant No EIA0079815 and EIA0082041 any opinio
24. information on the client side architecture and batch file scripts There are a few configurations that a user will have to do prior invoking these class files For complete instructions on installing and using the RACE Client Side System please refer to Appendix I 4 and I 5 Also the user will have to install Matlab in order to send and receive information on the Packet Modem TNC Currently the install process only contains direction for configuring Matlab to communicate with the Packet Modem TNC Future upgrades will hopefully allow other interfaces to interact with the Packet Modem TNC For complete instructions on configuring Matlab for the TNC please refer to Appendix I 6 5 2 How to Install the System Server Side The server side software is prepackaged and designed to work with the following devices and hardware e Labjack data acquisition and control device e ICOM CI V Level Converter connected to the ICOM 910 Dual Band Transceiver e Kantronics 9612 Packet Modem TNC e Baytech RPC2 Serial Power Strip These devices must be installed and configured properly before the server side packaged software is installed and run See below 6 3 4 Computer Specification and Configuration Server Side for instructions on installing and configuring devices Once the hardware are installed to the right ports see above and configured properly the prepackaged RACE server software can be installed and run For complete instructions on inst
25. lt P gt Postcondition the index of the accessChannel is returned public int getIndexAccess return aNum Description registers the receiveChannel to a plugin lt P gt Precondition a plugin connection must be opened and a x receiveChannel has to have been added already lt P gt Postcondition function attempts to register receiveChannel to plugin Else the function prints out the stack trace error public boolean registerReceiveChannel try plugin Register rMap return true catch SAPIException se se printStackTrace return false Description sends a message to DataTurbine lt P gt Precondition a sendChannel needs to have already been added A sink connection must be opened The value wait is the number of miliseconds DT should wait for a response If the value is negativ 3 6 1 the DT will wait for a response infinite u amount of time blocking wait lt P gt Postcondition function attempts to send message Else the function prints out the stack trace error xy public void sendMessage String message int wait try sMap PutDataAsString sNum message sink Request sMap 0 0 newest parameters are irrelevent 47 ChannelMap cm2 sink Fetch wait catch SAPIException se se printStackTrace Description checks to see if there is a message that was written into retu
26. n print AI printf AI print AI printf AI system cl EL float float 255 0 5 AZ float float 255 0 5 AZ MAX AD AZ MIN AD printf f void antennaMoveUp long idnum nAlSample error 1 2 3 d n errorcode AZ channel EL channel Local ID d n idnum 0 f n voltages 0 1 f n voltages 2 f n voltages 3 f n voltages s EL MAX DEG 0 voltages 2 AZ MAX DEG AZ MIN DEG float x float AZ MIN AD 0 voltages 0 fWNn EL AZ void 1 long errorcode errorcode chan errorcode dow nel 2 ON void antennaMoveDown void long idnum 1 long errorcode errorcode chan errorcode void antennaRotate nel 3 ON Pos void EL MIN DEG EL MAX AD EDigitalOut amp idnum 0 EL_UP_CHANNEL 0 1 EDigitalOut amp idnum 0 EL DN CHANNEL 0 0 n channel off both shouldnt be o EDigitalOut amp idnum 0 EL DN CHANNEL 0 1 EDigitalOut amp idnum 0 EL_UP_CHANNEL 0 0 EL MIN AD AZ MAX AD AZ MIN AD AZ MAX DEG AZ MIN DEG n at same time 96 long idnum 1 long errorcode errorcode errorcode EDigitalOut amp idnum 0 AZ_NI void antennaRotateNeg void long idnum 1 long errorcode errorcode
27. signals from the satellite Power strips the power strips are used to supply power to the equipment SASI Satellite Tracker the SASI satellite tracker enables the antenna to be controlled by calculations Rotator Controller the rotator controller is used to control the rotation of the satellite Rotator the rotator is the physical rotation equipment on the antenna Remote Reboot the remote reboot allows the system to be rebooted from a remote location 138 Race System The Race System describes how the user can use the system ACCESS TO SYSTEM User access to the RACE System is granted only by a valid and confirmed reservation time which depends upon the scheduled time in the RACE Scheduler System ADJUST PACKET MODEM This allows settings on the packet modem to be changed Through the RACE System the user can adjust settings of the packet modem including powering it on or off ADJUST TRANCEIVER FREQUENCIES This allows the transceiver controls to be changed Through the RACE System the user can adjust transceiver frequencies and settings EQUIPMENT POWER CONTROL This allows system components to be turned on or off Through the RACE System the user can power on or off equipment such as the packet modem and transceiver FULL ACCESS Full Access is granted to the Administrator REBOOT SYSTEM This reboots the system Access to Rebooting the System is handled only by the Administrator REQUES
28. the TNC modem he Antenna Controller the Antenna Controller he commands necessary in Transceiver lt frequency gt should be of ei 1 2 3 XXX sets to the perform the see above set and down the and sets to the can perform see above Displays an erro uplink mode ncy to the given he format of the frequency ther of the three formats requ T XXX XXX XXX XXX X In this mode frequency command set the uplink frequency you can link mode In this mode set frequency command set the downlink frequency you r message directing how one should type Displays t i n a command ne comma the An Turns view tenna labjac Auto then tracking it will nds necessary i k on If SAPPHI position the a next pass of the satellite Gives Gives satel lite the current position of SAPPHIR n controlling is not in tenna to the R Di the current position of the antenna Gl 133 RACE Power Ec ho Description Controls all information returning from the device This Echo s back anything received from the Serial Power Strip Controls all information returning from the device This Echo s back anything received from the Predict Software located on the Server Controls all information returning from the device This Echo s back anything recei
29. the issue of the satellite tracking software aforementioned in Chapter 1 section 1 3 Predict was chosen because of Predict s ability to be controlled remotely LabJack was needed because the SASI Satellite Tracking Hardware used previously was not compatible with Predict All of these components RBNB Data Turbine LabJack our software and the previously established hardware provides the user with a more remote accessible ground station to communicate with their satellite or robotic device A typical user of RACE will first register with the RACE Reservation System via the RACE website and the user s web browser Upon administrative approval of their registration the user can schedule an appointment to use one of the individual ground stations Once they have scheduled a time to use the system the user will return to the RACE control software or software of their choice At this point the user may begin controlling the system by sending commands through the current command line interface to any of the hardware or to the satellite tracking software After configuring the system to their specifications the user can then use the RACE software or their own software to communicate with the selected satellites 5 The RACE Reservation System has not yet been integrated into our current system 2 2 Team Structure The team consisted of two computer engineers The project was split up into different modules based upon the various equipmen
30. the satellite e VIEW RECEIVED DATA After it has received responses from the satellite the equipment displays the user requested data e VIEW SIGNAL METER The equipment sends information about the signal strength to the server which is displayed by the RACE system e VIEW SATELLITE INFORMATION After gathering information such as position in space from the satellite the equipment sends information about the satellite to the server which is displayed by the RACE system RACE Scheduler The RACE scheduler handles reservations to the system It also is used to determine access to the RACE System 5 mplemented by the RACE 2002 2003 team Please see RACE 2002 2003 Senior Thesis for further information and specifications on the RACE scheduler http www cse scu edu send cgi srprojects 2003 COEN 2003 PROJECT 25 pdf 140
31. value if value return if value return if value return if value 1 dataBCD1 2 dataBCD2 3 dataBCD3 4 105 return dataBCD4 return null public String getEndOfMsg return endOfMsg public void setFrequency String input StringTokenizer cmd new StringTokenizer input substring 8 char bcdValue bcdValue input substring 8 toCharArray creating array for values MAKE SURE YOU CHECK IF THE COMMAND IS VALID if format looks like xxx xxx if input substring 8 length 7 String templ 0 String temp2 bcdValue 0 String temp3 bcdValue 1 String temp4 bcdValue 2 String temp5 bcdValue 4 String temp6 bcdValue 5 String temp bcdValue 6 String temp8 0 BCD format order must be reversed dataBCDl temp7 temp8 dataBCD2 temp5 temp6 dataBCD3 temp3 temp4 dataBCD4 templ temp2 if format looks like xxx xx else if input substring 8 length 6 String templ 0 String temp2 bcdValue 0 String temp3 bcdValue 1 String temp4 bcdValue 2 String temp5 bcdValue 4 String temp6 bcdValue 5 BCD format order must be reversed dataBCD2 temp5 temp6 dataBCD3 temp3 temp4 dataBCD4 templ temp2 if format looks like xxx x else if input substring 8 length 5
32. you need help try typing in n n predict xcr power antenna help n catch Exception e System out println This did not work n gt 42 43 Section B2 DataTurbine Client amp Server Side import import import F ok F FF OX F F TZ o X 2 F Xo F 2 F F OF Author Peter Salas lt A HREF mailto Psalas scu edu gt lt P gt version Created 2 16 2004 lt P gt Purpose Designed for Santa University Team lt P gt Description This class integrates all PSalas scu edu functionality of Creare RBNB DataTurbine a Sink Source or Plugin connection wi RAC th a DT server lt A gt 2003 2004 Senior Design the basic and advanced It can be used to create It also contains the four ChannelMaps that are used for communicating with the DT server ChannelMap functionality please refer to http rbnb creare com lt P gt sending receiving For more information on Da accessing taTurbine and it s the RBNB website and the PlugIn lt B gt NOTE lt B gt This version of DataTurbine java does not have any security i e Basically anyone can log onto ech java io java util java lang import com rbnb sapi public class DataTurbine username and password written into the channels the channel at any time kok k kok k kok k kok k K kok k kok k kok k e E k K kk K k KKK kc k Ck kck ck K kk k
33. you can map out where Sapphire is right in a Matlab figure window Below is an example of what you should see when you run simpleTermv3 in th xtended mode of operation meaning it will pop up a world map tracking Sapphire location update keplerian elements on startup and sync the time periodically There is also a default mode of operation that doesn t have the frills just mentioned To access this mode just type b simpleTermv3 129 210 19 118 3333 b simpleTermv3 129 210 19 118 3333 e simpleTerm v3 0 WELCOME TO THE GATEWAY OF REMOTE SATELLITE COMMUNICATIONS Connecting to 129 210 19 118 3333 Connected Syncing time Updating Keps Done If all goes well when trying to connect to Sapphire by typing c ke6qmd you should see the following c ke6qmd c ke6qmd cmd CONNECTED to KE6QMD Your passkey is 889916323 admin 144 165 227 059 054 084 112 205 066 Welcome to Sapphire for help os time os time 04 22 15 1 4 1995 After you get the passkey type admin to automatically login with administrator privileges After you are logged in start calling Sapphire commands 136 Appendix J Section J1 Use Case Create Change User Info View Reservations Change Reservation Set Reservation RACE_System Access To Interface Equipment Power Control Adjust Transceiver Frequencies U
34. 0 Nr System out println Command from MATLAB messageString try outputStream write messageString getBytes catch IOException e catch SAPIException se se printStackTrace 101 public TNCDT try serialPort SerialPort catch PortInUseException e try inputStream outputStream IOException e catch try serialPort addEventListener this catch serialPort notifyOnDataAvailable true try portId open TNCDTApp TooManyListenersException e 2000 serialPort getInputStream serialPort getOutputStream serialPort setSerialPortParams 1200 SerialPort DATABITS 8 SerialPort STOPBITS 1 SerialPort PARITY NONE catch UnsupportedCommOperat readThread new Thread this readThread start i public void run try Thread sleep 20000 catch InterruptedException e public void serialEvent SerialPortEvent event switch event getEventType case SerialPortEvent BI case SerialPortEvent OE case SerialPortEvent FE case SerialPortEvent PE case SerialPortEvent CD case SerialPortEvent CTS case SerialPortEvent DSR case SerialPortEvent RI case SerialPortEvent OUTPUT BUFFER EMPTY break case SerialPortEvent DATA AVAILABLE byte readBuffer new byte 40 int numBytes 0 j 0 try onException e pull information f
35. 0 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class is used for communicating with the Predict Program Predict is Dos command based program so this program writes out to the command prompt and stores the information coming back onto a buffer This buffer is then returned back to the calling function Further information on the predict program that we use please refer to this website A HREF http www gsl net kd2bd predict html gt k http www qsl net kd2bd predict html lt A gt T import java lang import java io public class Predict Description This requests the current position of a particular k satellite This class depends on the Predict program and the two x line keplerian element file predict tle If the satellite x requested is not in this list then there will be no response P Precondition The satellite must be in the predict tle file P Postcondition The information about the current position of the X satellite will be returned public static String getSatelliteInfo String satellite try Process process Runtime getRuntime exec predict f satellite process waitFor nputStream in process getInputStream String stringIn int charIn char tempChar while charIn in read 1 tempChar char charIn
36. 003 2004 Senior Design Team lt P gt Description This class is used for receiving all information coming from the Serial Power Strip located at the Ground Station This class uses RBNB Data Turbine to establish a connection with the ground station located at Santa Clara University Engineering Department For more information on DataTurbine and it s functionality please refer to the RBNB website http rbnb creare com ay import java io import java util import java lang public class PowerStripClientEcho setting up channels public static void main String args DataTurbine dt new DataTurbine DataTurbine Class used for connection String host Variable used to specify where DT Host is System out println RACE Power Strip Response Window n if args length gt 0 host args 0 user must specify where DT Host is System out println Connecting to host else System out println ERROR No RBNB host defined return Establish connection with Ground Station by dt openPluginConnection host receivePowerStrip dt addChannelReceive text dt registerReceiveChannel System out println Connected 54 while true String message dt receiveMessage 1 blocking wait for information if message null System out println message if there s a message output it System out println 55 Section C3 Seria
37. 2 o Section C3 e Appendix D o Section DI o Section D2 o Section D3 o Section D4 o Section D5 e Appendix E o Section El o Section E2 o Section E3 o Section E4 o Section E5 o Section E6 e Appendix F o Section Fl e Appendix G o Section Gl o Section G2 APPENDIX nP 38 Q 40 Client Side Class Structure r ann 40 Server Side Class Structure 40 Tp EET 4 Client Input Client Side esses 41 DataTurbine Client amp Server Side 44 Satie hacen tas TAE etc oo hake anes 50 Serial Power Strip Echo Client Side 50 Serial Power Strip Interpreter Client Side 54 Serial Power Strip Server Server Side 56 61 Predict Interpreter Client Side 61 Predict Echo Client Side eee 65 Predict Server Server Side eens 67 Predict Server Side 2 iic e Lar E die 70 Predict Interpreter Server Side 73 E nde EE P RK err E 76 Antenna Interpreter Client Side 76 Antenna Echo Client Side eee 79 Antenna Server Server Side seen 81 Antenna Server Side e 83 Antenna Interpreter Server Side 86 AntennaAutoTracker Server Side 89 CNN NIRE
38. AB replacing the satellite tracking software with one that could be controlled remotely and building an overall system that is more efficient than the previous tracking software Nova All of these changes to the ground station were made without altering the system hardware because much of it was still intact and in excellent condition 1 5 Contributions Removing the current interface and replacing it with a more robust one was the most likely approach We incorporated streaming technology into the system to satisfy the need for a real time interface Furthermore we introduced new technology without affecting or changing much of the existing infrastructure Much time and research went into RACE s previous state and did not need to be changed dramatically Another feature we added to the ground station is the ability for a user to use his or her program to transfer data to and from a satellite Incorporating streaming technology into the RACE ground station will enable users to plug into the appropriate channel and stream data from their own choice of application on their computer The user will not be limited to the confinements of a specific predefined interface Most of the work was done on the ground control station We added another layer to the current software architecture to allow for better maintainability and upgradeability By adding this additional layer of communication we eliminated the problem of maintaining the interfac
39. AutoTracker program that was written by Graduate Student Dan Schuet of the Santa Clara University Engineering Department This program combines the Predict program and the Labjack program to provide control functionality of the Antenna This program allows the user to ask for the current location of the Antenna and also tell the antenna to autotrack to the SAPPHIRE Satellite The Stanford Satellite a k a OSCAR 45 NO 45 X import java lang import java io public class Antenna KOR KR kok k KK RR I KR kok kk K Ck kCk Ck kCk Ck k kc k Ck kck KKK k kk d RR KKK KK KK KKK KK KKK Accessors KCKCKCKkCk ck kck k k kk kok k kok k kok k kok k K kok k kok k kok k K kk kok kok K kk K k Ck kCk Ck kCk Ck Ck k Ck Ck kck ck kok ck kok ck X kk kk Description Sends a command to AntennaAutoTracker telling it to x autotrack a Satellite Currently this program is set to E autotrack to SAPPHIRE The Stanford Satellite if you want it to A track a different satellite then you will have to change the C code for predict lt P gt Precondition The Antenna Controller must be connected to labjack and receiving power lt P gt Postcondition This function will passes the command to another k program and that program will execute in its own thread k Therefore this is a non blocking message passing to turn the antenna public static boolean autoTrackSatellite try Process p
40. CE Workstation amp Antenna Windows 2000 USB Rotator Controller T d m serial OFS Lavel Transcelver Converter Antenna je DownLink Figure 3 8 RACE Hardware Block Diagram 15 3 3 Lab lack and Satellite Tracking LabJack is a data acquisition device which is used to connect the PC to the antenna controller In conjunction with the Satellite Tracking software LabJack is used to direct the antenna toward the specified satellite in space Figure 3 9 LabJack U12 LabJack was chosen to replace the SASI Satellite Tracker LabJack and Predict which is discussed in section 4 4 work together to provide a Satellite Tracking environment similar to Nova The problem with the Nova software was that other software could not control it Nova did not provide any means of controlling it remotely except using remote desktop software 1 e WinVNC Clearly this is a security risk to the ground station and therefore NOVA had to be replaced 11 Please see RACE 2002 2003 Senior Thesis pg 31 for further information and specifications SASI Satellite Tracker 16 Chapter 4 Software 4 1 Information Flow between Client and Server Figure 4 1 is the information flow diagram between the Client and Server Side programs It depicts how 1 A client writes to a server 2 The ground station receives the message 3 The ground station writes the information to the devices 4 The ground station receives messa
41. CO TNC GD xcr There is a master batch file that loads up all the services and device specific batch files in the folders This batch file is located in the root folder of dtHardware M oreinformation about the main batch file can be found in Section 3 FE Ed E E EH Section H2 Individual Batch Files dtHardware Antenna And Predicti runAntennaServer bat java AntennaServer localhost 3333 pause lt dtHardware gt Antenna_And_Predict runPredictServer bat rem The first two commands are necessary rem There was an error when they were not rem invoked before invoking the PredictServer class predict f OSCAR 45 predict p OSCAR 45 java PredictServer localhost 3333 pause lt dtHardware gt PowerStrip runPowerServer bat java PowerStripServer localhost 3333 pause lt dtHardware gt RBNB runRBNB_No Security bat rem This assumes you installed RBNB into 122 rem C Program Files rem Also note that this is RBNB V2 1 cd C Program Files RBNB_V2 1 bin rem this invokes the RBNB server on the localhost rem and names the server sattest java jar rbnb jar a localhost 3333 n sattest lt dtHardware gt TNC runTNCServer bat java TNCDT localhost 3333 pause lt dtHardware gt XCR runXCRServer bat java TransceiverServer localhost 3333 pause Section H3 Main Batch File lt dtHardware gt RACE Server bat echo off Echo Start RBNB Server pushd RBNB start runRBNBServer No Security
42. Character tChar stringIn tChar toString return stringIn new Character tempChar 70 catch Exception e System out printin e return null Description This function requests an update of the predict tle file k from lt A HREF http_get http www qsl net kd2bd predict tle gt xi http get http www qsl net kd2bd predict tle lt A gt lt P gt Precondition The tle file that you want to update must be given of type String RACE is specifically using the predict tle file so this must be the parameter passed lt P gt Postcondition The function will return Update Successful if there is no error XJ public static boolean updateKeplerians String tleFile try Process processl Runtime getRuntime exec http get http www qsl net kd2bd predict tle tleFile processl waitFor System out println Predict updateKeplerians tleFile Downloading update Process process2 Runtime getRuntime exec predict u tleFile process2 waitFor System out println Predict updateKeplerians tleFile gt Update Completed return true catch Exception e System out println e return false Description This function requests the next pass of a specific X satellite Like the getSatelliteInfo function this function depends on the predict tle file If the satellite is not in the 2 list then
43. DAMAGES a warranty of any kind x Kal Hct E I HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES This software is not designed or intended for use in on line control of aircraft air traffic aircraft navigation or aircraft communications or in the design construction operation or maintenance of any nuclear facility Licens represents and warrants that it will not use or redistribute the Software for such purposes F F 0 F 0X F TZ 0X F 0X F OX FF F 06 F ZZ 0X F Oo F 0X O6 OX F Xo o F TZ ZZ TZ Ro Xo Xo KF X import java io import java util import javax comm public class PowerStripServer implements Runnable SerialPortEventListener static CommPortIdentifier portId 56 static Enumeration portList static String messageString static int stx 0 static boolean outputBufferEmptyFlag false static InputStream inputStream static OutputStream outputStream static SerialPort serialPort Thread readThread static boolean portfound false static boolean dataReady false static String sBuf
44. EDigitalOut amp idnum 0 AZ_N 1 ON errorcode void antennaSTOPEL void long idnum 1 long errorcode errorcode EDigitalOut amp idnum O0 EL UP CHANNI errorcode EDigitalOut amp idnum O0 void antennaSTOPAZ void long idnum 1 long errorcode errorcode EDigitalOut amp idnum 0 AZ POS CHANN EDigitalOut amp idnum 0 AZ NEG CHANN errorcode void antennaSTOPALL void long idnum 1 long errorcode amp idnum 0 1 EDigitalOut amp idnum 0 1 EDigitalOut pu errorcode EDigitalOut errorcode errorcode errorcode EDigitalOut Gl GI EL DN CHANNI L UP CHANNI L DN CHANNI P Gl u amp idnum 0 AZ POS CHANN amp idnum 0 AZ NEG CHANN EDigitalOut amp idnum 0 AZ POS CHANNEL 0 1 channel EG CHANNEL 0 0 EG CHANNEL 0 1 channel EDigitalOut amp idnum 0 AZ POS CHANNEL 0 0 Gl GI 97 Appendix F Section F1 Terminal Node Controller Server Side author Daniel Schuet lt A HREF mailto dschuet scu edu gt Dan Schuet lt A gt Description This class was change from its original design by Sun Microsystems and it has been configured to communicate with a TNC Modem attached to COM2 It is also designed to send amp receive data from RBNB DataTurbine Any questions concerning this class can be found online from java sun com or rbnb creare com
45. Position int output az nt err ILE pFile NULL ong lSize h n ar buffer t azimuth elevation H Q om H call predict and output int output_el results to a file options n track n antenna position n satellite 93 rr system predict ex have variables here if err 1 printf Error exit 1 else printf Predict pFile fopen output txt obtain file size fseek pFile 0 SEEK END lSize ftell pFile rewind pFile rp f OSCAR 45 gt output txt executing predict n allocate memory to contain the whole file buffer char malloc 1Size if buffer NULL printf Error exit 1 copy the file into the buffer fread buffer 1 1Size pFile printf 1Size d n s n 1Size buffer parsePredictLine buffer amp azimuth printf NnAZ d deg nEL d deg n terminate fclose pFile free buffer output_az azimuth output_el elevation if azimuth gt 0 amp amp elevation gt 0 return true else return false void parsePredictLine char buffer char cAZ 4 char cEL 4 int i 0 for i 0 i lt 4 i cEL i buffer i 32 cAZ i buffer i 37 int AZ nothing in file n azimuth should successfully executed n amp elevation elevation int EL 94 int voi
46. Power Source 8 The notation CI V is a standard naming convention given by ICOM America Inc 12 e Yaesu G 5500 Antenna Controller This component is the interface between the computer and the antenna rotator Figure 3 6 Yaesu G 5500 Antenna Controller e LabJack U12 and LabJack PiggyBack Both of these pieces of equipment work in conjunction with Predict in order to control the antenna controller which moves the antenna to the correct azimuth and elevation Figure 3 7 LabJack U 12 and LabJack PiggyBack 9 For more information on LabJack and LabJack PiggyBack refer to http www labjack com and http www nlsa com labjack labjack piggyback html 13 3 2 Current Hardware Design Before initial design and implementation of this year s RACE system we found that most of the hardware specified by the RACE II Senior Thesis had still been intact However there were a few missing components and some areas of design that were not addressed We needed to restructure the hardware block diagram not only to address these issues but also to accommodate our own design A new version of the hardware block diagram can be found in Figure 3 8 10 For more information on the RACE 2002 Senior Thesis hardware block diagram please refer to Figure 4 8 pg 33 at the following link http www cse scu edu send cgi srprojects 2003 COEN 2003 PROJECT 25 pdf 14 User Computer User Application RA
47. RNS A BOOLEAN public boolean validCommand String input for int i 0 i lt numberOfCommands i if input toLowerCase startsWith command i if input toLowerCase startsWith command 0 return this validFrequency input else return true return false THIS FUNCTION VALIDATES THE FREQUENCY RETURNS A BOOLEAN public boolean validFrequency String input try StringTokenizer cmd new StringTokenizer input substring 8 for int i20 cmd hasMoreElements i int freqVal Integer parseInt cmd nextToken 10 if 0 lt fregVal freqVal 9999999 return true catch Exception e return false 108 Section G2 Transceiver Interpreter Client Side The TransceiverInterpreter class handles validating a user command and sending the command to the transceiver hardware Purpose Designed for Santa University RACE 2003 2004 Senior Design Team Qauthor zt Carleton Cheng lt A HREF mailto ClCheng scu edu gt CiCheng8scu edu lt A gt version Created April 12 2004 RS import java io import java util import java lang import javax swing public class TransceiverInterpreter private String host private static DataTurbine dt new DataTurbine private static DataTurbine dt2 new DataTurbin
48. Santa Clara University DEPARTMENT of COMPUTER ENGINEERING Date June 9 2004 WE HEREBY RECOMMEND THAT THE THESIS PREPARED UNDER MY SUPERVISION BY Carleton Cheng and Peter Salas ENTITLED RACE IV Remote Accessible Control Environment BE ACCEPTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF BACHELOR OF SCIENCE IN COMPUTER ENGINEERING Dr Neil Quinn Dr Christopher Kitts THESIS ADVISOR THESIS ADVISOR Dr Dan Lewis DEPARTMENTCHAIR RACE IV Remote Accessible Control Environment by Carleton Cheng and Peter Salas SENIOR DESIGN PROJECT REPORT Submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Engineering School of Engineering Santa Clara University Santa Clara California June 9 2004 Abstract In space there are hundreds of satellites orbiting the Earth To talk to these satellites communication ground stations need to be built in order to relay commands and data between the satellites and the human operators on the ground Many large institutions such as NASA the European Space Agency and the U S Air Force have staff at full scale remote communication stations Furthermore these stations are often distributed around the Earth in order to increase the amount of time that communications may take place given line of sight transmission constraints Clearly there is a need for unmanned ground stations that are controlled using
49. Societal Issues 7 1 Ethical RACE provides a means for underdeveloped areas cheap access to satellite technology RACE is one solution in reducing the Digital Divide by providing technology that previously was only available to the fortunate Because it incorporates the internet which serves as the framework for this network of groundstations all educational communities can benefit from this project 7 2 Social Many social benefits result from the implementation of RACE By giving students and faculty access to a satellite network such as RACE we are extending to them a very unique opportunity Being the only non government system of its kind students are able to gain valuable experience in the field before becoming fully immersed in the industry This unique project allows a greater number of people to influence this growing technology and help to improve it 7 3 Political Space technology including ground control networks is a technology that is regulated by the United States government Although the impact has not been seen specifically by our group the project development as a whole has been greatly affected Originally international ground stations were to be installed to enhance the capabilities of the RACE system and the amount of time that a satellite is in view of the network These plans have been suspended due to lack of political approval 31 7 4 Economic RACE as a system allows for cost effective and ch
50. String lt P gt Postcondition If the command is a valid command then the command is sent and function returns true Else the function returns false public boolean sendCommand String command int wait int index getCommandIndex command switch index case 0 dt sendMessage t wait return true case 1 dt sendMessage a wait return true case 2 dt sendMessage s wait return true case 3 dt sendMessage help wait return true default return false Description This goes through the mapped commands of the Labjack k program and returns the index of that command lt P gt Precondition The user command must be sent of type String lt P gt Postcondition If the command is valid then this function returns x the index of the command If the command is not valid this k function returns 1 ty private int getCommandIndex String command for int i20 i lt numCommand i if commandArray i equalsIgnoreCase command return i 71 re priva commands priva priva turn 1 te int numCommand 4 The number of mapped te String commandArray new String numCommand The array of commands te DataTurbine dt new DataTurbine DataTurbine class used for establishing connection 78 Section E2 Antenna Echo Client Side lt P gt lt P gt X F F FF F F F FF Xo Xo Xo X ech import import import pu
51. T DATA Commands can be sent to the satellite to retrieve desired data User commands and requested data are sent through the RACE system and are handled by the equipment which are then to the satellite VIEW RECEIVED DATA As a result of a particular command sent to the satellite the received data is displayed After it has received responses from the satellite the equipment displays the user requested data VIEW SATELLITE INFORMATION This displays the current information about the satellite such as azimuth and elevation After gathering information such as position in space from the satellite the equipment sends information about the satellite to the server which is displayed by the RACE system VIEW SIGNAL METER This displays the current connection status and signal strength to the satellite The equipment sends information about the signal strength to the server which is displayed by the RACE system EQUIPMENT POWER CONTROL Through the RACE System the user can power on or off equipment such as the packet modem and transceiver 139 e ADJUST TRANCEIVER FREQUENCIES Through the RACE System the user can adjust transceiver frequencies and settings e ADJUST PACKET MODEM Through the RACE System the user adjusts settings of the packet modem including powering it on or off REQUEST DATA User commands and requested data are sent through the RACE System are handled by the equipment which sends them to
52. alPort portId open TNCDTApp 2000 catch PortInUseException e try inputStream serialPort getInputStream outputStream serialPort getOutputStream catch IOException e try serialPort addEventListener this catch TooManyListenersException e serialPort notifyOnDataAvailable true try serialPort setSerialPortParams 9600 SerialPort DATABITS_8 SerialPort STOPBITS_1 SerialPort PARITY_NONI catch UnsupportedCommOpera readThread new Thread this readThread start Gt Ri ionException e public void run try Thread sleep 20000 catch InterruptedException e public void serialEvent SerialPortEvent event switch event getEventType case SerialPortEvent BI case SerialPortEvent OE case SerialPortEvent ER 59 case SerialPortEvent PE case SerialPortEvent CD case SerialPortEvent CTS case SerialPortEvent DSR case SerialPortEvent RI case SerialPortEvent OUTPUT BUFFER EMPTY break case SerialPortEvent DATA AVAILABLE byte readBuffer new byte 24 try while inputStream available gt 0 int numBytes inputStream read readBuffer if stx 0 dataReady true sBuffer sBuffer new String readBuffer catch IOException e break 60 Appendix D Section D1 Predict Interpreter Client Side
53. alling and using the server software please reference Appendix H 24 5 3 Computer Specification and Configuration Client Side The RACE client side system has been tested under the following computer specifications e Windows XP 2000 e Internet Connection 56K Modem at least e 256 MB amp 512 MB RAM e Pentium II III IV Processor Matlab needs to be installed on the client side machine in order to operate the TNC remotely Because this program takes up a lot of memory it is recommended that the computer have 512 MB of RAM Future upgrades of the client side software will eliminate this dependency Java Runtime Environment needs to be installed on the computer to be able to execute the Java programs This can be downloaded for free from the java sun com website It is recommended to install the JVM 1 4 x onto the computer 5 4 Computer Specification and Configuration Server Side The computer must have these initial specifications to install the devices to the computer e Windows OS e Pentium II processor at least o Recommend Pentium III with 800 MHz Processor 64 MB RAM recommend 256 MB or more e 3 Serial Ports e 1 USB Port Also the software is designed to look for the device on a specific port 25 USB Port Serial Port 3 COMS Serial Port 2 COM2 Serial Port 1 COM1 Figure 5 1 Hardware Configuration Diagram Again the prepackaged RACE server software is designed to work with the following devi
54. are every major device can be controlled using the current command line interface e Ground Station Computer Dell Optiplex GX110 Windows 2000 Professional Pentium II 128 MB RAM 4 Serial Ports 1 Parallel Port e COM 910 Dual Band Transceiver The transceiver receives data from the packet creator converts it to radio waves and sends it out the antenna It also receives radio waves and sends them to the packet creator for decoding However it must be set to the appropriate frequency before a connection can be achieved Figure 3 1 ICOM 910 10 e Kantronics 9612 Packet Creator Modem A packet modem is needed to decode encode satellite data transmissions It also can receive commands from the user using the software written by Daniel Shuet Figure 3 2 Kantronics 9612 e Baytech RPC2 Serial Port Controlled Power Strip This power strip is used to remotely power on or off the various devices Figure 3 3 Baytech RPC2 6 For more information on the code see Appendix F Section F1 7 The User M anual for this device can be found at the following link http www baytech net downloads manuals U140E125 04 rpc pdf 11 e ICOM CI V Level Converter This device is used to communicate to the transceiver via the computer s serial port Figure 3 4 ICOM CI V Level Converter COM PS 125 Power Source A special power source is needed to power the transceiver Figure 3 5 ICOM PS 125
55. ation using DT so that it can i send commands to the device P Precondition The IP of the DT Server must be given to establish a connection lt P gt Postcondition all variables are initialized to its default value If i a connection was made successfully to the DT Server this S constructor will return with no errors If there is A an error connecting then the constructor will return with an RBNB DataTurbine error public AntennaClientInterpreter String host commandArray 0 antenna t commandArray 1 antenna a commandArray 2 antenna s commandArray 3 antenna help dt openSinkConnection host AntennaClientSink 76 dt addChannelSend sattest sendAntenna text tt RRR kk KR ke e e KKK KK Accessors amp Mutators XCkCkck ck ko ke ke ke e e e e x x f KOK KR k KK E k kok k kok RK KCKCKCkCkCKCkCkCk Ck kCk Ck kCk Ck k kc k Ck kck ck kok ck ck ok KKR ck ke KR Description This function validates a user command lt P gt Precondition The user input must be sent of type String P Postcondition If the command is a valid command this function k return true Else it returns false public boolean validateCommand String command return getCommandIndex command 1 Description This sends the command to the Ground Station lt P gt Precondition The command from the user must be sent of type
56. blic version Created 5 12 2004 j j Author Peter Salas A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class is used for receiving all information coming from the Labjack which is connected to the antenna This class uses RBNB Data Turbine to establish a connection with the ground station located at Santa Clara University Engineering Department For more information on DataTurbine and its functionality please refer to the RBNB website http rbnb creare com ava io ava util java lang class AntennaClientEcho public static void main String args DataTurbine dt new DataTurbine DataTurbine Class used for connection String host Nariable used to specify where DT Host is System out println RACE if args length gt 0 T Antenna Response Window n host args 0 user must specify where DT Host is System out println Connecting to host else System out println ERROR No RBNB host defined return Establish connection with Ground Station by setting up channels dt openPluginConnection host receiveAntenna dt addChannelReceive text dt registerReceiveChannel System out println Connected while true String message dt receiveMessage 1 79 block
57. c int countArguments String message StringTokenizer st new StringTokenizer message return st countTokens Description Gets the specific argument in a message P Precondition A message of type String must be sent Also the Specific argument that the user wants to extract must be sent So if you want the 2nd word then send the number 2 P Postcondition The word that the user requested is returned If the x word does not exist i e There is no second word argument then x the function returns null private static String getArgument String message int argNum int count 1 StringTokenizer st new StringTokenizer message while st hasMoreTokens if count argNum return st nextToken count st nextToken return null private int numCommand 11 The number of mapped commands private String commandArray new String numCommand The mapped commands array private DataTurbine dt new DataTurbine Establish connection to DT private DataTurbine dt2 new DataTurbine Establish connection to DT 53 SectionC2 Serial Power Strip Echo Client Side Ebo OBI D E DP Db Sb oloB o6 EEE Dp DE Author Peter Salas lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt lt P gt version Created 2 18 2004 lt P gt Purpose Designed for Santa University RACE 2
58. ces e Labjack data acquisition and control device e ICOM CI V Level Converter connected to the ICOM 910 Dual Band Transceiver e Kantronics 9612 Packet Modem TNC e Baytech RPC2 Serial Power Strip For more detailed instructions on how to install and configure the RACE server computer see Appendix H 5 5 How to Use the System Client Side Consideration was taken about the user experience with the RACE program Understanding that there is currently only a small community who are interested in communicating with satellites and many of them prefer a command prompt interface we opted to make our interface a DOS command prompt A user has a better feel for how the RACE system works without any fancy buttons to distract or take away from the experience There are 5 command prompt windows and Matlab that need to be opened to operate all functionalities of the RACE System 26 Power Strip Echo Outputs information from the Power Strip e Transceiver Echo Outputs information from the Transceiver e Predict Echo Outputs information from the Satellite Tracking Software e Antenna Echo Outputs information from AntennaAutoTracker program e Client Input Accepts and Sends commands from the user to the Server e Matlab Interface Needed for control access to Packet Modem TNC To aid in invoking the 5 command prompt windows we made one master batch file that will start up all
59. channel transceiverDT openPluginConnection host plugInName transceiverDT addChannelReceive text transceiverDT register sink used to write a cha transceiverDT openSinkConnec transceiverDT addChann System out printlin Co Search f ReceiveChannel nel tion host TransceiverServerSink elSend sendChannel nnected or the COMI 116 portList CommPortIdentifier getPortIdentifiers while portList hasMoreElements portId CommPortIdentifier portList nextElement if portId getPortType CommPortIdentifier PORT SERIAL if portId getName equals commport TransceiverServer transceiver new TransceiverServer System out println portId getName found portfound true if portfound false System out println Port was not found n nExiting program ess Ey while portfound if dataReady try Thread sleep 200 ms wait to finish sending data Push data onto the server check if there is something in the buffer if sBuffer null amp sBuffer System out println Placing string sBuffer into server transceiverDT sendMessage sBuffer 1 reset flags dataReady false sBuffer catch InterruptedException e messageString transceiverDT receiveMessage 1 if messageString null stx 1 clear buffer System out println Data ready to be
60. d readCurrentAntennaOrientation float AZ float AZ atoi CAZ EL atoi cEL getNextPassAZ void t err LE pFile NULL ng lSize ar buffer t azimuth elevation H Q h tj p ei EF D Ed call predict and output results to a file rr system predict ex p OSCAR 45 gt output txt should have variables here if err 1 printf Error executing predict n exit 1 else printf Predict successfully executed n pFile fopen output txt rb obtain file size fseek pFile 0 SEEK END lSize ftell pFile rewind pFile allocate memory to contain the whole file buffer char malloc 1Size if buffer NULL printf Error nothing in file n exit 1 copy the file into the buffer fread buffer 1 1Size pFile printf 1Size sd n s n 1Size buffer parsePredictLine buffer amp azimuth amp elevation printf NnAZ d deg nEL d deg n azimuth elevation terminate fclose pFile free buffer return azimuth Gl p long errorcode 95 idnum demo 0 StatelO numCh 4 channel long gains 4 long ov float voltag long long long long long errorcode 1 s 4 0 1 2 3 0 0 0 0 es 4 0 0 0 0 AlSample amp idnum demo amp stateIO 0 1 numCh channels gains 0 amp ov voltages printf printf
61. d to gain connectivity to the capabilities of the ground station i e the packet modem the transceiver and antenna auto tracking e Download and install RBNB Data Turbine v2 1 It can be found here http outlet creare com rbnb download V2 1 html get the one with JVM Next you ll need to setup some stuff in Matlab With Version 6 and later of Matlab direct calls to Java are supported from the command line mode of Matlab Thus Matlab uses the native Java RBNB API directly I Copy C Program Files RBNB_V2 1 bin rbnb jar into C MATLAB6p5 java jar toolbox ES Add this line Smatlabroot java jar toolbox rbnb jar into C MATLAB6p5 toolbox local classpath txt 3 Copy the directory C Program Files RBNB_V2 1 Matlab into C MATLAB6p5 toolbox DO NOT replace the directory already there but rename the copied directory RBNB 4 Add C MATLAB6p5 toolbox RBNB to the Matlab path File Set Path After that is all setup it s only a matter of downloading and extracting the client software Sapphire Support There are a couple of ways to tell if Sapphire is currently overhead First you can download a demo version of Nova and run that to track 135 Sapphire The other way is to use the satellite tracking built into SapphireTerm This basically requires that you have the Predict AtomTime and http_get bundled zip file extracted to the C predict22 directory This is nice because
62. ding and receiving of data can occur independently of the other Creating two channels also ensures that there is no clash of information sending at the same time from both client and server Lastly creating two channels enables the client side program to block and wait for information rather than polling Also note that the RXrawTNCString was designed with only one channelmap This was because there was an issue configuring Matlab with two channels However we have successfully coordinated the sending and receiving of information on the server side so there will be no information lost See Appendix F 1 for source code 4 5 Transceiver The transceiver is the device that sets the frequencies the packet modem will use to send and receive data There are two frequency modes uplink and downlink The modem sends information out to the satellite through on the uplink frequency and receives information from the satellite on the downlink frequency Additionally The CI V level converter is also used in conjunction with the transceiver in order to interface with the computer The CI V level converter allows the programmer to be able to send and receive the necessary commands to control the transceiver When programming the transceiver one must understand the command format which looks somewhat like this which is used to set a frequency FE FE 60 00 00 00 00154501 FD Looking carefully one will notice tha
63. e private int numberOfCommands private String command KOR KR KKK kok k RR kok k kok k K k kok kok K kCk Ck k kk k kc k Ck kck ck kok ck kok ck k kk d RRR RK Kok ck KK KK kk ke e KK Constructor KCKCKCKkCk ck kck ck k k kk ke e x KOK KKK KK kok k RR k kok k KKK I KCk Ck KKR k kc k Ck kck ck kok ck kok ck k kk d public TransceiverInterpreter numberOfCommands 3 command new String numberOfCommands command 0 xcr sf command sets frequency command 1 xcr su command selects uplink mode command 2 xcr sd command selects downlink mode public TransceiverInterpreter String host numberOfCommands 4 command new String numberOfCommands command 0 xcr sf command sets frequency command 1 xcr su command selects uplink mode command 2 xcr sd command selects downlink mode command 3 xcr help command selects help menu this host host dt openSinkConnection host TransceiverSink dt addChannelSend sattest sendTransceiver text dt2 openSinkConnection host TransceiverSink dt2 addChannelSend sattest receiveTransceiver text 109 KOR KKK KK kok k K kk K kok kok e E E e e e k kk kCk Ck k kc k Ck kck KKK kk d RR KKK KK KK KKK ke ke ke KKK Accessors amp Mutators KOK KK e e KK KOR KR KR KK KK RR kok KR I e e e kc k kckck ck kck ck KKK public boolean validateCommand String input fax This function checks whether o
64. e because of the various software used at the ground station Therefore if the software were to change minimal amount of work will have to be done only to the additional layer itself Finally we replaced the previous satellite tracking software Nova with another one called Predict Because Predict did not work with the satellite tracking hardware we needed to replace the SASI Satellite tracker with LabJack which is described in Chapter 4 of this thesis All of these changes to the RACE system proved to make the ground station more remote accessible and more efficient Chapter 2 Overall System Integration 2 1 System Overview The RACE system allows the user to command a specified ground communication station located in a remote location The goal of this system is to handle human in the loop remote operation coupled with some automation of these ground stations This schema helps to increase the amount of time that communications may take place given line of sight transmission constraints because many of these stations are often distributed around the Earth The general system architecture is illustrated in Figure 2 1 Website Database User Management and Station Scheduling Schedule Data Ground Station Registration Reservation Softwa re Hardware A t intenna a I mr Satellite or User i gt BU e Operation al Directives Data Robotic Device SCU Station Hawaii Station Figure 2 1 RACE g
65. eap operation of university satellites Our contribution to this effort has significant economic ramifications in conducting student research furthering hands on education of satellites and international student cooperation 7 5 Health and Safety RACE has no direct relation to health or safety in general There are obvious safety precautions that should be followed when operating any equipment including the equipment contained within the RACE system Other than basic safety the RACE system does not have an effect on the health and safety of society as a whole or on individuals not associated with the use of the system RACE could be used for research purposes but the scope of the project does not focus on the various research topics that can be explored with the system 7 6 Manufacturability RACE is partially built We have erected two stations one at Santa Clara University in Santa Clara California and the other in Pearl City Hawaii There are also two other schools University of St Louis and University of Austin Texas who are interested in the RACE program These colleges have a partial system set up and are awaiting the software If a school is interested we also support the construction of a ground station on their site Though the construction of each station is costly there is much funding available for projects of this type This project offers a great deal to the education community as a whole and provides exclusive opp
66. ent our project we needed to obtain HAM radio licenses to be able to transmit broadcast signals to an amateur satellite Thus there was much more learning to be done After becoming HAM licensees we were able to begin implementation Although we felt our design was solid we still ran into some obstacles We learned that the design process never ends Our design needed to be revised every time there was either a better way to implement system or a slight flaw in the design Additionally we looked to the advisors for suggestions or assistance to troubleshoot problems with the equipment Finally communications and compromise between teammates and advisors proved to be most vital to the project In order to accomplish our project on time and solve problems in a quick and timely fashion we needed to communicate constantly with each other and with our advisors Additionally because each of our styles of coding and implementation were different compromises were necessary to keep the project on schedule Communication also helped us to keep each of our implementation styles more uniform to ensure that the code was consistent and followed the design specification Furthermore the consistency of the code made maintaining the code and system much easier to handle 37 Appendix e Appendix A o Section Al o Section A2 e Appendix B o Section Bl o Section B2 e Appendix C o Section Cl o Section C
67. equipment The devices that are connected to the Serial Power Strip are e Antenna Controller e Packet Modem TNC e Transceiver e CI V Level Converter The code for the DataTurbine to Serial Power Strip can be found in Appendix C 16 For moreinformation for programming the transceiver and CI V level converter refer to http www plicht de ekki civ civtoc html V The extended ASCII table and information can be found at http www zegelin com computers files ref ACSII htm 18 CI V Level Converter is needed to send commands from the PC to the Transceiver Please reference RACE II Thesis http www cse scu edu send cgi srprojects 2002 COEN 2002 PROJECT 10 pdf 21 4 7 Antenna Control Software Labjack is a data acquisition device that is used in conjunction with Predict to provide an environment similar to Nova we can predict when and where a satellite will come into view and auto track its position when it is in view With the help of an Electrical Engineering graduate student Dan Schuet we successfully created a C executable file called the AntennaAutoTracker for the sole purpose of controlling the YAESU G 5500 antenna controller and integrated this program with DataTurbine to enable the transferring of information from server to client side Similarly to the Predict software we can control the AntennaAutoTracker program through the DOS command prompt and save any returned information to a buf
68. esponse from the Antenna Program NOTE This program works with the AntennaServer class and the Antenna class The AntennaServer class is responsible for taking in the command from the user and forwarding the response back to the user The Antenna class is responsible for sending the command to the AntennaControler device program ech import java io import java util public class AntennaServerInterpreter KOK KR KR KK KK KR K kk RI kk I RK RR KKK KKK KK KK ke e x kok Constructor KCKCKCKkCk ck ckck k k kk KOR KR k kok k kok k KR K kok kok k kok kk kk kok kk KCKCKCkCKCkCk kCk Ck k k Ck k kc k Ck kck ck kck ck ckok KKR ck kk d Description initializes the mapped variables for the control of the k Labjack Antenna Controler This constructor also establishes a x connection to the Ground Station using DT so that it can send commands to the device lt P gt Precondition No Precondition lt P gt Postcondition all variables are initialized to its default value If a connection was made successfully to the DT Server this constructor will return with no errors If there is an error connecting then the constructor will return with an RBNB DataTurbine error x public AntennaServerInterpreter commandArray 0 t auto tracking commandArray 1 a antenna orientation commandArray 2 s satellite position commandArray 3 help a
69. eturn true case 10 dt sendMessage OFF wait return true default return false Description This goes through the mapped commands of the Power Strip x and returns the index of that command lt P gt Precondition The user command must be sent of type String P Postcondition If the command is valid then this function returns X the index of the command If the command is not valid this x function returns 1 private int getCommandIndex String command 1 for int i20 i lt numCommand i if command toLowerCase startsWith commandArray i return i return 1 Description This is the help menu for the Power Strip lt P gt Precondition No precondition lt P gt Postcondition returns the help menu public static String getHelp String helpl nHelp File for Power Strip n n n String help2 commands n on n n off n n on lvconvert n n off lvconvert n n String help3 on xcr n n off xcr n n on modem n n off modem Win Nn String help4 on antenna n n off antenna n n help String help helpl help2 help3 help4 return help 52 Description This counts the number of arguments in a message of type String lt P gt Precondition A message of type String must be sent lt P gt Postcondition the number of words in a message is returned lt P gt NOTE Words are deliminated by spaces t private stati
70. fer static int num public static void main String args DataTurbi Stri Stri ng se tri tri System ou Turbine program ng host ng plugInNam ng commpor ne powerStripDT new DataTurbine variable to store address of host sendPowerStrip name of the plugin that will be used to read information from DT ndChannel sattest receivePowerStrip text the location of the channel to write information to DT COM3 the desired serial port to communicate on t println Welcome to the Power Strip to Data if args length gt 0 hos System ou else Sys return t args 0 t println Connecting to T host SE tem out println ERROR No RBNB host defined plugin used to create a channel that you will read from when client writes to powerStripDT powerStripDT powerStripDT channel openPluginConnection host plugInName addChannelReceive text registerReceiveChannel sink used to write a channel powerStripDT openSinkConnection host PowerStripServerSink powerStripDT addChannelSend sendChannel System out println Con Search for COM3 port portList CommPort Iden while portList hasMorel nected tifier getPortIdentifiers Elements 57 portId CommPortIdentifier portList nextElement if portId getPortType CommPortIde
71. fer We then write this buffer out to the receiveAntenna channel of DataTurbine so that the user can view the information 4 8 Packet Modem TNC The Packet Modem Also known as the TNC Terminal Node Controller is the hardware that is used to talk to a remote device For the purpose of our project it is used to communicate with Satellites Because of this the software had to be designed so that we can communicate with both the actual device at the ground station and the remote device i e a Satellite It was decided that Dan Schuet a graduate electrical engineering student should handle the TNC communication because of his knowledge of satellite communication He designed it with only one channel to send and receive information that comes through the terminal node controller One of the RACE team s objectives was to allow multiple applications to interface with the system One popular application that many universities use in their research is Matlab thus it was important to make sure this application was supported Due to lack of time we were unsuccessful in designing Matlab to communicate with the 19 Labjack and be found and purchased here http www labjack com 20 See Appendix E 6 for the source code 21 The antenna was installed by the RACE II team http www cse scu edu send cgi srprojects 2002 COEN 2002 PROJECT 10 pdf 22 M atlab can be found at http www mathworks com 22 ground station
72. ges from the device 5 The ground station writes information out to receiveChannel receive CD Ground Station App send receive Write 6 And the Client receives a response Client Side Program receive receiveChannel Figure 4 1 Information Flow Diagram Between Client and Server Side Programs Most of our classes except the TNC follow this general information flow Refer to this figure for the classes listed below 17 4 2 Class Structure Most of the classes follow a specific structure Refer to Appendix A All client side and ground station applications server side contain a DataTurbine class This is needed to establish a connection with the DataTurbine server so that there is a communication link between the client and server side applications Since each side will be accepting inputs either from DataTurbine or from the user directly both client and server side will have an interpreter that will validate commands and perform the appropriate operation Some of the programs may need to talk to a device connected to the serial port Therefore some of the classes will also need the Java Comm Port API to be able to write and receive information from the Serial Port 4 3 Satellite Tracking Software Predict Predict is the equivalent of the Nova program The difference between them and also the primary reason why Predict was chosen is that Predict has a command line based interface unlike N
73. ide Carleton Cheng lt A HREF mailto ClCheng scu edu gt CiChengGscu edu lt A gt P gt version reated P gt urpose eam lt P gt DO A CH ei A H from the the RBNB F ck o F o F F F F F Xo F import java import java import java 2 18 2004 Designed for Santa University RACE 2003 2004 Senior Design Description This class is used for receiving all information coming Transceiver located at the Ground Station This class uses RBNB Data Turbine to establish a connection with the ground station located at Santa Clara University Engineering Department For more information on DataTurbine and it s functionality please refer to website http rbnb creare com dree e ey lang public class TransceiverClientEcho public static void main String args Establish DataTurbine dt new DataTurbine DataTurbine Class used for connection String host Variable used to specify where DT Host is System out println RACE Transceiver Response Window n if args length gt 0 host args 0 user must specify where DT Host is System out println Connecting to host else System out println ERROR No RBNB host defined return connection with Ground Station by setting up channels dt openPluginConnection host receiveTransceiver dt addChannelReceive text dt registerReceiveChannel Syste
74. igure 3 8 RACE Hardware Block Diagram csse Figure 39 Lab Jack P IP Ep EE Figure 4 1 Information Flow Diagram Between Client and Server Side Programs E Figure 4 2 Ground Station System Arcitecture with DataTurbine Figure 4 3 MATLAB Interface anne enter Figure 5 1 Hardware Configuration Diagram e K eens Figure 6 1 Installation of RACE at NASA AMES Research Lab Figure A 1 Client Side OM Diagram Suche Figure A 2 Server Side OM Diagram Structure Figure I 1 RACE Client Program asus Figure J 1 Use Case Diagralm i cio TER EE en vii LIST OF TABLES Tables Table 1 1 University Missions Planning on Using RACE system 2 Table 6 1 Response Times of RACE System ee 29 viii Chapter 1 Introduction 11 RACE What is RACE In space there are hundreds of satellites orbiting the earth in order to provide us with benefits such as navigation signals weather information and phone internet communications These satellites are controlled by operators on the ground in order to manage the provision of these services and to remotely maintain the health of the spacecraft To do this commands and data must be relayed between the satellites and the human operators through the use of ground communication stations These communication stations are often distributed around the Earth in order to increase the amount of time
75. important because as the satellite orbits around the earth it is only visible for a maximum of 15 minutes and may not be in view again for another several hours later Information such as if there is still a connection between the ground station and the satellite and the strength of this connection is vital to the user The web interface also had many limitations However its biggest limitation was that users could not use their own program to send and receive data The user was restricted to the web based interface and typed commands in manually Another problem resided in the software architecture at the ground station computer To control the ground station the information was sent directly to the software which handled that particular set of information If this software were to change the interface may need to be altered to accommodate for the software differences Additionally the satellite tracking software Nova posed problems Because of Nova s properties the user must either be physically at the ground station or use a remote desktop application such as WinVNC to command the satellite tracking software 1 4 Project Goal The main goal of this year s project was to administer a complete overhaul of the previous software architecture Restructuring the system included devising a better interface that supports streaming technology making the ground station more versatile to support various interfaces and programs i e MATL
76. ine gt RBNB_V2 1 bin rbnb jar dir of DataTurbine gt RBNB_V2 1 bin source jar dir of DataTurbine gt RBNB_V2 1 bin rbnbjview jar dir of DataTurbine gt RBNB_V2 1 bin rbnbjcap jar make sure is shown above set Path under system vari dir of jdk gt bin make sure to se system paths Connect amp Install devices to t Labjack Antenna Controller Controller the computer th Serial Power Strip connec TNC Packet Modem conne Transceiver connected t Labjack can http www l WE The Antenna at the end of the classpath as ables to t this path in front of other he appropriate port connected to both the Antenna rough any USB port ted to COM3 Serial Port 3 cted to COM2 Serial Port 2 o COMI Serial Port 1 found and purchased online at abjack com Controller that is located at the 125 5 b NOTE kk KKKKK NOT tj RACE Download RACE RACE Server dir of RAC on starting Applications For fur compone 2003 2004 Senior files a Extract conten run batch file E gt dtHardware RAC See Instructions On Using RACE topping Santa Clara University Ground S YAESU G 5500 The Baytech RPC2 ore informatio http www kvms The TNC that is University is t Creator The Transceiver University is t Transceiver ther informatio nts zipped file
77. ing wait for information if message null System out println message if there s a message output it System out println 80 Section E3 Antenna Server Server Side Author Peter Salas 2 A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt P version Created 5 14 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class takes coordinates the actions and requests from the RBNB DataTurbine Specifically this forwards all commands coming in from DT to the AntennaServerInterpreter which interprets the user inputs All responses are then forwarded back to the user through DT import java io import java util public class AntennaServer public static void main String args AntennaServerInterpreter antennalnterpreter new AntennaServerInterpreter DataTurbine antennaDT new DataTurbine String host variable to store address of host String plugInName sendAntenna name of the plugin that will be used to read information from DT String sendChannel sattest receiveAntenna text the location of the channel to write information to DT String dtMessage The message coming in from DT String output The message that will be written out to DT String errorMsg ERROR Invalid Command n Type help f
78. ion G1 o Section G2 o Section G3 o Section G4 vobi resp Poesy wat oka A qd 38 ER 40 Client Side Class Structure une staaten 40 Server Side Class Structure ie Eege AE gece 40 dE 4 Client Input Client Side 41 DataTurbine Client amp Server Side 44 ska 50 Serial Power Strip Echo Client Side 50 Serial Power Strip Interpreter Client Side 54 Serial Power Strip Server Server Side 56 d 61 Predict Interpreter Client Side 61 Predict Echo Client Side 65 Predict Server Server Side eee 67 Predict Server Side NEE 70 Predict Interpreter Server Side 73 ET 76 Antenna Interpreter Client Side 76 Antenna Echo Client Side eee 79 Antenna Server Server Side sues 81 Antenna Server Side ee 83 Antenna Interpreter Server Side 86 AntennaAutoTracker Server Side 89 Geer 98 Terminal Node Controller Server Side 98 ee TUSAN VN re rer sendas ars uoce oa do 104 Transceiver Client amp Server Side 104 Transceiver Interpreter Client Side 109 Transceiver Echo Client Side 113 Transceive
79. ir of DataTurbine gt RBNB_V2 1 bin rbnbjcap jar make sure is at the end of the classpath as shown above b set Path under system variables to lt dir of jdk gt bin make sure to set this path in front of other system paths 4 Download RACE files a Extract into desired folder b run batch file located in the Root RACE directory NOTE To run shortcu he batch file from your desktop you can create a to this batch file 131 Section I6 Using RACE Client Program Gl Instructions On How to Use RAC You should see 1 batch file upon opening the folder The root folder of RACE Once clicked you will see 5 other windows pop up onto your screen Below you will find descriptions of each window that pops up and how they work 1 RACE_Client_Input Description This batch file opens up the command prompt window for sending commands to the ground station located at Santa Clara University Upon opening the RACE_Client_Input you will see the words Connecting to 129 210 19 118 3333 At this point the program is attempting to establish a connection with the Server If successfully connected the words Please Enter Command appear Else you will see a DataTurbine Error Here are a list of commands available Q NOTE If you get a DataTurbine Error the system will NOT work Contact the system administrator if this happen
80. iving all information coming from the Predict Program Satellite Tracker located at the Ground Station This class uses RBNB Data Turbine to establish a connection with the ground station located at Santa Clara University Engineering Department For more information on DataTurbine and it s functionality please refer to the RBNB website http rbnb creare com impor impor impor Gt cct ct java io java util java lang public class PredictClientEcho public static void main String args DataTurbine dt new DataTurbine DataTurbine Class used for connection String host Variable used to specify where DT Host is System out println RACE Predict Response Window n if args length gt 0 host args 0 user must specify where DT Host is System out println Connecting to host else System out println ERROR No RBNB host defined return Establish connection with Ground Station by setting up channels dt openPluginConnection host receivePredict dt addChannelReceive text dt registerReceiveChannel System out println Connected 65 while true String message dt receiveMessage 1 blocking wait for information if message null System out println message if there s a message output it System out println 66 Section D3 Predict Server Server Side QAuthor
81. l Power Strip Server Server Side Author Peter Salas lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt version Created 2 23 2004 Purpose Designed for Santa University RACE 2003 2004 Senior Design Team Description This class takes request coming in through DT and forwards the command out to the Serial Power Strip that is connected to the Serial Port any response coming from the Serial Power Strip is forwarded back out through RBNB Data Turbine TNCDT java 1 12 98 06 25 SMI Copyright c 1998 Sun Microsystems Inc All Rights Reserved Sun grants you Licensee a non exclusive royalty free license to use modify and redistribute this software in source and binary code form provided that i this copyright notice and license appear on all copies of the software and ii Licensee does not utilize the software in a manner which is disparaging to Sun This software is provided AS IS withou ALL EXPRESS OR IMPLIED CONDITIONS REP ENTATIONS AND WARRANTIES INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT ARE HEREBY EXCLUDED SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES IN NO EVENT ILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE PROFIT OR DATA OR FOR DIRECT NDIRECT SPECIAL CONSEQUENTIAL INCIDENTAL OR PUNITIVE
82. l int BAS base of number format for private int numberOfCommands private String command D1 dataBCD2 dataBCD3 dataBCD4 tored in an array endOfMsg FD E 16 serial communication KOR KR KKK kok k KR kok A kCk Ck kCk Ck k kc k Ck kck ck kck ck kok ck ckokck kk k KKKKKKKKKKKKK Constructor KOKCKCKkCk ck kck ck k k ke ke e ke x x KOK RR k kok k kok k RR kok k kok k KKK KKK kCk Ck kCk Ck k kc k kckck ck k kk k X kk Default Constructor public Transceiver 104 dataBCD1 00 dataBCD2 00 dataBCD3 00 dataBCD4 00 numberOfCommands 3 command new String numberOfCommands command 0 command 1 command 2 xcr sf command sets frequency xcr su command selects uplink mode xcr sd command selects downlink mode KOK KR k kok k kok k kok RR k kok k KKK KKK kok kok Ck k kc k kckck ck kok ck ckok ck OR e ke k x RK KKK Kok ck kk ke ke ke KX x Accessors amp Mutators KOK KK e e e x x KOR KR KKK kok k KR k kok k RA kc k kckck kckck ck ckok kc I e ke Accessor Methods public String getPreamble return preamble public String getDfaltXCRAddr return dfaltXCRAddr public String getDfaltAddr return dfaltAddr public String getCmdNo return cmdNo public String getSubCmdNo return subCmdNo public String getBCD int
83. lt A HRI Peter Salas EF mailto P gt version reated P gt urpose eam lt P gt Description 5 14 2004 DO A CH ei A H coming in from DT to th PSalas scu edu gt Designed for Santa University RACI This class takes coordinates from the RBNB DataTurbine Specifically PSalas scu edu lt A gt D 2003 2004 Senior Design the actions and requests this forwards all commands PredictServerInt the user inputs All through DT or ob F X 2 X Xo 2 Xo F F import java io import java util public class PredictServer responses ar public static void main String args then rpreter which interprets forwarded back to the user PredictServerInterpreter predictInterpreter new PredictServerInterpreter DataTurbine predictDT String host String plugInName String sendChannel the 1o to wri T TT int countArgs 0 String dtMessage String command String subCommand String output String errorMsg ER more information on how to Error Message D System ou program t println W if args length gt 0 host args 0 new DataTurbin variable to sendPredict name of the plugi to read informati sattest receiv e store address of host n that will be used o n from DT P cation of the cha te information to he number of argu he message from D
84. lt windows h gt include lt stdio h gt include lt conio h gt include lt iostream h gt include lt wtypes h gt include ljackuw h CALIBRATION PARAMETERS define EL MIN DEG 0 0 define EL MIN AD 0 0 analog voltage from rotor define EL MAX DEG 180 0 define EL MAX AD 247 0 define AZ MIN DEG 0 0 define AZ MIN AD 25 0 define AZ MAX DEG 360 0 define AZ MAX AD 213 0 define THRESH DEG 2 0 2 degress Labjack Channels define EL UP CHANNEL 2 define EL DN CHANNEL 3 define AZ POS CHANNEL 0 define AZ NEG CHANNEL 1 Func Prototypes This function gives you the azimuth and elevation of satellite using Predict Returns true if satellite is currently in view and false if it is not bool SatPosition int output az int output el Parse through what Predict returns and get azimuth and elevation void parsePredictLine char buffer int AZ int EL 89 Finds and returns azimuth for next satellite pass int getNextPassAZ void Reads the current antenna azimuth and elevation void readCurrentAntennaOrientation float AZ float Gl L Antenna Motion Functions void antennaMoveUp void void antennaMoveDown void void antennaRotatePos void void antennaRotateNeg void void antennaSTOPEL void void antennaSTOPAZ void void antennaSTOPALL void void main int nargs char args
85. m Santa Clara University is building a geographically distributed network of communication stations in order to operate many of the satellites built by SCU and its academic partners Our software will be distributed and installed at various institutions such as NASA the University of Hawaii the University of Texas at Austin and Georgia Tech Once our software is distributed installed executed and tested the RACE project will begin the early phases of increasing the amount of time that communications may take place given line of sight transmission constraints As a result the RACE system will serve as the first layer of a global robotic control network that supports distributed research and education for students throughout the world 8 2 Future Uses The project has many uses and can be extended to provide a multitude of others such as allowing teachers to give their students the unique opportunity to experience controlling a satellite or remote vehicle Additionally this project may be used to control robotic devices for research in space underwater or other areas out of human reach However the current focus of this project is the remote control satellites which have functions such as take pictures collect data and observe weather conditions of space One main use of the RACE system is to test experimentally new satellite operations techniques Clearly testing such techniques without a truly operational system poses much diffic
86. m out println Connected while true 113 String message dt receiveMessage 1 blocking wait for information if message null System out println message if there s a message output it System out println 114 Section G4 Transceiver Server Server Side Author lt A HRI versio Created Purpose Team Descrip Serial back ou TNC Copyrig Sun gra to use This sof GC EF n 2 e D tio Por t t DT ht nts mo code form on all copies of the software and ii Licensee does not utilize the software in a manner which is disparaging to Sun ALL EXP RES ITS LIC INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT ARE HEREBY EXCLUDED SUN AND ENS LICENSE I AS A RESULT OF USING MODIFYIN arleton Cheng mailto ClCheng scu edu gt ClCheng8scu edu lt A gt 23 2004 esigned for Santa University RACE 2003 2004 Senior Design n This class takes request coming in through DT and forwards the command out to the Transceiver that is connected to the t any response coming from the Transceiver is forwarded hrough RBNB Data Turbine java 1 12 98 06 25 SMI c 1998 Sun Microsystems Inc All Rights Reserved you Licensee a non exclusive royalty free license dify and redistribute this software in source and binary provided that i this copyright no
87. nd station identified During this past academic year the SCU RACE station has been used regularly to operate the Sapphire microsatellite Table 1 summarizes the university missions planning on using the RACE system within the next 3 years Satellite Name University Mission Status Photography Sapphire Stanford communications component Operational on orbit test autonomy test 2 satellite formation flying n SCU Stanford MIT technology demonstrations In development 2 satellite formation flying FAO EE technology demonstrations In development Washington Univ in Sty Vision based sensing and ARD Louis SCU satellite inspection lni na NASA Ames Stanford SCU Astrobiology genetics EE EE Genesat Cal Pol ST launch scheduled T P Nov 2005 Some in orbit CubeSats Various Developers Various experiments several launched yearly FADSat SCU Hardware and automation Operational in the testing lab Table 1 1 University Missions Planning On Using RACE system Over the past few years RACE has evolved from a simple remote communications project into a web controlled satellite communications environment In its fourth year we developed a better ground station system architecture 1 2 History Phase I of RACE began in 2000 2001 by the RACE I team comprised of three electrical engineers Their goal was to develop a Remote Accessible Communications Environment The RACE I team successf
88. ndex command return Description Precondition String lt P gt Accessors amp Mutators KOR KR k kok k kok k RR kok k kok RI k kk X kk kCk Ck k k Ck k KR RAK KRK kk k X KKK The comma is sent and functio Postcondition false it returns false This sends the command to the Ground S nd from the user must be sen If the command is a valid command Else n returns true public boolean sendCommand String command int index switch index case 0 retu case 1 case 2 re case 3 re case 4 re case 5 re d dt retu getCommandIndex command true true true true true ndMessage OFF true t 1 ndMessage ON 1 wait ndMessage OFF 1 wait ndMessage ON 3 wait ndMessage OFF 3 wait ndMessage ON 6 wait 6 wait KOK KK KK ke e e KK This function validates a user command lt P gt The user input must be sent of type String lt P gt If the command is a valide command this function Else tation lt P gt t of type then the command nction returns LE 51 case 6 dt sendMessage ON 4 wait return true case 7 dt sendMessage OFF 4 wait return true case 8 sends the command to the receivePowerStrip channel instead of sendPowerStrip channel dt2 sendMessage getHelp wait return true case 9 dt sendMessage ON wait r
89. ned in the classic classroom setting Through this project we have learned skills that will help us throughout our lives We have learned how to teach our selves through research allowing us to continue our learning process in the future 7 11 Compassion RACE does not not directly seek to relieve the suffering of others Its main purpose is develop the framework for a network of groundstation for remote access control of robotic devices However since this is only a framework there are many applications that can be applied to the project Someone could essentially use our framework to provide a means of cheap communication to remote locations that need emergency help RACE could be used for search and rescue operations to control rebotic devices in areas that are highly dangerous for humans 34 Chapter 8 Conclusion 8 1 Summary This year s team enhanced the capabilities of the RACE system by administering a complete overhaul of the existing ground station software architecture We accomplished this by removing LabView Nova and the SASI Satellite Tracker hardware and replacing them with RBNB DataTurbine Predict and the LabJack hardware respectively Additionally because of our design the RACE system is prepared to handle various user applications making the system more versatile By completing these tasks we were able to improve the ground station s remote accessibility and efficiency Currently through the RACE progra
90. ng channelName try sNum sMap Add channelName catch SAPIException se se printStackTrace Description adds a receiveChannel lt P gt Precondition channelName is of type String lt P gt Postcondition attempts to add a channel lse the function will S print out the stack trace error public void addChannelReceive String channelName try rNum rMap Add channelName catch SAPIException se se printStackTrace Description adds a accessChannel P Precondition channelName is of type String lt P gt Postcondition attempts to add a channel Else the function will print out the stack trace error public void addChannelAccess String channelName try aNum aMap Add channelName catch SAPIException se se printStackTrace Description gives the index of the sendChannel P Precondition the user has added a sendChannel lt P gt Postcondition the index of the sendChannel is returned public int getIndexSend return sNum 46 Description gives the index of the receiveChannel lt P gt Precondition the user has added a receiveChannel lt P gt e Postcondition the index of the receiveChannel is returned public int getIndexReceive return rNum Description gives the index of the accessChannel lt P gt Precondition the user has added a accessChannel
91. ng cmd int wait This function checks then sends the command to the transceiver hardware param input the command in the following format XCR subcommand L functions sf frequency value sets th d frequency of the following form XXX XXX X k XXX XXX K XXX su sets Transceiver to UPLINK mode sd sets Transceiver to DOWNLINK mode Qreturn void KJ if cmd null if validateCommand cmd true System out println This is what you just typed cmd n dt sendMessage cmd wait 111 Frequency Set wait Mode Set wait if cmd startsWith command 0 dt2 sendMessage Transceiver if cmd startsWith command 1 dt2 sendMessage Transceiver Uplink if cmd startsWith command 2 dt2 sendMessage Transceiver Downlink Mode Set wait if cmd startsWith command 3 dt2 sendMessage getHelp wait public static String getHelp String helpl nHelp File for Transceiver n n n String help2 commands n sf lt frequency gt tsets the frequency to the given lt frequency gt n n String help3 su t t tsets the mode to uplink n n String help4 sd t t tsets the mode to downlink n n help String help helpl help2 help3 help4 return help 112 Section G3 QAuthor Transceiver Echo Client S
92. ns findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation TABLE OF CONTENTS Page ADSIEA E i Acknowledgements nun ii Chapter 1 Introduction sse 1 1 1 RACE What is Race ansehe 1 1 2 HIStory Soc See 3 UN EE 3 1 4 Project Goal unsere 4 1 5 Contributions eR a 4 Chapter 2 Overall System Integration 6 21 SYSE OV ou Pe 6 2271 62m Eege nenne 8 2 3 Design Process and Choices cee eee eee eee ence nee eeeeneeeeenae ences 8 Chapter 3 Hardware eee 10 3 1 Current Hardware and Components Overview eee ee e e e K K KK 10 3 2 Current Hardware Design sr ee ee kn 14 3 3 Lablack and Satellite Tracking ana ea 16 Chapter A Software 0000000000000 ere reser er ere rna 17 4 1 Information Flow between Client and Server 17 4 2 Class Structure ana aaa ae ee u do ola 18 4 3 Satellite Tracking Software Predict sss see 18 44 RBNB Data Turbine es as 54 NEEN AAA n ENT eaten 19 K SL TANSCEIVER seen reise EEA deo 20 4 6 Serial Power Stnp TT 21 4 7 Antenna Control Software see eee e e rr rss 22 4 8 Packet Modem TNC s 22 Chapter 5 User Management 24 5 1 How to Install the System Client SIde 24 5 2 How to Install the System Server Side 24 5 3 Computer Specification and Configuration Client Side 25 5 4 Compute
93. ntennaDT new DataTurbine Establish connection to DT Server located at Santa Clara University Ground Station 86 This should change if the DT Server moves antennaDT openSinkConnection localhost 3333 AntennalnterpreterSink antennaDT addChannelSend sattest receiveAntenna text kk oko k kok k k kk k kok kok kok k KKK KK k x d RK KKK Kok k k kk ko Accessors amp Mutators KOK KKK e e e KK KR KR k kok k kok k KR kok I I A KKK KKK Description This function validates a user command lt P gt Precondition The user input must be sent of type String P Postcondition If the command is a valide command this function return true Else it returns false public boolean validateCommand String command 1 return getCommandIndex command 1 Description This sends the command to the AntennaAutoTracker k program lt P gt Precondition The command from the user must be sent of type x String lt P gt Postcondition If the command is a valid command then the command x is sent and function returns the information coming from the Program Else the function returns null public String performCommand String command int commandIndex getCommandIndex command switch commandIndex case 0 antennaDT sendMessage Auto Tracking Started 1 Antenna autoTrackSatellite case 1 return Antenna getAntennaPosition case 2 return An
94. ntf Rotating positive n antennaRotatePos Sleep 1000 antennaSTOPALL Sleep 1000 printf Rotating negative n antennaRotateNeg Sleep 1000 antennaSTOPALL Sleep 1000 while again amp amp kbhit Sleep 100 readCurrentAntennaOrientation amp ant currAZ amp ant currEL errorEL ant currEL float npEL errorAZ ant currAZ float npA2 system cls 92 THRESH_DEG THRESH_DEG printf Elevation Error f n errorEL printf Azimuth Error f n errorA2 if errorEL gt THRESH DEG antennaMoveDown else if errorEL lt antennaMoveUp if errorAZ gt T HRESH DEG else if errorAZ antennaRotate antennaRotateNeg Sach HRESH DEG Pos if errorEL THRESH D EG amp amp errorEL antennaSTOPEL if errorAZ THRESH D EG amp amp errorAZ antennaSTOPAZ if errorEL THRESH D EG amp amp errorEL IHRESH DEG amp amp errorAZ THRESH D postion n else EG amp amp errorAZ gt T printf HRESH DEG antennaSTOPALL again false Done n antennaSTOPALL printf printf printf printf PN a exit 1 AntennaAutoTracker Ey a s bool Sat
95. ntifier PORT_SERIAL if portId getName equals commport PowerStripServer powerstrip new PowerStripServer System out println portId getName found portfound true if portfound false System out println Port was not found n nExiting program while port found if dataReady try Thread sleep 200 ms wait to finish sending data Push data onto the server check if there is something in buffer if sBuffer null amp amp sBuffer System out println Placing string sBuffer into server powerStripDT sendMessage sBuffer reset flags dataReady false sBuffer catch InterruptedException e send the message through DT messageString powerStripDT receiveMessage if messageString null stx 1 clear buffer System out println Data ready to be received from DT System out print Command messageString messageString messageString char OxD String accept Y char OxD try 58 outputStream write messageString getBytes catch IOException e System out println sent to serial n try Thread sleep 200 catch Exception e try outputStream write accept getBytes catch IOException e try Thread sleep 200 catch Exception e stx 0 public PowerStripServer try serialPort Seri
96. ntln subCommand switch commandIndex case 0 if Predict updateKeplerians subCommand System out println Update Completed return Update Completed System out println Update Unsuccessful return Update Unsuccessful case 1 System out printin Getting Satellite Info return Predict getSatelliteInfo subCommand case 2 System out println Getting next Pass of Satellite return Predict getNextPass subCommand case 3 System out println Getting Help return getHelp default return null Description This goes through the mapped commands of the Predict X program and returns the index of that command lt P gt Precondition The user command must be sent of type String lt P gt Postcondition If the command is valid then this function returns K the index of the command If the command is not valid this x function returns 1 private int getCommandIndex String command for int i20 i lt numCommand i if commandArray i equalsIgnoreCase command return i return 1 Description This outputs the help menu lt P gt Precondition No Conditions lt P gt Postcondition The function returns a String help message private String getHelp String help Help File for Predict n n ncommands n update lt tle file containing Keplerians gt n tNOTE the kep file you should update should be predic
97. or more information on how to send commands to Antenna Software System out println Welcome to the Antenna to Data Turbine Server program if args length gt 0 host args 0 The user must enter in the IP of the DT Server System out println Connecting to host else System out println ERROR No RBNB host defined return 81 Establish a connection with the DT Server and setup Channels antennaDT openPluginConnection host plugInNane antennaDT addChannelReceive text antennaDT registerReceiveChannel antennaDT openSinkConnection host AntennaServerSink antennaDT addChannelSend sendChannel System out println Connected while true dtMessage antennaDT receiveMessage 1 blocking call to receive data from DT if antennaInterpreter validateCommand dtMessage output antennalnterpreter performCommand dtMessage antennaDT sendMessage output 1 wait only 1 milisecond for a response else antennaDT sendMessage errorMsg 1 82 Section E4 Antenna Server Side Author Peter Salas lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt P version Created 5 14 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team P Description This class is used for communicating with the Antenna
98. or the control of the Labjack Antenna Controler This constructor also establishes a connection to the Ground Station using DT so that it can send commands to the device P Precondition The IP of the DT Server must be given to establish a connection lt P gt Postcondition all variables are initialized to its default value If a connection was made successfully to the DT Server this constructor will return with no errors If there is an error connecting then the constructor will return with an RBNB DataTurbine error Aj public PowerStripClientInterpreter String host commandArray 0 power on lvconvert commandArray 1 power off lvconvert 1 commandArray 2 power on xcr commandArray 3 power off xcr commandArray 4 power on modem 50 commandArray 5 commandArray 6 commandArray 7 commandArray 8 commandArray 9 commandArray 1 power off modem power on antenna power off antenna power help power on power off dt openSinkConnection host PowerStripClientSink dt addChannelSend sattest sendPowerStrip text dt2 openSinkConnection host PowerStripClientSink2 dt2 addChannelSend sattest receivePowerStrip text KOR KR KK kok k KR KKK I KKK kk kk k kk kk k kk d RK KKK kk kok Description Precondition Postcondition x return true public boolean validateCommand String command getCommandI
99. ortunities for all parties involved 7 7 Sustainability RACE is now four years old and still in its infancy There is much more work to be completed to obtain the full benefits of the RACE system This project is sustainable for 32 many years to come as satellite networks become even more relied upon by our society RACE allows for students to gain hands on experience in an industry that is tightly watched by the government RACE has been built to accommodate future growth WE have implemented each part as a component to the whole which can be easily modified without reconstructing the entire system This is an important aspect to the project as future years will want to focus on perfecting specific aspects of the RACE system without wanting to learn specifics about other components 7 8 Environmental Impact The RACE project as a whole has a large environmental impact not in the classical sense of the earth but on space RACE is a network of satellites and ground stations Each satellite that is put into orbit takes up some of the orbital space As satellites go out of commission or break they become space garbage continually orbiting earth until eventually they burn up in the earth s atmosphere Considerations must be made when a new satellite goes up to ensure that the satellite offers value to the university community The second aspect of RACE that impacts the environment is the ground stations Ground stations must be maintained B
100. ource to write to DT te Sink sink Sink to process requests to DT te ChannelMap sMap aMap rMap ChannelMaps for sending receiving and accessing te PlugInChannelMap picm An extended version of a ChannelMap for a PlugIn te int sNum aNum rNum 48 Index values of the ChannelMaps 49 Appendix C Section C1 Serial Power Strip Interpreter Client Side Author Peter Salas A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt P version Created 2 20 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class is used for validating user inputs and interpreting inputs to the actual commands that the Ground Station accepts for remote access Specifically this class validates commands for the Power Strip To establish a connection with the Ground Station located at Santa Clara University Engineering Department For more information on DataTurbine and its functionality please refer to the RBNB website http rbnb creare com SS import java io import java util public class PowerStripClientInterpreter KOR KR KR KK KK KR I KKK KKK KKK KKK KKK RR KKK KKK KK OK KKK x Constructor KCKCKCKkCk ck kck KKK KOK KR hh hh E kok k I KKK k kok k KRK KKR Ck k k Ck k kc k kckck ck kok ck kok X kk kk d Description initializes the mapped variables f
101. ova This enables us to call on predict from a Java program through a DOS command prompt window and store the information from the window to a buffer Predict is a powerful program that serves our three important goals in a satellite tracking software e Remote updating of Keplerian elements used for calculating the position of a satellite e Requesting the current position of a particular satellite e Requesting the next pass over the ground station of a particular satellite Predict has numerous functionalities that can be performed from the dos command prompt however only three main functions are supported right now e Predict update predict tle Updates Keplerian Elements e Predict poss Satellite senenn Requests position of Satellite e Predict pass Satellite sne Requests next pass of Satellite 12 The Java Com Port API can be found at http java sun com products javacomm 13 Predict can be found and downloaded here http www ol net kd2bd predict html 18 44 Ring Buffered Network Bus RBNB DataTurbine RBNB Ring Buffered Network Bus DataTurbine is the heart of our system It allows a user to talk to the devices through this one application Previously LabView served this purpose of integrating the ground station components into one application but the problem with it was that it was not designed for real time control of the ground station The web based in
102. ption open a source connection given the address of the rbnb server and the name of the source the user wants to open lt P gt Precondition user must provide the address of the rbnbserver host and the name of the source that the user wants to establish lt P gt Postcondition function will attempt to establish a connection else the function will print out the stack trace error xo xo x xXx Ay public void openSourceConnection String rbnbServer String SourceName try source OpenRBNBConnection rbnbServer sourceName catch SAPIException se se printStackTrace Description open a sink connection given the address of the rbnb x server and the name of the sink the user wants to open lt P gt Precondition user must provide the address of the rbnbserver host 3 and the name of the sink that the user wants to establish lt P gt Postcondition function will attempt to establish a connection else the function will print out the stack trace error XL public void openSinkConnection String rbnbServer String sinkName try sink OpenRBNBConnection rbnbServer sinkName 45 catch SAPIException se se printStackTrace Description adds a sendChannel lt P gt Precondition channelName is of type String lt P gt Postcondition attempts to add a channel lse the function will a print out the stack trace error public void addChannelSend Stri
103. r regis the plugin if there is it pulls the message out and ns it back to the user Precondition must open a plugin connection The message needs to be of type String Also the receiveChannel has to have been tered to the plugin The value wait is the number of miliseconds DT should wait for a response If the value is amoun Postcondi negative i e 1 the DT will wait for a response infinite t of time blocking wait tion the message is returned to the user if there is a message Else the message lt not ready gt will be returned if there o X F F F Xo X x is no new data to be taken from the DT server public String receiveMessage int wait try String message null PlugInChannelMap picm plugin Fetch wait picm PutTime double System currentTimeMillis 0 extract message silently ignore nontext messages if picm NumberOfChannels gt 0 T if picm GetType 0 ChannelMap TYPE STRING message picm GetDataAsString 0 0 String response Message Received picm PutMime 0 text plain picm PutDataAsString 0 response plugin Flush picm plugin Flush picm return message catch SAPIException se se printStackTrace return lt not ready gt L priva priva priva priva priva priva te PlugIn plugin null Dynamic Source te Source source S
104. r Server Server Side sse 115 Appendix TT 123 o Section Hl Server Side Directory Structure 122 o Section H2 Individual Batch Files sese eee 122 o Section H3 Mum Batch File oer ee 123 o Section H4 Installation Instructions sse e e e e 0 124 o Section H5 Using RACE Server Program 125 ZAPPER RE 127 o Section Il Client Side Directory Structure 127 o Section I2 Individual Batch Files sese eee 127 o Section I3 Main Batch File u sauna 128 o Section I4 Picture of RACE Client Program 120 o Section IS Installation Instructions 2css2eseeeseseneenn 130 o Section I6 Using RACE Client Program eee e ee e e e K eee e eee 131 o Section I7 Matlab Configuration and User Manual 134 Appendix I ere oe ex ER EH ERE ie K Acie p eae a 136 a eT C E Use Case cures e olea reed 136 o Section J2 Use Case Descriptions scere reo Po oet pt ponese d 137 vi LIST OF FIGURES Figures Figure 1 1 Ground track of Sapphire NO 45 with the Santa Clara ground station Identified asus era Figure 2 1 RACE ground system architecture sse eee ee eK Figure 3 1 ICOM 9010 35343 nee Figure 3 2 Kantronies EE Figure 3 3 Baytech RBC nee Nana Figure 3 4 ICOM CLV Level Converter see Figure 3 5 ICOM PS 125 Power Source erc eee e EN dee Figure 3 6 Yaesu G 5500 Antenna Controller eese Figure 3 7 LabJack U 12 and LabJack PiggyBack eee F
105. r Specification and Configuration Client Side 25 5 5 How to Use the System Client SIde 26 5 6 How to Use the System Server Side 27 5 7 User Experience eu ree REP ENTER CETUR RRE atak obl nds 27 Chapter 6 Experimentation and Testing 29 Gul PTESting Results asien 29 6 2 RACE Installation Metric geen see ea 30 Chapter 7 Societal Issues 0 000i0oaeiceiesisssirsirrsrrsrrrsresn 31 TA Bitliteal va ee ad TE OV Sa ERR We Aa RR RES ON aS ON SRS 31 VEG EE 31 EE Political i ei edd ave ere Peres uii Ee ea 31 VE ECONOMIC 22 M ts 32 T gt Healthiand Safety nos seeders dee aie an 32 7 6 M n fact rability EEN 32 Ti Sustamabiliiy inte ee 32 3 0 Environmental eet 33 1 9 RE EE 33 7 10 Lifelong learning ss c I 34 ZAL COMPASSION ee eco ase Ten a pO aes DAL RUE UR aT 34 Chapter 8 Conclusion sess 35 Rl Neo Trim rris AER TR ST caddies ids EEN 35 8 2 Future TTT 35 8 3 Future Wel e 36 8 3 Lessons Learned 0000000000000 hse eene 37 e Appendix A o Section Al o Section A2 e Appendix B o Section Bl o Section B2 e Appendix C o Section Cl o Section C2 o Section C3 e Appendix D o Section DI o Section D2 o Section D3 o Section D4 o Section D5 e Appendix E o Section El o Section E2 o Section E3 o Section E4 o Section E5 o Section E6 e Appendix F o Section FI e Appendix G o Sect
106. r not a command is valid or not param input the command in the following format XCR subcommand functions sf frequency value sets th frequency of the following form XXX XXX X XXX XXX K XXX su sets Transceiver to UPLINK mode a sd sets Transceiver to DOWNLINK mode return boolean 7 for int i 0 i lt numberOfCommands i if input toLowerCase startsWith command i if input toLowerCase startsWith command 0 return validFrequency input else return true return false private boolean validFreguency String input This function checks whether or not a frequency is valid Or not param input SR the entire command in the following format XCR subcommand functions sf lt frequency value gt sets the frequency of the following form XXX XXX X lt x 0 9 110 x XXX XX XXX su x sd Qreturn x boolean d try StringTokeni StringTokenizer input substrin for int i 0 int fr Integer parseInt cmd nextToken if 0 catch Exception e return false x lt X lt x 0 9 0 9 sets Transceiver to UPLINK mode sets Transceiver to DOWNLINK mode zer cmd new g 8 cmd hasMore eqVal 10 lt freqVal return true U Elements i freqVal lt 9999999 public void sendCommand Stri
107. rams C Class Files G Java Files Thereis a master batch file that loads up all the device specific batch files in the Class Files folder This batch file is located in the root folder of RACE Client Programs M ore information about the main batch file can be found in Section 3 Section 12 Individual Batch Files RACE Client Programs Class Files RACE Antenna Echo bat echo off java AntennaClientEcho 129 210 19 118 3333 pause RACE Client Programs Class Files RACE_Client_Input bat echo off java ClientInput 129 210 19 118 3333 RACE Client Programs Class Files RACE Power Echo bat echo off java PowerStripClientEcho 129 210 19 118 3333 pause lt RACE Client Programs gt Class Files RACE_Predict_Echo bat echo off java PredictClientEcho 129 210 19 118 3333 pause lt RACE Client Programs gt Class Files RACE_Transceiver_Echo bat echo off java TransceiverClientEcho 129 210 19 118 3333 pause 128 Section 13 Main Batch File lt RACE Client Programs gt RACE_Program bat echo off echo Invoking all Client Side Programs pushd Class Files start RACE_Client_Input popd rem pause pushd Class Files Start RACE Power Echo popd rem pause pushd Class Files start RACE Predict Echo popd rem pause pushd Class Files Start RACE Antenna Echo popd rem pause pushd Class Files start RACE Transceiver Echo popd rem pause echo Finished
108. received from DT System out print Command messageString uM H NI Kl 117 if handleXCR validCommand messageString true try outputStream serialPort getOutputStream catch IOException e PEVA Thread sleep 1000 Be sure data is xferred before closing catch Exception e if messageString toLowerCase startsWith command 0 try handleXCR setFrequency messageString Gl outputStream write Integer parseInt handleXCR getPreamble BAS Gl outputStream write Integer parseInt handleXCR getPreamble BAS outputStream write Integer parseInt handleXCR getDfaltXCRAddr B ASE D outputStream write Integer parseInt handleXCR getDfaltAddr BAS outputStream write Integer parseInt handleXCR getCmdNo BASE Gl outputStream write Integer parseInt handleXCR getSubCmdNo BAS outputStream write Integer parseInt handleXCR getBCD 1 BASE outputStream write Integer parseInt handleXCR getBCD 2 BASE outputStream write Integer parseInt handleXCR getBCD 3 BASE outputStream write Integer parseInt handleXCR getBCD 4 BASE Gl outputStream write Integer parseInt handleXCR getEndOfMsg BAS handleXCR resetToDefault catch IOException e if messageString toLowerCase start
109. rocess Runtime getRuntime exec AntennaAutoTracker t return true catch Exception e System out println e return false 83 Description Sends a command to AntennaAutoTracker asking it where i the antenna is pointed now lt P gt Precondition The Antenna Controller must be connected to labjack and S receiving power lt P gt Postcondition The function returns the current position of the z antenna public static String getAntennaPosition ery A Process process Runtime getRuntime exec AntennaAutoTracker a process waitFor InputStream in process getInputStream o tring stringIn int charIn char tempChar while charIn in read 1 tempChar char charIn Character tChar new Character tempChar stringIn tChar toString return stringIn catch Exception e System out printin e return null Description Sends a command to AntennaAutoTracker asking it where SAPPHIRE is currently lt P gt Precondition The Antenna Controller must be connected to labjack and receiving power lt P gt Postcondition The function returns the current position of SAPPHIRE public static String getSatellitePosition try Process process Runtime getRuntime exec AntennaAutoTracker s process waitFor InputStream in process getInputStream un tring stringIn int charIn char tempChar
110. rom the Comm Port while gt 0 numBytes inputStream available Construct string byte fBuffer new byt for j 0 j numBytes j inputStream read readBuffer numBytes fBuffer j readBuffer j 102 sBuffer sBuffer new String fBuffer catch IOException e break 103 Appendix G Section G1 Transceiver Client amp Server Side Pur Tea Bau ve fo EEE op CR ee ox Se import import import import public lt A HR The Transceiver class handles the validation formatting and accessor methods for the transceiver commands pose Designed for Santa University RACE 2003 2004 SeniorDesign m thor Carleton Cheng rsion Created April 12 2004 java io java util java lang javax swing class Transceiver variables and constants fo EF mailto ClCheng scu edu gt ClCheng8scu edu lt A gt r Tranceiver private static final String preamble FE fixed preamble private static final String fixed default tranceiver private static final String fixed default address dfaltXCRAddr 60 address dfaltAddr 00 private static String cmdNo 00 temporary command number private static String subCmdNo 00 temporary sub command number private static String dataBC BCD portion of command s private static final String fixed end of message code private static fina
111. round system architecture Specifically the user would be able to log in to the RACE system and remotely command each satellite or robotic device to configure the system to their desired specifications For example if they wished to do so users may send commands to set the appropriate frequency in order to make contact with their satellite The RACE system accomplishes contact with these satellites and robotic devices through the use of HAM 4 Figure 2 1 was taken from the RACE 2002 Senior Thesis on pg 5 of the following link http www cse scu edu send cgi srprojects 2003 COEN 2003 PROJECT 25 pdf radio signals In order to increase the efficiency and usability of the system this year s RACE team administered a complete overhaul of the previous software architecture Consequently LabView was replaced by RBNB Data Turbine which is described in Chapter 5 section 4 2 of this thesis We chose RBNB Data Turbine because of its ability to handle streaming technology its ability to support various programs and its efficiency to handle data and networking between ground stations The Java programming language was chosen as the primary language because RBNB Data Turbine is a Java based application Thus using Java made it easier to integrate our component control software with RBNB Data Turbine To make the system truly remote accessible we integrated LabJack and the Predict satellite tracking software into the system To address
112. rpreter performCommand command subCommand send the output through DT back to the user predictDT sendMessage output 1 else predictDT sendMessage errorMsg 1 Description Precondition Postcondition Counts the number of arguments lt P gt The message of type String must be passes in lt P gt The number of arguments is returned new StringTokenizer message private static int countArguments String message StringTokenizer s return st countTokens Description This gets the specific argument in a message lt P gt Precondition There must be a message of type String passed in and also the specific argument that the user wants to pull out So 68 P xo F Auf if the user wants the second argume 2 in lt P gt ostcondition If there is word at the is returned If not then the func private static String getArgument Stri nt they would pass the number Specified position that word tion returns null ng message int argNum int count 1 StringTokenizer st new StringTok while st hasMoreTokens if count argNum return st nextToken count st nextToken return null nizer message 69 Section D4 Predict Server Side Author Peter Salas lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt P version Created 3 1
113. s Commands Description predict help Displays the help menu for controlling Predict which is the satellite prediction software It is similar to the NOVA software and all commands that deal with gathering information about current possition or future pass of a specific satellite should be directed here predict update lt Keplerian gt Updates the Keplerian elements predict poss Satellite Requests the current possition of the Satellite predict pass Satellite Requests when the next time the Satellit will be in view power help controls power of 1 Level Converter for Transceiver 2 Transceiver 3 TNC Modem 4 and the Antenna Controller This displays all the commands necessary in controlling this device power on turns on all devices 132 power off power on lvconvert power off lvconvert power on xcr power off xcr power on modem power off modem power on antenna power off antenna xcr help xcr sf frequency xcr SU sd xcr lt Invalid Command gt antenna help antenna t antenna a antenna s turns off tur necessary Transceive ns off ns on t ns off ns on t ns off ns on t turns off Displays t con sets the f ns on the level converter trolling the all devices This is in sending commands to the r the level converter he Transceiver the Transceiver he TNC modem
114. sWith command 1 Try 118 ASE ASE ou ou ou ou ou ou tpu tpu tpu tpu tpu tpu ou tpu ES ES tS tS tS ES tS crea crea crea crea Ered crea crea wri wri wri wri wri wri wri te I te I te I te I te I te I te I teger teger teger teger teger teger teger parseInt parseInt parseInt parseInt parseInt parseInt parseInt catch IOI if messageString toLowerCase startsWi ou ou ou ou ou ou tpu tpu tpu tpu tpu tpu ou tpu ES ES tS tS ES tS tS crea crea crea crea crea crea crea wri wri wri wri wri wri wri te I te I te I te I te I te I te I teger teger teger teger teger teger teger try parselnt parselnt parselnt parselnt parselnt parselnt parselnt catch IOI handleXC handleXC ULin kl Gl Preamble BAS handleXC handleXC handleXC handleXC handleXC handleXC handleXC R ge R ge R ge tPreamble BAS Dfal Dfal rj tXCRAddr B Gl tAddr
115. ser Admin 77 Reboot System Adjust Packet Modem Request Data View Received Data View Signal Meter View Satellite Information va Equipment Figure J 1 Use Case Diagram 137 Section J1 Use Case Descriptions The Use Case Description depicts how different users interact with the system It is described as follows Users The users are those who will use the RACE System ADMIN The administrator has full access to the RACE system USER The user is the person registered with the system He or she can be located anywhere around the world Equipment The equipment is the physical equipment used in the RACE system EQUIPMENT The equipment handles user requests such as adjusting equipment as well as communication with the satellite such as sending and receiving data Equipment includes Server the server will provide the link between the user and equipment It will also house the database Packet Modem the packet modem will handle the data packets that are sent to and received by the satellite CI 5 Level Converter the converter is used to make the transceiver controllable from a computer Transceiver the transceiver receives data from the modem converts it to radio waves and sends through the antenna It also receives radio waves from the antenna which is decoded by the packet modem Antenna the antenna is used to send signals to and receive
116. ss any 6 Five more Welcome S Server a AS b An programs if you do not wait for the RBNB Server to start e second window that prompts you to press any key key dos command prompt windows will pop up Each one has a creen and say that it is connecting to the RBNB uccessful connection will print out connected This means that you can now connect to the ground station using the client side application Unsuccessful connection will print out Several RBNB Errors Error Handli ng If an error 1 close and 2 check to port See 3 Make sure Make sure 5 Make sure ws If there are Peter Salas Carleton Che occurs shut down all dos command windows that were opened see all devices were installed and connected to the correct Installation Instructions for details gt RBNB was installed correctly Tomcat was started successfully RBNB Server was started successfully any further questions please contact psalas scu edu ng clcheng scu edu 127 Appendix I Section I1 Client Side Directory Structure A series of batch files were created to make it easier to start up the Client Side Applications The Client Side directory when unzipped is formated as shown below Thereisa specific batch file that loads up a specific device in the Class Files folder More information about each individual batch file can be found below in Section 2 RACE Client Prog
117. t 1 Preamble FIXED FE FE is the preamble which begins the command 2 Transceiver s default address 60 which can be changed on the transceiver hardware 15 For the complete user manual refer to http www icomamerica com support manuals ic 910h pdf 20 3 Controller s default address 00 which can be changed on the transceiver hardware 4 Command number 00 specified by the command table Sub command number 00 specified by the command table 6 BCD code data for freguency of memory number entry a On closer inspection on will notice that the frequency is reversed In this case the freguency was set to 145 150 0 Therefore the BCD code data for frequency is formatted 00 15 45 01 7 End of message code FIXED FD is the value passed to the transceiver to tell it that the command is finished being sent 8 NOTE All commands are sent in hex format In Java on must use the function parseInt with base 16 in order to obtain the proper hex format sent through the serial port In general programming the transceiver was a very difficult task because Java did not support the extended ASCII set 4 6 Serial Power Strip The Baytech RPC2 Serial Power Strip is a special power strip that can be controlled through the serial port It was installed during the RACE 2001 2002 RACE II senior design We connected RBNB DataTurbine to this device so that we can send commands to this device to turn on off specific
118. t and technologies used Because of the limited time frame for this project a timeline of tasks was set up to specify deadlines for completing each module Each engineer picked a task from this timeline and worked until they were finished with their module When it was complete each engineer picked another task and the timeline was modified Communication throughout the project was easy because only two people were involved on the project There was no specific group leader assigned because each took responsibility for their parts In lieu of this timeline there were also weekly meetings with Dr Neil Quinn and Dr Christopher Kitts These meetings proved to be important to address any problems we encountered and to insure that we met the necessary deadlines These meetings helped clarify many issues concerning our project s design and implementation Additionally before beginning the project we did not have any background in satellite communication Drs Quinn and Kitts helped us by providing insight into the different aspects of satellite technology including the equipment used and how they are involved in satellite communication 2 3 Design Process and Choices The design process began in September of 2003 This year s RACE team met with project advisors Dr Quinn and Dr Kitts to discuss the concept the RACE project as well as to brief us on the history of RACE and the progress made by the previous teams Additionally we began laying o
119. t println sBuffer length sMap PutDataAsString 0 ENTER YOUR CALLSIGN gt source Flush sMap catch SAPIException se se printStackTrace sBuffer marker 0 if sBuffer endsWith sapphire gt try System out println Placing string sapphire gt into server System out println sBuffer length sMap PutDataAsString 0 sapphire gt source Flush sMap catch SAPIException se se printStackTrace 100 sBuffer marker 0 Loop to check to see if to post to data turbine post off return carriage found for i marker i lt sBuffer length i if sBuffer charAt i r nBuffer sBuffer substring marker i marker i 1 i sBuffer length System out println marker marker if marker lt 1 nBuffer ok try System out println Placing string nBuffer into server System out println sBuffer length sMap PutDataAsString 0 new String nBuffer source Flush sMap catch SAPIException se se printStackTrace try do a non blocking check to see if there is any information on DT aMap sink Fetch 1 rMap if aMap NumberOfChannels gt 0 sBuffer clear and reset buffer so it doesn t get too big marker 0 System out println Data ready to be received from DT store information from DT to a String messageString aMap GetDataAsString 0
120. t tle n n poss satellite NnNtNOTE If you are trying to talk to Sappire enter in OSCAR 45 as the satellite n n pass satellite Ann help 74 return help private int numCommand 4 private String commandArray new String numCommand Appendix E Section EI Antenna Interpreter Client Side Author Peter Salas lt A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt P version Created 2 20 2004 lt P gt Purpose Designed for Santa University RACE 2003 2004 Senior Design Team lt P gt Description This class is used for validating user inputs and interpreting inputs to the actual commands that the Ground Station accepts for remote access Specifically this class validates commands for Labjack Antenna Controller To establish a connection with the Ground Station located at Santa Clara University Engineering Department For more information on DataTurbine and it s functionality please refer to the RBNB website http rbnb creare com import java io import java util public class AntennaClientInterpreter KR KR k kok k kok k KK K kok kok kok k RI KR RR KKK KKK KKK KK KKK k Constructor KOK KKK KK KK KK KOK RR KKK KK KR ee Description initializes the mapped variables for the control of the k Labjack Antenna Controler This constructor also establishes a k connection to the Ground St
121. tallation of More Ground Stations Although there is currently only one functional station the Santa Clara ground station more stations being built which will increase the ground station coverage Currently educational institutions such as the University of Texas Austin and Georgia Tech are constructing these ground stations The Hawaii ground station located previously in Pearl City Hawaii will soon be moved to the University of Hawaii Manoa Satellites Controlled by RACE Currently our focus is to test our system with the satellites Much work must be done to extend the system to support the satellite missions listed in Table 1 1 as well as others 36 8 4 Lessons Learned The RACE project was truly an important experience Learning about satellite communication the equipment used in satellite communication and the software involved in communication was very challenging Although there were many aspects critical to this project organization problem solving and communication were the most important in order to successfully accomplish our goals Before beginning this project we were very inexperienced in satellite technology Dr Quinn and Dr Kitts provided invaluable information and guidance to help us understand the inner workings of ground station and satellite communication Once we had a handle on satellite technology we sat down with the advisors to begin the design of the project However before we were ready to implem
122. tenna getSatellitePosition case 3 return Antenna getHelp default return null Description This goes through the mapped commands of the Labjack program and returns the index of that command lt P gt Precondition The user command must be sent of type String lt P gt Postcondition If the command is valid then this function returns the index of the command If the command is not valid this function returns 1 A private int getCommandIndex String command 87 for int i 0 return 1 private int numCo private String private DataTurbi mmand commandArray new String numCommand i numCommand i commandArray i equalsIgnoreCase command return i 4 The number of commands The command array ne antennaDT Establish a connection to DT Server Section E6 AntennaAutoTracker Server Side J RRR KR k kok k KK k kok k kok k RR k kok I I RR k kk k k File Name AntennaAutoTracker c Author Daniel Schuet Copyright C 2004 Created 2004 05 Nersion 1 0 Description Automatically controls an antenna to track a satellite in the sky Uses a G 5500 Yaesu Rotor along with LabJack Uses Predict software to get satellite azimuth and elevation J RRR KR k oko oko k KK kok k kok k kok RI I k kok k K kk K kCk Ck kCk k kk K k kkk k kk k k Needs labjack library to build ljackuw lib include
123. terface was simply a mapped image of the LabView interface therefore in order for a user to get current information about the ground station and its devices the user would have to refresh the browser RBNB is basically a dynamic data server that provides the framework for client server applications It serves as the foundation for data communication for multiple devices It is also a java based program thus we chose to implement most of our code in java to make the installation process simple and smooth DataTurbine talks to devices through a series of channelmaps A channelmap is exactly what the name implies a channel that both the client and server subscribe to and talk to each other on it In our senior design we have nine channelmaps defined e sendTransceiver amp recieveTransceiver sendPredict amp receivePredict sendPower amp receivePower sendAntenna amp receiveAntenna RXrawTNCString Internet Interface Ground Station Computer DataTurbine Power Strip Figure 4 2 Ground Station System Architecture with Data Turbine 14 More information on RBNB Data Turbine can be found at http rbnb creare com 19 These channelmaps are used to forward information to and from the specific devices The send channels are specifically used to send commands and information to the device while the receive channels are information that is returned from the devices It was designed this way so that both the sen
124. that communications may take place given line of sight transmission constraints During communication sessions human operators use these stations by logging remotely into them from one or more centralized operations facilities For example NASA the European Space Agency and the U S military all have a network of geographically distributed communication ground stations through which they communicate with large numbers of operational satellites Many universities build low cost satellites and use ham radio communication stations in order to conduct command and data operations Through the RACE program Santa Clara University SCU is developing a geographically distributed network of communication stations in order to operate many of the satellites built by SCU and its academic partners Current RACE ground stations are in development and or partially operational at SCU in Hawaii in Texas and in St Louis As depicted in Figure 1 1 it can be seen how this geographic distribution of communication stations dramatically increases the number of times each day that operators may communicate with university spacecraft in low Earth orbit 1 For more information about NASA please see the following link www nasa gov For more information about the ESA please see the following link www esa int 3 RACE stands for Remote Accessible Control Environment lt 1997 NLSF Figure 1 1 Ground track of Sapphire NO 45 with the Santa Clara grou
125. the command prompt windows For detailed instructions on using the RACE client program see Appendix I 5 6 How to Use the System Server Side The system was designed to be very easy to install and run Assuming that all components of the system were installed and configured correctly an administrator in charge of maintaining the server would only need to invoke the main batch file located in the root folder of the packaged RACE server program Detailed instructions on the operation and error handling are located in Appendix H 5 7 User Experience Unfortunately we were unable to gather very much user experience data We had gone over our deadline and the complete system was not finished until mid May This did not leave very much time for contacting potential users and asking them about their experience However professor Chris Kitts of the Santa Clara Engineering Department and an undergraduate student Dan Schuet have tested the RACE system and their responses are positive According to Dr Kitts the performance of the RACE system is a big improvement over the previous system The response times he says although relatively slow are negligible at this point and can probably be fixed by upgrading the ground station computer to a faster computer He is also very pleased that the interface is mainly 3 Many of the device specifications can be found on the RACE II Senior Thesis http www cse scu edu send cgi srprojects 2002
126. this function does not return anything lt P gt Precondition The satellite must be in the predict tle file lt P gt Postcondition Information about when and where the next pass will be X is returned public static String getNextPass String satellite try Process process Runtime getRuntime exec predict p satellite process waitFor InputStream in process getInputStream String stringIn int charIn char tempChar 71 while charIn in read 1 tempChar char charIn Character tChar new Character tempChar stringIn tChar toString return stringIn catch Exception e System out println e return null 72 Section DS Predict Interpreter Server Side Author Peter Salas lt A HREF mailto PSalas scu edu gt Peter Salas lt A gt Description This class is responsible for validating commands for the program Predict If a valid command then this class processes the request and returns if the command was performed successfully F TZ X X x import java io import java util public class PredictServerInterpreter BOK k k KK k k kok k kok k Koko k kok k I k Koko k kok k kok Ck kCK Ck kCk 2 2 2 k kc k kck ck KKR KK 2 2 2 2 2 2 sk e x RR KKK KKK kk KK ke Constructor KCKCKCKkCk ck kck KKK kok k kok k kok k kok Ck kok k kok k K kk kok kok k KOkCKCkCkCk Ck kCk Ck kCk Ck k kc k Ck kck ck kok ck kok ck k kk
127. tice and license appear tware is provided AS IS without a warranty of any kind I S OR IMPLIED CONDITIONS REPRESENTATIONS AND WARRANTIES ORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY OR DISTRIBUTING TH SOFTWAR BE LIABLE EO ILL SUN OR ITS LICENSORS R DATA OR FOR DIRECT R ITS DERIVATIVES IN NO EVEN FOR ANY LOST REVENUE PROFIT bi OM G ND TREC OWEVER T SPECIAL CONSEQUENTIAL INCIDENTAL OR PUNITIVE DAMAGES CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY ARISING THE USE OF OR INABILITY TO USE SOFTWARE EVEN IF SUN HAS BEEN I H OUT OF ADVISED Oo F F 0X 0X F FF F oo FF 0X TZ F OO TZ OR F 0X F OX F L OR F OX OX OR Oo TZ Xo X FF F Xo xoxo F OF This sof OF THE POSSIBILITY OF SUCH DAMAGES tware is not designed or intended for use in on line control of aircraft air traffic aircraft navigation or aircraft communications or in the design construction operation or maintenanc warrants that it will not use or redistribute the Software for such purposes e of any nuclear facility Licens represents and import java io import java util import javax comm public class TransceiverServer implements Runnable SerialPort
128. tware is not designed or intended for use in on line control of aircraft air traffic aircraft navigation or aircraft communications or in the design construction operation or maintenance of any nuclear facility Licens represents and warrants that it will not use or redistribute the Software for such purposes 0 0X F FF 0X 0X F FF F FF F F Ok TZ F FF ZZ OX FF OX FF OX OX F F R OX Xo Xo X F Xo F Xo xoxo OF import java io import java util import javax comm import com rbnb sapi public class TNCDT implements Runnable SerialPortEventListener 98 tatic tatic static W o tatic tatic W u tatic tatic tatic hread HU un YN static tatic static LD static tatic LD public program CommPortIdentifier portId LO S i I numeration portList tring messageString nt stx 0 boolean outputBufferEmptyFlag false nputStream inputStream OutputStream outputStream SerialPort serialPort readThread Source source new Source Sink sink new Sink C S S S tring tring tatic hannelMap sMap rMap boolean dataReady false sBuffer nBuffer void main String args String host int i 0 marker 0 String star System out println Welcome to the TNC to Data Turbine if args length gt 0 System out println Connecting to host else System o
129. ully accomplished this by using a computer interface and HAM radio signals to communicate with a robotic device located in a remote location Phase II of RACE was headed by the RACE II team in 2001 2002 comprised of four computer engineers and two mechanical engineers Building upon the accomplishments of the previous year the RACE II team was able to expand the project into a system capable of communicating with satellites In addition to this team II developed a web based satellite reservation system and built another control station located in Pearl City Hawaii Phase III of RACE was lead by the RACE III team in 2002 2003 comprised of two computer engineers This team added a web based scheduler to the existing system making it more of a web controlled environment This scheduler allows users to reserve a time slot to communicate with a particular satellite Team III also added an operator control feature to allow administrative rights to operators who manage the system 1 3 Problems For the past two years the senior design teams demonstrated successfully that the web based interface works However the interface needed considerable work to make it truly operational This may be due to the fact that the online interface did not support streaming real time information which is vital for a system such as this If a user wished to update the information in real time they must manually refresh the browser window Time is extremely
130. ulty Furthermore systems operated by NASA ESA and other 35 institutions are extremely complicated and the risky Making mistakes on their system is too great and expensive to allow any good experimentation Thus RACE is a small scale version of these large satellite operations networks comprised of components such as many groundstations a central control facility and numerous of users and satellites Additionally because this project is a small scale model of a larger operation we can control RACE to test out new operations techniques such as innovative fault diagnosis algorithms new scheduling techniques and other experiments 8 3 Future Contributions Future contributions to the RACE project may include things such as A Graphical User Interface GUI and incorporating the RACE Reservation System Currently the system supports only a command line version If the user does not have an application of their own the RACE GUI will provide users with a more user friendly interface Additionally the RACE Reservation System was not integrated into this year s project because of time constraints Web Interface Seen as highly platform independent a web interface will allow users to utilize their web browsers to communicate with their satellite Integrating RACE with other satellite and robotic devices This will further expand the project into new areas of study as well as increasing the scope of the project Ins
131. ut println ERROR No RBNB host defined return d iE host args 0 Opens up an RBNB connection source OpenRBNBConnection host satSource sink OpenRBNBConnection host satSink sMap new ChannelMap sMap Add RXrawTNCstring sMap PutTimeAuto timeofday source Register sMap Pull data from the server rMap new ChannelMap rMap Add MatCmd TXstring sink Subscribe rMap catch SAPIException se se printStackTrace stores all ports to an enumeration portList CommPortIdentifier getPortIdentifiers search through enumeration of ports for COM2 99 while portList hasMoreElements portId CommPortIdentifier portList nextElement if portId getPortType CommPortIdentifier PORT_SERIAL if portId getName equals COM2 TNCDT reader new TNCDT System out println portId getName found ChannelMap aMap while true Do a bunch of pre checks becaus verything does not end with a carriage return if sBuffer endsWith PRESS TO SET BAUD RATE try outputStream write star getBytes catch IOException e System out println Autobaud rate sequence detected sBuffer marker 0 T R YOUR CALLSIGN gt if sBuffer endsWith ENT try System out println Placing string ENTER YOUR CALLSIGN gt into server System ou
132. ut the basic requirements and goals of this project Many ideas and designs were discussed until we decided on those aforementioned in chapter one Once these requirements were laid out we made some initial design specifications concerning the overall system architecture the programming languages and software to use and any equipment needed After a formal design review in January a few of these initial design specifications were altered and much of the implementation began Over the course of the project we found that some parts of the design needed to be altered slightly to accommodate unforeseen problems with the equipment and software Additionally constant testing the software and hardware was necessary to ensure that the system worked well and with little error However much of the testing came after each part of the overall software architecture of the ground station system was complete Chapter 3 Hardware 3 1 Current Hardware and Components Overview Much of the equipment prior to this project was still intact and in excellent condition Therefore much of the current hardware did not need to be changed However because of the issues dealing with the remote control of NOVA a new piece of hardware called LabJack described below was added as a data acquisition device to handle the antenna controller All electronic equipment is controlled through serial connections with the ground station computer Using the new RACE softw
133. ved from the Transceiver If the server successfully performs a command a success message is displayed here 3 RACE Predict Echo Description 4 RACE Transceiver Echo Description 5 RACE Antenna Echo Description Controls all information returning from the device This Echo s back anything received from the Labjack device located on the Server 134 Section I7 Matlab Configuration and User Manual Daniel Schuet 2004 What you ll need 1 Current version of Matlab version 6 5 tested to work Need to make sure that it has integrated java and the timer function Pm RBNB Data Turbine v2 1 Installation instructions follow below 34 Current version of SapphireTerm written by Daniel Schuet These are Matlab m files that allow you to hop onto the DataTurbine and control the ground station packet modem along with some neat added features 4 M Map a mapping package for Matlab optional It can be found here http www2 ocgy ubc ca rich map html Follow the instructions in the user guide to install basically its just a setting a path in Matlab 94 Predict AtomTime http get bundled zip file optional Adds features of satellite tracking and predicting passes in Matlab Extract to C In order to connect to the ground station through the Internet som software will need to be set up and installed on the client side computer The RBNB Ring Buffered Network Bus Data Turbine is use
134. while charIn in read 1 tempChar char charIn Character tChar new Character tempChar stringIn tChar toString return stringIn catch Exception e System out println e return null 84 Description This is the help menu for the AntennaAutoTracker lt P gt Precondition AntennaAutoTracker must be within same directory as this class file lt P gt Postcondition The help menu is returned to user public static String getHelp try Process process Runtime getRuntime exec AntennaAutoTracker process waitFor o Q while InputStream in process getInputStream tring stringIn int charIn har tempChar charIn in read tempChar char char Ln Character tChar new Character tempChar stringIn tChar toString 1 d return stringIn catch Except ion e System out println e return null 85 Section E5 Antenna Interpreter Server Side QAuthor Peter Salas A HREF mailto PSalas scu edu gt PSalas scu edu lt A gt P version Created 5 14 2004 P Purpose Designed for Santa University RACE 2003 2004 Senior Design Team P Description This class is responsible for taking in user commands and 1 validating the command and if valid 2 perform the command Once the command is performed then the program returns the r
135. with two channels However we have observed that Matlab handles well and there is no data loss with a single channel MATLAB 0 x File Edit Debug Desktop Window Help D mes c kr pwrs O A Workspace 2X BJ Figures Figure 1 a x amp Editor DAMATLABYDevelopment E a X Spee 1 bouslh a DI x Dem sm d B ss Electrode Charge pC o Bisisl x gt WT R Low frequency First define a sample rs 1000x1 dou 1000x1 uint8 gt 1000x1 uint8 hannelTime 1000x1 dou 4 D uint8 y sin 2 pi fl t plot t y Add high frequency CH DataSet 1x7550 dou zl 25 amp Next add a second hicher 10 De Edt Mew Insert Took Desktop Window Hep 2 oo pass x Figuret x Command Window Dema kaa o Ena an Emission Tests EN E gt gt plot Channel3 0 07763 0 11591 eters 0 10844 0 14963 gt gt surf surfacemap sh 0 11947 0 15923 gt gt B t sin 2 pi fl t 0 11075 0 14492 f n 1960 5 Bit sin 2 pi fi t gt gt Disp 16 14 Airfuel Ratio Figure 4 3 MATLAB Interface Refer to Appendix F for the TNC source code 23 Chapter 5 User Management 5 1 How to Install the System Client Side The software is pre packaged in a zip file that contains a few batch files that will execute the necessary Java classes to control the ground station Refer to Appendix I for
136. y building ground stations around the world we must be sure that if the project were to end the ground stations be taken down or sold to be taken care of by another institution 7 9 Usability The entire focus of RACE IV is to implement a working and efficient communication link between the user and the ground station RACE now has a much improved working user interface for ground station control and communication In addition the underlying technology used allows future design teams to implement a different interface on top of the system without much change to the existing code now This year s design has successfully implemented a true real time system enabling a user to log into the system and efficiently establish a link to their satellite 33 7 10 Lifelong Learning Neither of the group members had any knowledge of satellite functionality before starting this project A learning curve was present for much of the first and second quarter Not only did we have to learn about the individual components and their capabilities we also had to learn about integration of the components with each other Working on the RACE project has helped us to do independent thinking by problem solving on our feet at a fast pace This project has taught us how to effectively and efficiently work within a team and how to accomplish a decent amount of work within a specified time Problem solving teamwork and time management are not skills that can be obtai
Download Pdf Manuals
Related Search
Related Contents
Page 1 Page 2 免責事項 ----------------------------------------------- - Hitachi Projector CP-X995W User's Manual Notice sécheur centrale d`air.cdr HP Photosmart 130 User's Manual Texte intégral PDF (144 ko) Manual - INFICON SCOS L O - Salvador Escoda SA Installation and operating instructions Copyright © All rights reserved.
Failed to retrieve file