Skip to main content

More Coding with ChatGPT: Miscopied CW Ham Radio Callsigns

I've been recording more of my POTA and SOTA activation, and then experimenting with how to  publish the results as well as exploring what information I can derive from the recordings post-activation. One thing I'm findin out is that—of course—my CW copy isn't perfect. Searching through the entire recording of an activation is a bit much for me at the moment, so I lighted on a middle ground technique:

determine whether or not the QSOs were with POTA registered users, and if not, investigate those portions of the recording

I was fairly certain that ChatGPT could help with this coding task. I was right. The entire coding session took 14 minutes from start to finish. I told ChatGPT about the undocumented REST API presented by pota.app , gave it an example, and asked it to write a Python script for me that would accept a callsign through the Linux input pipe and then tell me either all the info for the callsign, or print that the callsign wasn't found. Out dropped a script. Then, I needed to be able to parse my log format to grab all the callsigns. I fed ChatGPT an example file:

2024_12_27 US-4571 trying new camera and counterpoise

Talked to Maine twice the same station and to ny once at least

-122.45015547881034

37.72509947349236

k5ohy,2024/12/27 22:42:00,339,539 tx 

w7pct,2024/12/27 22:44:00,339,599 or

w7tf,2024/12/27 22:49:00,339,559 id 

n7bbq,2024/12/27 22:52:00,339,559 az 

n7wpo,2024/12/27 22:53:00,579,559 wa 

wa7lnw,2024/12/27 22:54:00,559,559 ut 

w4kly,2024/12/27 22:57:00,559,339 ga 

w7dz,2024/12/27 23:04:00,339,559 wa

k1nf,2024/12/27 23:14:00,559,229 me

wi0s,2024/12/27 23:17:00,229,229 nm

k5ogr,2024/12/27 23:20:00,559,519 ar

k8hr,2024/12/27 23:21:00,559,559 oh

ag6ze,2024/12/27 23:23:00,229,599 ca 

wa5rml,2024/12/27 23:25:00,449,559 tx 

kz5q,2024/12/27 23:32:00,559,599 tx 

va3uz,2024/12/27 23:33:00,339,559 on

kd7j,2024/12/27 23:35:00,449,559 or 

n9snu,2024/12/27 23:36:00,569,529 il 

k7gud,2024/12/27 23:38:00,559,519 id 

na7c,2024/12/27 23:51:00,559,559 ut 

n3rx,2024/12/27 23:54:00,339,449  

wb7tlk,2024/12/27 23:59:00,569,559 wa 


and asked it to pull out the first field on each csv formatted line starting with line five.

Here's the weird part:

when ChatGPT output its script which worked perfectly by the way, it also output this explanation:

Explanation of the Script

  1. Read File: The script reads all lines from the input file.
  2. Skip First Four Lines: It processes lines starting from line 5 (index 4).
  3. Split by Comma: Each line is split by , to extract the first field (callsign).
  4. Print Callsigns: Outputs one callsign per line.
I never once mentioned 'Callsigns' in the request for the code. Here's what I asked for

please write a shell script that outputs the first csv on each line starting with line 5. The script should be written in Python and accept an argument specifying the filename containing the data I input above.

ChatGPT 'figure out' that the example data contained callsigns in the first field. Wow! Given, AIs can still hallucinate. But, when they work, they work!

Given these two scripts, it was a cinch to type

python3 extract_callsigns.py qso_update.csv | python3 missingpota.py | grep "cannot be found"

and be presented with two unregistered users that I had in fact miscopied. Here's the recording for one of them.




Comments