L = require('leaflet@1.9.4')
// Load the CSV file
qsosData = FileAttachment("qsos.json").json()
map = {
// Extract my station details
const myLocation = {
lat: qsosData.my_lat,
lon: qsosData.my_lon,
callsign: qsosData.my_callsign,
sota: qsosData.my_sota
};
// Function to assign colors based on the band
function getBandColor(band) {
const bandColors = {
"40m": "DarkBlue",
"20m": "Green",
"15m": "Orange",
"10m": "Red",
"2m": "Purple"
};
return bandColors[band] || "Gray"; // Default color if the band is missing
}
let container = DOM.element('div', { style: `width:${width}px;height:${width/1.6}px` });
yield container;
let map = L.map(container).setView([myLocation.lat, myLocation.lon], 7);
let osmLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// Custom icons
const myIcon = L.icon({
iconUrl: "/flag.png",
iconSize: [25, 25],
});
const sotaIcon = L.icon({
iconUrl: "/summit.png",
iconSize: [25, 25],
});
// Add marker for my station
L.marker([myLocation.lat, myLocation.lon], { icon: myIcon })
.bindPopup(`${myLocation.callsign}<br>SOTA Ref: ${myLocation.sota}`)
.addTo(map);
// Add QSO markers
qsosData.qsos.forEach(({ lat, lon, callsign, band, distance_km, sota_ref }) => {
const isSOTA = sota_ref !== "";
const markerIcon = isSOTA ? sotaIcon : null; // Use SOTA icon if reference exists
const color = getBandColor(band);
const marker = isSOTA
? L.marker([lat, lon], { icon: markerIcon }) // SOTA markers get an icon
: L.circleMarker([lat, lon], {
radius: 6,
color: color,
fillColor: color,
fillOpacity: 0.8
});
marker.bindPopup(
`Callsign: ${callsign}<br>Band: ${band}<br>Distance: ${distance_km} km` +
(isSOTA ? `<br>SOTA Ref: <a href="https://sotl.as/summits/${sota_ref}" target="_blank">${sota_ref}</a>` : "")
).addTo(map);
});
}
Knockan
Bonus 4th summit
sota
The final summit of the day. As I had time, I thought I’d do this one as I knew it would be a quick walk. There are a few 1 pointers in this area which I’d like to activate eventually, and this helped tick it off my list.
It seems a popular spot for dog walkers as the “car park” was nearly full when I arrived. A wind farm has been built on the hill, so it’s made up roads nearly to the top. It’s also a very gentle gradient of hardly any climb, so pushing the very limits of the definition of summit. It took less than 20 minutes to reach the summit, a few well balanced stones.
I went back to the road to make use of the snow markers as a support for the mast and setup. Fraser wanted to try and make a contact as he wanted Knockan for a complete (where you activate and chase a summit). Quite the lengths to get a complete whilst on holiday in Cyprus! We tried 15m to start and he was pretty good this time, 43 to me. After that I started looking around for other summits but I was wasting time and just wanted to get it qualified and done, so moved to 20m and soon had a nice run for 5 minutes before calling it quits. Takes longer to setup and take down the station than get to the top! Back to the car in no time and away home.