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

Popular posts from this blog

The Valentine's Day Magnetic Monopole

There's an assymetry to the form of the two Maxwell's equations shown in picture 1.  While the divergence of the electric field is proportional to the electric charge density at a given point, the divergence of the magnetic field is equal to zero.  This is typically explained in the following way.  While we know that electrons, the fundamental electric charge carriers exist, evidence seems to indicate that magnetic monopoles, the particles that would carry magnetic 'charge', either don't exist, or, the energies required to create them are so high that they are exceedingly rare.  That doesn't stop us from looking for them though! Keeping with the theme of Fairbank[1] and his academic progeny over the semester break, today's post is about the discovery of a magnetic monopole candidate event by one of the Fairbank's graduate students, Blas Cabrera[2].  Cabrera was utilizing a loop type of magnetic monopole detector.  Its operation is in...

Cool Math Tricks: Deriving the Divergence, (Del or Nabla) into New (Cylindrical) Coordinate Systems

Now available as a Kindle ebook for 99 cents ! Get a spiffy ebook, and fund more physics The following is a pretty lengthy procedure, but converting the divergence, (nabla, del) operator between coordinate systems comes up pretty often. While there are tables for converting between common coordinate systems , there seem to be fewer explanations of the procedure for deriving the conversion, so here goes! What do we actually want? To convert the Cartesian nabla to the nabla for another coordinate system, say… cylindrical coordinates. What we’ll need: 1. The Cartesian Nabla: 2. A set of equations relating the Cartesian coordinates to cylindrical coordinates: 3. A set of equations relating the Cartesian basis vectors to the basis vectors of the new coordinate system: How to do it: Use the chain rule for differentiation to convert the derivatives with respect to the Cartesian variables to derivatives with respect to the cylindrical variables. The chain ...

More Cowbell! Record Production using Google Forms and Charts

First, the what : This article shows how to embed a new Google Form into any web page. To demonstrate ths, a chart and form that allow blog readers to control the recording levels of each instrument in Blue Oyster Cult's "(Don't Fear) The Reaper" is used. HTML code from the Google version of the form included on this page is shown and the parts that need to be modified are highlighted. Next, the why : Google recently released an e-mail form feature that allows users of Google Documents to create an e-mail a form that automatically places each user's input into an associated spreadsheet. As it turns out, with a little bit of work, the forms that are created by Google Docs can be embedded into any web page. Now, The Goods: Click on the instrument you want turned up, click the submit button and then refresh the page. Through the magic of Google Forms as soon as you click on submit and refresh this web page, the data chart will update immediately. Turn up the:...