I used ChatGPT to get a quick and dirty protoype for an application that would make a map of each individual QSO from a given CZML map I had already created. All in all, it took ChatGPT and I about 20 minutes to come up with a prototype of an application that takes one of my CZML POTA maps, walks through it QSO by QSO, creates a label on the map with embedded QSO information and then dumps out a text encoded PNG image of the QSO on an OpenStreets map.
=======================draft notes, skip to next equals line till polished==============
Here's my first question to ChatGPT:
Can I write Javascript that positions and frames a Cesium Ion map based on data read in through a czml file?
The usual 'mistakes' were made by ChatGPT, but it fixed most of them when I asked. Here's an example:
==============================end of draft notes====================
The following code crashes. Why?
intervals.forEach(interval => {
console.log("operating on interval");
});
Why This Happens
Cesium.TimeIntervalCollection
is a custom class designed by CesiumJS to handle time intervals. It does not inherit from JavaScript's Array
prototype, so methods like .forEach
, .map
, or .filter
are not available.
You can see the map I started from here. It's the map for my recent Juan Bautista twofer POTA activation.
You can see the prototype app here in a Cesium Sandcastle page.
Here's a video of the application in action.
And here are the mapped QSOs that were output.
I'm, once again, happily surprised by the quality of code that ChatGPT can crank out.
Usage notes:
I know my target screen is 1080x1920. I used the Ctrl+Shift+C debug window in Chrome to setup the map in Cesium Sandbox so that it has about the same ratio.
Here's the measurements for the screen ratio... roughly speaking
and the calculations to get there
The dimensions for the center panel of the TouCans banner are 720x404.
Comments
Post a Comment
Please leave your comments on this topic: