FLIPANTS - Flip Antennas on Their Backs 3/21/93 Paul Williamson, KB5MU 3/01/02 KB5MU - updated contact info only Copyright 1993 Paul Williamson. All rights reserved. You may use this program for non-commercial purposes. FlipAnts allows you to track a satellite with your antennas inverted ("on their backs"), without making any modifications to your rotor driver program or satellite tracking program. Why would you want to do that? Suppose your antennas are installed with the stops at South. That is, they rotate from South around through North and back around to South, but can't track from SouthEast to SouthWest without going around the long way. Further suppose that the satellite pass you're interested in passes South of you (but not North of you). You will have to stop in the middle of the pass, and wait a minute (typically) while the antennas turn 360 degrees. With FlipAnts, you can avoid this interruption. Just turn FlipAnts on before the beginning of the pass (and make sure your antennas are capable of turning 180 degrees in elevation). With the antennas inverted, the stops are effectively inverted as well. Stops at South become stops at North. This will be especially helpful for low-inclination LEO satellites, like most Space Shuttle flights. If your rotor stops are at South and you're in the Northern hemisphere (or vice versa), you'll have the problem on every single pass. On the other hand, with high elliptical orbits like AO-13, you will occasionally have a pass that passes both North and South of you. In that case, you'll still have to wait a minute for the rotors to swing around. However, with FlipAnts you will at least have your choice about when this occurs (if you plan ahead). FlipAnts actually consists of two programs. FlipDRV is a TSR (memory resident) program that installs along with your rotor driver and other resident tracking programs. FlipDRV actually takes care of changing the antenna angles computed by your tracking program so that the rotor driver program sees the inverted angles. You will probably install FlipDRV in your AUTOEXEC.BAT file along with your other tracking TSRs, and then forget about it. The other program is called FlipAnts. You run it from the command line (or a batch file) to turn FlipDRV on or off. The interface between FlipDRV and FlipAnts is documented below, so if you need to control FlipDRV from your own program, you can do so. FlipDRV Installation ==================== FlipDRV must be installed AFTER your rotor driver program, RotorDRV or the Kansas City Tracker program DRV. If OrbitDRV (the background tracking program that comes with InstantTrack) is used, it should be installed AFTER FlipAnts. If DISPANG (a TSR that displays your antenna angles in the upper right corner of the text screen) is used, you may choose to install it before or after FlipDRV. If you install DISPANG before FlipDRV, you'll see the flipped angles when FlipDRV is active. If you install DISPANG after FlipDRV, you'll always see the normal angles. So, a typical installation (in AUTOEXEC.BAT) might look something like this: drv/tt=0/ma=0 <--this loads RotorDRV osc/hot=$18 <--this loads the KCT popup flipdrv <--this loads FlipAnts orbitdrv <--this loads OrbitDRV If you're using a non-default vector for your KCT driver, you can specify its number on the FLIPANTS command line, in decimal. Specifying anything else on the command line will get you a version message and usage prompt. CAUTION: 1. Your antennas must be capable of moving 180 degrees in elevation. 2. Your rotor driver program must ignore any angles that your antennas are not physically capable of. With FlipDRV on, your rotor driver will be asked to point to impossible angles (like straight down). Your driver must know not to try to comply. The Kansas City Tracker driver, DRV, is (to the best of my knowledge) safe in this respect. 3. Don't install FlipDRV more than once. FlipDRV will prevent two consecutive installations, but it is possible to fool it by installing another TSR between two FlipDRV installations. If you do, you'll get strange results. NOTICE: 1. FlipDRV won't do anything for you if you operate by preloading the Kansas City Tracker's tables for a pass. FlipDRV only works with the realtime tracking mode used by InstantTrack and OrbitDRV. FlipAnts Operation ================== FlipAnts is very simple to use. To find out the current status, just say flipants To turn FlipDRV on (begin inverted tracking), say flipants on To turn FlipDRV off (resume normal tracking), say flipants off There's just one complication. FlipAnts tries to find FlipDRV before talking to it. This is always possible if FlipDRV is the last thing installed, or if everything installed after FlipDRV follows certain conventions (see the Programming Interface section for details). If you have installed something after FlipDRV that doesn't follow the conventions, FlipAnts will be unable to find FlipDRV. In that case, FlipAnts will ask you if you wish to proceed anyway. If you know that FlipDRV is installed, you may answer Y. Otherwise, you should probably answer N. Programming Interface ===================== For a general discussion of how the rotor driver interface works, see DRVSVC.DOC (from the Kansas City Tracker folks) or INTSPEC.TXT (which comes with InstantTrack). The following discussion assumes a general understanding of the existing interfaces. FlipDRV adds two functions to the interrupt interface provided by the RotorDRV program. One turns inverted mode on or off, and the other queries its current status. Function 7F: Set Flip Antennas Status ------------------------------------- This function enables the user program to set the antenna pointing mode to normal or inverted. On Entry: AH = 7F AL = 00 for normal antenna tracking 01 for inverted antenna tracking Other values of AL are reserved. Function 7E: Get Flip Antennas Status ------------------------------------- This function enables the user program to determine the current antenna pointing mode. On Entry: AH = 7E On Exit: AL = 00 if antenna tracking mode is normal 01 if antenna tracking mode is inverted Other values of AL are reserved. Tracking TSR Chaining Convention -------------------------------- OrbitDRV and all other related TSR programs by KB5MU follow a simple convention that permits an interested program to follow the chain of TSR programs attached to the RotorDRV interrupt. This convention has two parts: 1. The entry point address of the next TSR in the chain (the one that was installed immediately before this TSR) is stored at an address 4 bytes after the entry point of this TSR. This is 6 bytes before the "RotorDRV" signature that is required of all TSRs in the chain. 2. The name of this TSR is appended to the "RotorDRV" signature with a plus sign. For example, the signature for FlipDRV is "RotorDRV+FlipAnts". The signature is terminated by a zero byte. If you write a TSR that installs in the chain, you are encouraged to follow this convention. Source Code =========== Notice that I've provided you with the source code to both programs. FlipDRV is written in assembly language, for simplicity and small resident size. I used the Microsoft Macro Assembler MASM 5.1, but just about any assembler should do. FlipAnts is written in C. I used the Microsoft C compiler, version 6.00A. There are a few non-portable constructs required for this kind of thing, so you may have to do some work to use a different compiler. If you make any changes to the code, please don't distribute your version without clearly labelling it as modified. Don't distribute it at all without my copyright notice and this .DOC file. I encourage you to distribute source code to your programs, too. Credit and Blame ================ I am always interested in comments and bug reports. However, this is just a hobby for me. I can't promise to provide any support, and this software is provided with absolutely NO WARRANTY. I can be reached via email: kb5mu@amsat.org