Here are some programs written to run on the HP48 graphing calculator that are useful for some Amateur Radio applications. I originally had these posted on my web site when it was running on PHP Nuke. I recovered the text out of the database and did some editing to make it a little more complete. They are described in no particular order.
The first of these programs, SWR, was written by Arlen, AA0SG, to compute the SWR of an antenna system from measured forward and reflected power. Enter the forward power then reflected power onto the stack and run the program. The result should be SWR.
The book Reflections II by M. Walter Maxwell, W2DU, has a couple of programs that claim to be written for HP calculators. The language, however, does not correspond to anything that I know, at least not the HP48. As a consequence, Arlen and I rewrote them using the original program text and formulas from the book as a guide.
RjX is the first of these programs which replaces the listing in Appendix 4. It calculates exact SWR from R+jX. Enter R, X, feedline Zc on the stack in that order. The program take these numbers off and output SWR.
Appendix 7A has a program in it to determine the increase in forward power on a line that is with conjugate matching at the input. The program to do this is called C. Enter transmitter output power, line loss, and ratio of feedline to antenna impedance (hint: 3 then 1 for 3:1 SWR). The program returns the total forward power. Amazingly, it's often greater than what you started with.
The third of these is the SWRloss program used to calculate the additional power lost due to SWR on a transmission line (Appendix 8A). First enter the loss in dB followed by the SWR . The result will be something like dB LOSS: -.288 meaning 0.288 dB of additional loss on the feedline due to SWR.
ERP calculates ERP given input power and gain in dB (in that order).
Here is the text of the programs. Copy it and paste it into a plain text file called HAM (or something like that). Transferring it to your HP will create a directory of that name and all of those programs will be in there.
%%HP: T(3)A(D)F(.);
DIR
C
<< DUP2 - 3
ROLLD + / SWAP NEG
10 / ALOG DUP 3
ROLLD * SQ 1 1 ROT
- / * *
>>
ERP
<< 10 / ALOG *
>>
RjX
<< DUP 3 ROLLD /
ROT ROT / SWAP SQ 1
+ SWAP DUP 3 ROLLD
/ + DUP SQ 4 - v/ +
2 / "SWR" ->TAG
>>
SWRLoss
<< DUP 1 - SWAP
1 + / SWAP NEG 10 /
ALOG DUP2 DROP * SQ
1 SWAP - SWAP SQ 1
SWAP - SWAP / LOG
10 * 3 RND
"dB LOSS" ->TAG
>>
SWR
<< v/ SWAP v/ DUP
3 PICK - 3 ROLLD +
SWAP / 2 RND "SWR"
->TAG
>>
END

