ROTCTL(1) Rotator Control Program ROTCTL(1)

Similar documents
ROTCTLD(8) Rotator Control Daemon ROTCTLD(8)

Continue reading command lines even after an execution error has caused the abandonment of aline.

Lab #1 Installing a System Due Friday, September 6, 2002

grib_api.h File Reference

Computer Data Logging Formats

GDB QUICK REFERENCE GDB Version 4

Part III Appendices 165

FSASIM: A Simulator for Finite-State Automata

Aaronia GPS Logger Programming Guide

McGill University School of Computer Science Sable Research Group. *J Installation. Bruno Dufour. July 5, w w w. s a b l e. m c g i l l.

Receiving Items. Purchasing: Using CounterPoint. Overview. Introduction to Receiving. Receive P.O. s

Readline: Terminal Interaction

DRIVER STATION v1.0 UTILITY LOADER Created: 22DEC2008 FIRST DRIVER STATION UTILITY LOADER RE-IMAGE INSTRUCTIONS

bash, part 3 Chris GauthierDickey

Project #2: A 3-Tiered Airport Lookup Service Using RPC

AntiLogReader Command Line Application User Guide

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

HP-35s Calculator Program Closure 7A

Reading and manipulating files

Binghamton University. CS-211 Fall Syntax. What the Compiler needs to understand your program

Cisco IOS Shell. Finding Feature Information. Prerequisites for Cisco IOS.sh. Last Updated: December 14, 2012

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Request for Comments: 913 September 1984

The PCAT Programming Language Reference Manual

Lab 03 - x86-64: atoi

CMPS 12A Introduction to Programming Lab Assignment 7

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION

Bash Check If Command Line Parameter Exists

CS246 Spring14 Programming Paradigm Files, Pipes and Redirection

Quick Start Guide. RainWise CC-2000 Edition. Visit our Website to Register Your Copy (weatherview32.com)

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes

Scratchbox Remote Shell

Readline: Terminal Interaction

52 Remote Target. Simulation. Chapter

Using the Command-Line Interface

COMP 4/6262: Programming UNIX

Python Working with files. May 4, 2017

Part III. Shell Config. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26,

The SPL Programming Language Reference Manual

GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial

Topic 2: More Shell Skills

10.1 Conversions. Grid to Geodetic

gdbtui - Linux Command

Corporation. Once the required parameters have been entered, mouse click Generate KML File and the Path LOS buttons.

FM300 Network Server

Using kgdb and the kgdb Internals

- c list The list specifies character positions.

1/25/2018. ECE 220: Computer Systems & Programming. Write Output Using printf. Use Backslash to Include Special ASCII Characters

Chapter 2 Bits, Data Types, and Operations

GeniusPlus Help On Line

Skip the first SKIP1 bytes of FILE1 and the first SKIP2 bytes of FILE2. l verbose Output byte numbers and values of all differing bytes.

COMS 6100 Class Notes 3

Lab 3 : Sort program

CROSSREF Manual. Tools and Utilities Library

CS354 gdb Tutorial Written by Chris Feilbach

Linux Text Utilities 101 for S/390 Wizards SHARE Session 9220/5522

MarshallSoft GPS Component. Reference Library

5/20/2007. Touring Essential Programs

FANF. programming language. written by Konstantin Dimitrov. Revision 0.1 February Programming language FANF 1 / 21

bc an arbitrary precision calculator language version 1.06

Quick Guide Ver lite 26/10/16

Introduction to Solo Forest

Review of Fundamentals

Using the Command-Line Interface

CS 241 Data Organization using C Project 3: Tron Spring 2017

Distance in mm from nearest latitude line to location x 150 = seconds of latitude Distance in mm between latitude 2.5 tick marks (along the sides)

fuser - Linux Command

MB40 & MB45 MODBUS TCP/IP Gateway Handbook

Programming Studio #1 ECE 190

Chapter 2 File Management (updated September 5, 2009)

Libgdb. Version 0.3 Oct Thomas Lord

3 Connecting to a Controller

pydocstyle Documentation

Topic 2: More Shell Skills. Sub-Topic 1: Quoting. Sub-Topic 2: Shell Variables. Difference Between Single & Double Quotes

DCLI User's Guide. Data Center Command-Line Interface

More Scripting Todd Kelley CST8207 Todd Kelley 1

Textadept Quick Reference. Mitchell

Using the aregcmd Commands

AMS COCKPIT USERS GUIDE. AMS Cockpit Version 1.1 USERS GUIDE

NS3Kview Quick-Start Guide

DCLI User's Guide. Data Center Command-Line Interface 2.7.0

There are two ways to use the python interpreter: interactive mode and script mode. (a) open a terminal shell (terminal emulator in Applications Menu)

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

MAPnnn - Portmapper Log Messages

$GDSWLYH0LFUR6\VWHPV

Collect all of the raw.trd files into a directory such as /data/67 (67 was a deployment line). Run 125proci.sh using

DCLI User's Guide. Data Center Command-Line Interface 2.9.1

Sub-Topic 1: Quoting. Topic 2: More Shell Skills. Sub-Topic 2: Shell Variables. Referring to Shell Variables: More

Using the Command-Line Interface

Advanced Linux: Exercises In these instructions the first character $ in the command examples should not be typed, but it denotes the command prompt.

Configuring System Message Logging

Chapter 2 Bits, Data Types, and Operations

Chapter 14: Controlled Remote Tug Telemetry

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

bash Args, Signals, Functions Administrative Shell Scripting COMP2101 Fall 2017

COGO-50 v1.81 User Manual By Jacob Wall

gfortran - Linux Command

Fundamentals of Programming

Should you know scanf and printf?

Gabriel Hugh Elkaim Spring CMPE 013/L: C Programming. CMPE 013/L: C Programming

Transcription:

NAME rotctl control antenna rotators SYNOPSIS rotctl [OPTION]... [COMMAND]... DESCRIPTION Control antenna rotators. rotctl accepts commands from the command line as well as in interactive mode if none are provided on the command line. Keep in mind that Hamlib is BETA level software. While a lot of backend libraries lack complete rotator support, the basic functions are usually well supported. The API may change without publicized notice, while an advancement of the minor version (e.g. 1.x to 3.x) indicates such a change. Please report bugs and provide feedback at the e-mail address given in the REPORTING BUGS section. Patches and code enhancements are also welcome. OPTIONS This program follows the usual GNU command line syntax, with long options starting with two dashes ( - ). Here is a summary of the supported options: m, --model=id Select rotator model number. See model list (use rotctl -l ). NB: rotctl (or third party software) will use rotator model 2 for NET rotctl (rotctld). r, --rot-file=device Use device as the file name of the port the rotator is connected. Often a serial port, but could be a USB to serial adapter or USB port device. Typically /dev/ttys0, /dev/ttys1, /dev/ttyusb0, etc. on Linux or COM1, COM2, etc. on Win32. s, --serial-speed=baud Set serial speed to baud rate. Uses maximum serial speed from rotator backend capabilities as default. t, --send-cmd-term=char Change the termination char for text protocol when using the send_cmd command. The default value is <CR>. Non ASCII printable characters can be specified as an ASCII number, in hexadecimal format, prepended with 0x. You may pass an empty string for no termination char. The string -1 tells rotctl to switch to binary protocol. See the send_cmd command for further explanation. L, --show-conf List all config parameters for the rotor defined with -m above. C, --set-conf=parm=val[,parm=val]* Set config parameter. e.g. --set_conf=stop_bits=2 Use -L option for a list. u, --dump-caps Dump capabilities for the rotor defined with -m above and exit. l, --list List all model numbers defined in Hamlib and exit. As of 1.2.15.1 the list is sorted by model number. N.B. In Linux the list can be scrolled back using Shift-PageUp/ Shift-PageDown, or using the scrollbars of a virtual terminal in X or the cmd window inwindows. The output can be piped to more or less, e.g. rotctl -l more. Hamlib March 13, 2013 1

i, --read-history Read previously saved command and argument history from a file (default /.rotctl_history ) for the current session. Av ailable when rotctl is built with Readline support (see READLINE below). N.B. To read a history file stored in another directory, set the ROTCTL_HIST_DIR environment variable, e.g. ROTCTL_HIST_DIR= /tmp rotctl -i. When ROTCTL_HIST_DIR is not set, the value of HOME is used. I, --save-history Write current session and previous session(s), if -i option is given, command and argument history to a file (default /.rotctl_history ) at the end of the current session. Complete commands with arguments are saved as a single line to be recalled and used or edited. Av ailable when rotctl is built with Readline support (see READLINE below). N.B. To write a history file in another directory, set the ROTCTL_HIST_DIR environment variable, e.g. ROTCTL_HIST_DIR= /tmp rotctl -I. When ROTCTL_HIST_DIR is not set, the value of HOME is used. v, --verbose Set verbose mode, cumulative (see DIAGNOSTICS below). h, --help Show summary of these options and exit. V, version Show version of rotctl and exit. N.B. Some options may not be implemented by a given backend and will return an error. This is most likely to occur with the set-conf and show-conf options. Please note that the backend for the rotator to be controlled, or the rotator itself may not support some commands. In that case, the operation will fail with a Hamlib error code. COMMANDS Commands can be entered either as a single char, orasalong command name. Basically, the commands do not take a dash in front of them, as the options do. They may be typed in when in interactive mode or provided as argument(s) in command line interface mode. In interactive mode commands and their arguments may be entered on a single line: Rotator command: P 123 45 Since most of the Hamlib operations have a set and a get method, an upper case letter will be used for set method whereas the corresponding lower case letter refers to the get method. Each operation also has a long name; in interactive mode, prepend a backslash to enter a long command name. Example: Use "\get_info" to see the rotor s info. Please note that the backend for the rotator to be controlled, or the rotator itself may not support some commands. In that case, the operation will fail with a Hamlib error message. As an alternative to the READLINE command history features a special command of a single dash ( - ) may be used to read commands from standard input. Commands must be separated by whitespace similar to the commands given on the command line. Comments may be added using the # character, all text up until the end of the current line including the # character is ignored. Example: $cat <<.EOF. >cmds.txt >#File of commands >set_pos 180.0 10.0 #rotate >pause 30 #wait for action to complete Hamlib March 13, 2013 2

>get_pos # query rotator >.EOF. $rotctl -m1 - <cmds.txt set_pos 180.0 10.0 pause 30 get_pos 180.000000 10.000000 $ Asummary of commands is included below (In the case of "set" commands the quoted string is replaced by the value in the description. In the case of "get" commands the quoted string is the key name of the value returned.): Q q, exit rotctl Exit rotctl in interactive mode. When rotctl is controlling the rotor directly, will close the rotor backend and port. When rotctl is connected to rotctld (rotor model 2), the TCP/IP connection to rotctld is closed and rotctld remains running, available for another TCP/IP network connection. P, set_pos Azimuth Elevation Set position: Azimuth and Elevation as double precision floating point values. p, get_pos Get position: Azimuth and Elevation as double precision floating point values. M, move Direction Speed Move the rotator in a specific direction at the given rate. Values are integers where Direction is defined as 2 = Up, 4 = Down, 8 = Left, and 16 = Right. Speed is an integer between 1 and 100. Not all backends that implement the move command use the Speed value. At this time only the gs232a utilizes the Speed parameter. S, stop Stop the rotator. K, park Park the antenna. C, set_conf Token Value Set a configuration parameter. It is safe to give "Token" a value of 0 (zero). "Value" may be a string up to 20 characters. See -L output R, reset Reset Reset the rotator. Integer value of 1 for Reset All. _, get_info Get misc information on the rotator. At the moment returns Model Name. w, send_cmd Cmd Send raw command string to the rotator. <CR> (or send-cmd-term, see -t option) is appended automatically at the end of the command for text protocols. For binary protocols, enter values as \0xAA\0xBB Locator Commands Hamlib March 13, 2013 3

These commands offer conversions of Degrees Minutes Seconds to other formats, Maidenhead square locator conversions and distance and azimuth conversions. L, lonlat2loc Longitude Latitude Loc Len [2-12] Returns the Maidenhead locator for the given Longitude and Latitude. Both are floating point values. The precision of the returned square is controlled by Loc Len which should be an even numbered integer value between 2 and 12. For example, "L -170.000000-85.000000 12" returns "Locator: AA55AA00AA00". l, loc2lonlat Locator Returns Longitude and Latitude in decimal degrees at the approximate center of the requested grid square (despite the use of double precision variables internally, some rounding error occurs). West longitude is expressed as a negative value. South latitude is expressed as a negative value. Locator can be from 2 to 12 characters in length. For example, "l AA55AA00AA00" returns "Longitude: -169.999983 Latitude: -84.999991". D, dms2dec Degrees Minutes Seconds S/W Returns Dec Degrees, a signed floating point value. Degrees and Minutes are integer values and Seconds is a floating point value. S/W is a flag with 1 indicating South latitude or West longitude and 0 North or East (the flag is needed as computers don t recognize a signed zero even though only the Degrees value only is typically signed in DMS notation). d, dec2dms Dec Degrees Returns Degrees Minutes Seconds S/W. Values are as in dms2dec above. E, dmmm2dec Degrees Dec Minutes S/W Returns Dec Degrees, a signed floating point value. Degrees is an integer value and Minutes is a floating point value. S/W is a flag with 1 indicating South latitude or West longitude and 0 North or East (the flag is needed as computers don t recognize a signed zero even though only the Degrees value only is typically signed in DMS notation). e, dec2dmmm Dec Deg Returns Degrees Minutes S/W. Values are as in dmmm2dec above. B, qrb Lon 1 Lat 1 Lon 2 Lat 2 Returns Distance Azimuth where Distance is in km and Azimuth is in degrees. All Lon/Lat values are signed floating point numbers. A, a_sp2a_lp Short Path Deg Returns Long Path Deg or -RIG_EINVAL upon input error.. Both are floating point values within the range 0.00 to 360.00. a, d_sp2d_lp Short Path km Returns Long Path km. Both are floating point values. Hamlib March 13, 2013 4

pause Seconds Pause for the given whole number of seconds before sending the next command. EXAMPLES Start rotctl for RotorEZ using the first serial port on Linux: $rotctl -m 401 -r /dev/ttys0 Start rotctl for RotorEZ using COM2 on Win32: $rotctl -m 401 -r COM2 Connect to a running rotctld with rotor model 2 ("NET rotctl") on the local host and specifying the TCP port, and querying the position: $rotctl -m 2 -r localhost:4533 \get_pos READLINE If Readline library development files are found at configure time, rotctl will be conditonally built with Readline support for command and argument entry. Readline command key bindings are at their defaults as described in the Readline manual (http://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html) although rotctl sets the name rotctl which can be used in Conditional Init Constructs in the Readline Init File ( /.inputrc by default) for custom keybindings unique to rotctl. Command history is available with Readline support as described in the Readline History manual (http://cnswww.cns.cwru.edu/php/chet/readline/history.html#sec1). Command and argument strings are stored as single lines even when arguments are prompted for input individually. Commands and arguments are not validated and are stored as typed with values separated by a single space. Normally session history is not saved, however, use of either of the -i/--read-history or -I/--save-history options when starting rotctl will cause any previously saved history to be read in and/or the current and any previous session history (assuming the -i and -I options are given together) will be written out when rotctl is closed. Each option is mutually exclusive, i.e. either may be given separately or in combination. This is useful to save a set of commands and then read them later but not write the modified history for a consistent set of test commands in interactive mode, for example. History is stored in /.rotctl_history by default although the destination directory may be changed by setting the ROTCTL_HIST_DIR environment variable. When ROTCTL_HIST_DIR is unset, the value of the HOME environment variable is used instead. Only the destination directory may be changed at this time. If Readline support is not found at configure time the original internal command handler is used. Readline is not used for rotctl commands entered on the command line regardless if Readline support is built in or not. N.B. Readline support is not included in the Windows 32 binary builds supplied by the Hamlib Project. Running rotctl on the Windows 32 platform in the cmd shell does give session command line history, however, it isnot saved todisk between sessions. DIAGNOSTICS The -v, --version option allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE. A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the rotor which is very useful for rotor backend library development and may be requested by the developers. Hamlib March 13, 2013 5

EXIT STATUS rotctl exits with: 0ifall operations completed normally; 1ifthere was an invalid command line option or argument; 2ifanerror was returned by Hamlib. BUGS This suspiciously empty section... REPORTING BUGS Report bugs to <hamlib-developer@lists.sourceforge.net>. We are already aware of the bug in the previous section :-) AUTHOR Written by Stephane Fillod, Nate Bargmann, and the Hamlib Group <http://www.hamlib.org>. COPYRIGHT Copyright 2000-2011 Stephane Fillod Copyright 2011-2013 Nate Bargmann Copyright 2000-2010 the Hamlib Group This is free software; see the source for copying conditions. There is NO warranty; not even for MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO hamlib(3), rotctld(8) Hamlib March 13, 2013 6