Skip to main content

Posts

Showing posts with the label haversine

datasette-haversine-point-to-path Initial Release

 I made the first release of the package yesterday. The case for finding the shortest distance from the point to the path when the distance is not along a perpendicular to the path has been implemented . The package has been released with the tag 0.1 .

datasette-haversine-point-to-path

 I got to play around with spherical trig last week under the guise of improving the accuracy of the model that KO6BTY's and my F2 skip maps utilize.  Today, I took the first steps towards formalizing the algorithm I modeled into a datasette plugin so we can use our kml plugin to create skip maps (I'll probably also add a configuration flag to turn skip mapping on and off.) Using datasette-haversine as a model, I created datasette-haversine-point-path . The new plugin allows users to specify three lat/lng pairs that define the enpoints of a QSO and the location of an ionosonde. Given this information, the newly defined sqlite method will return the shortest distance between the ionosonde and the QSO's propagation path along the Earth. (I still need to add the special case where the shortest distance to the path is in fact between the ionosonde and one of the endpoints. I'll talk about this in my next post.) I re-puprosed the test case from datasette-haversine as wel...

Things I Learned: The Datasette Haversine Plugin and the SKCC QRP Award

 The gang—the 12, 11, and 8 year-old kids whose dad I am—and I attended Simon Willison's Datasette office hours on Friday to talk about our ham radio Datasette projects and to start a bit of debug on a Datasette geocoding  enrichment we're working on. During our meeting, Simon asked what the longest QSO we'd made with the radio was, and mentioned that the datasette-haversine  plugin can be used to calculate the distance between two locations on the Earth. Coincidentally, I'd already been looking into this in relation to the SKCC 1,000 Watts per Mile award. Consquently, I set out to apply the Haversine to our QSO logbook in Datasette to find the best set of QSOs to send in with our award application. KO6BTY and I did an initial glance on Friday after speaking with Simon. Here's the query we used: select rowid, id, tx_lng, tx_lat, rx_lng, rx_lat, haversine(tx_lat, tx_lng, rx_lat, rx_lng, 'mi') as haversine, floor((((haversine(tx_lat, tx_lng, rx_lat, rx_...