- Duplicate the datasette-haversine-point-to-path repository, renaming it datasette-gis-partial-path
- This should expose a method for lat and a separate method for lng
- The inputs should be the beginning and end of the path and the number of meters the elevation path should extend
- The package will use haversine. It will also repackage a few of the earthmid methods
- Given the inputs, calculate the entire QSO path length using the haversine method. Then, divide the total distance by the input partial distance to get the number of 'partial' length segments exist in the the entire path.
- Call partial_path_lng and partial_path_lat to get the coordinates of the end of the first segment.
- Add a new linestring to the kml template. The segment starts at the transmitting station and ends at the coordinates returned in step 3 above. Label the new segment with the receive station's callsign and the word 'elevation'. Give the elevation segment the same time stamp as the full QSO timestamp.
Just a reminder, the idea is to create a linestring that is shorter than the entire QSO path so that the elevation profile near the transmitting station is easy to visualize in Google Earth Pro.
Scheduling
Work started at 06:50 PST 03/31/2024
Debugging syntax issue 7:33 same day
7:34 installed!
7:41 wrong number of arguments
7:46 used lat3 and lon3 incorrectly
7:57 bad args
7:58 not passing fractional parts argument correctly
8:01 forgot to bring over partial_path_lng
8:03 wrong tx location
8:08 Success!!!!!
select
tx_lng,
tx_lat,
rx_lng,
rx_lat,
rm_rnb_history_pres.timestamp,
rm_rnb_history_pres.dB,
rm_rnb_history_pres.Spotter,
haversine(tx_lat, tx_lng, rx_lat, rx_lng) as total_path,
gis_partial_path_lat(tx_lat, tx_lng, rx_lat, rx_lng, 200) as el_lat,
gis_partial_path_lng(tx_lat, tx_lng, rx_lat, rx_lng, 200) as el_lng,
id
from
rm_rnb_history_pres
where
(rm_rnb_history_pres.timestamp < '2023-01-31' and rm_rnb_history_pres.timestamp > '2023-01-29')
and dB = 0
order by
rm_rnb_history_pres.timestamp desc
8:44 starting back up on the kml template to add elevation every time
9:07 new template almost there, need to name each elevation line with the Spotter field
9:11 fixed template elevation line html, but they're also missing???
9:14 elevation line misplaced inside other placemark, but worked before? Oh well?
9:16 forgot to remove fixed coordinates in query from original demo
9:26 Success!!!!! Can now get profiles for any station on any outing!
From Caballo in February
and
Sweden from the Organs last December
'Cruces from the Organs should be more interesting,
gis_partial_path_lat(tx_lat, tx_lng, rx_lat, rx_lng, 2000) as el_lat,
gis_partial_path_lng(tx_lat, tx_lng, rx_lat, rx_lng, 2000) as el_lng,
And finally, for today, from January of 2023. Kinda cool!
9:51 Done playing with examples for day :)
Comments
Post a Comment
Please leave your comments on this topic: