Skip to content

Commit

Permalink
Rules and map changes
Browse files Browse the repository at this point in the history
  • Loading branch information
QCaudron committed Oct 23, 2023
1 parent 976e582 commit 683020e
Show file tree
Hide file tree
Showing 9 changed files with 211 additions and 74 deletions.
Binary file modified assets/programming_files/d878.zip
Binary file not shown.
17 changes: 15 additions & 2 deletions assets/templates/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@

<div id="map" style="height: 730px; width: 730px; border-radius: 500px;"></div>

<style>
.custom-icon {
background-color: #165a0a;
border-radius: 50%;
text-align: center;
color: white;
}

.icon-label {
line-height: 25px;
/* Match the height of the icon */
}
</style>

<script>
var map = L.map('map').setView([47.7, -122.7], 8);

Expand All @@ -21,8 +35,7 @@
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);

{ { repeater_pins } }

{{ repeater_pins }}
</script>


Expand Down
15 changes: 15 additions & 0 deletions assets/templates/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ The locations for these repeaters are approximate, and sourced from RepeaterBook

<div id="map" style="height: 730px; border-radius: 500px;"></div>

<style>
.custom-icon {
background-color: #165a0a;
border-radius: 50%;
text-align: center;
color: white;
}

.icon-label {
line-height: 25px;
/* Match the height of the icon */
}
</style>


<script>
var map = L.map('map').setView([47.7, -122.7], 8);

Expand Down
2 changes: 1 addition & 1 deletion assets/templates/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Feel free to chat about anything and everything, though !

- **It Pays to QRP.** If you're running 5W or less, the contact is worth double.
- **Club Connoisseur.** If you make a contact on all repeaters with the same club designation (for systems with at least two repeaters), your point score for that system are doubled.
- **Band Hog.** If you hit all repeaters on a given band, your score for that band is doubled.
- **Band Hog.** If you hit at least 30 FM repeaters on the 2m or 70cm bands, your score for that band is doubled.
- **Full House.** If you make a contact on at least 80 repeaters, your full score is doubled.


Expand Down
86 changes: 84 additions & 2 deletions demo_map.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Repeater Roundabout is a weekend-long event held on many of our local repeat

Anyone with a ham radio license can participate ! You don't even have to be local; stations may participate over Echolink, Allstar, or IRLP if they are available.

> This page was last updated on Tuesday October 17 at 17:14.
> This page was last updated on Sunday October 22 at 19:51.
---

Expand Down
150 changes: 85 additions & 65 deletions map.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Feel free to chat about anything and everything, though !

- **It Pays to QRP.** If you're running 5W or less, the contact is worth double.
- **Club Connoisseur.** If you make a contact on all repeaters with the same club designation (for systems with at least two repeaters), your point score for that system are doubled.
- **Band Hog.** If you hit all repeaters on a given band, your score for that band is doubled.
- **Band Hog.** If you hit at least 30 FM repeaters on the 2m or 70cm bands, your score for that band is doubled.
- **Full House.** If you make a contact on at least 80 repeaters, your full score is doubled.


Expand Down
11 changes: 9 additions & 2 deletions scripts/markdown_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def write_repeaters_md(df: pd.DataFrame) -> None:
f.write(maps)


def write_map_md(df: pd.DataFrame, threshold: float = 0.005) -> None:
def write_map_md(df: pd.DataFrame, threshold: float = 0.001) -> None:
"""
Write the map.md file.
Expand Down Expand Up @@ -220,7 +220,14 @@ def write_map_md(df: pd.DataFrame, threshold: float = 0.005) -> None:
if len(msg):
coords = np.mean([repeater["Coordinates"] for repeater in cluster], axis=0)
coords_str = f"[{coords[0]:.10f}, {coords[1]:.10f}]"
pins_list.append(f"L.marker({coords_str}).bindPopup('{msg}').addTo(map);")
custom_middle = (
'"<div class=\'icon-label\'>...</div>"' if len(cluster) > 1
else f'"<div class=\'icon-label\'>{repeater["RR#"]}</div>"'
)
custom = f"L.divIcon({{className: 'custom-icon', html: {custom_middle}, iconSize: [25, 25]}})"
pins_list.append(f"L.marker({coords_str}, {{icon: {custom} }}).bindPopup('{msg}').addTo(map);")
# pins_list.append(f"L.marker({coords_str}).bindPopup('{msg}').addTo(map);")


pins = "\n".join(pins_list)

Expand Down

0 comments on commit 683020e

Please sign in to comment.