mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-13 07:33:39 +00:00
Compare commits
8 Commits
82-tota
...
9d9f4609f0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d9f4609f0 | ||
|
|
368e69bf00 | ||
|
|
9bdd0ab1de | ||
|
|
255719f3b5 | ||
|
|
f21ea0ae5d | ||
|
|
2be2af176c | ||
|
|
0c8973bbc6 | ||
|
|
296cdb3795 |
@@ -418,7 +418,20 @@ class LookupHelper:
|
||||
# Infer a mode from the frequency (in Hz) according to the band plan. Just a guess really.
|
||||
def infer_mode_from_frequency(self, freq):
|
||||
try:
|
||||
return freq_to_band(freq / 1000.0)["mode"]
|
||||
khz = freq / 1000.0
|
||||
mode = freq_to_band(khz)["mode"]
|
||||
# Some additional common digimode ranges in addition to what the 3rd-party freq_to_band function returns.
|
||||
# This is mostly here just because freq_to_band is very specific about things like FT8 frequencies, and e.g.
|
||||
# a spot at 7074.5 kHz will be indicated as LSB, even though it's clearly in the FT8 range. Future updates
|
||||
# might include other common digimode centres of activity here, but this achieves the main goal of keeping
|
||||
# large numbers of clearly-FT* spots off the list of people filtering out digimodes.
|
||||
if (7074 <= khz < 7077) or (10136 <= khz < 10139) or (14074 <= khz < 14077) or (18100 <= khz < 18103) or (
|
||||
21074 <= khz < 21077) or (24915 <= khz < 24918) or (28074 <= khz < 28077):
|
||||
mode = "FT8"
|
||||
if (7047.5 <= khz < 7050.5) or (10140 <= khz < 10143) or (14080 <= khz < 14083) or (
|
||||
18104 <= khz < 18107) or (21140 <= khz < 21143) or (24919 <= khz < 24922) or (28180 <= khz < 28183):
|
||||
mode = "FT4"
|
||||
return mode
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
|
||||
@@ -300,6 +300,10 @@ class Spot:
|
||||
if self.sig:
|
||||
self.icon = get_icon_for_sig(self.sig)
|
||||
|
||||
# Default "radio" icon if nothing else has set it
|
||||
if not self.icon:
|
||||
self.icon = "tower-cell"
|
||||
|
||||
# DX Grid to lat/lon and vice versa in case one is missing
|
||||
if self.dx_grid and not self.dx_latitude:
|
||||
ll = locator_to_latlong(self.dx_grid)
|
||||
@@ -380,7 +384,7 @@ class Spot:
|
||||
self_copy.received_time_iso = ""
|
||||
self.id = hashlib.sha256(str(self_copy).encode("utf-8")).hexdigest()
|
||||
|
||||
# JSON serialise
|
||||
# JSON sspoterialise
|
||||
def to_json(self):
|
||||
return json.dumps(self, default=lambda o: o.__dict__, sort_keys=True)
|
||||
|
||||
|
||||
@@ -268,8 +268,6 @@ class WebServer:
|
||||
|
||||
# infer missing data, and add it to our database.
|
||||
spot.source = "API"
|
||||
if not spot.sig:
|
||||
spot.icon = "desktop"
|
||||
spot.infer_missing()
|
||||
self.spots.add(spot.id, spot, expire=MAX_SPOT_AGE)
|
||||
|
||||
@@ -338,11 +336,14 @@ class WebServer:
|
||||
sources = query.get(k).split(",")
|
||||
spots = [s for s in spots if s.source and s.source in sources]
|
||||
case "sig":
|
||||
# If a list of sigs is provided, the spot must have a sig and it must match one of them
|
||||
# If a list of sigs is provided, the spot must have a sig and it must match one of them.
|
||||
# The special "sig" "NO_SIG", when supplied in the list, mathches spots with no sig.
|
||||
sigs = query.get(k).split(",")
|
||||
spots = [s for s in spots if s.sig and s.sig in sigs]
|
||||
include_no_sig = "NO_SIG" in sigs
|
||||
spots = [s for s in spots if (s.sig and s.sig in sigs) or (include_no_sig and not s.sig)]
|
||||
case "needs_sig":
|
||||
# If true, a sig is required, regardless of what it is, it just can't be missing.
|
||||
# If true, a sig is required, regardless of what it is, it just can't be missing. Mutually
|
||||
# exclusive with supplying the special "NO_SIG" parameter to the "sig" query param.
|
||||
needs_sig = query.get(k).upper() == "TRUE"
|
||||
if needs_sig:
|
||||
spots = [s for s in spots if s.sig]
|
||||
@@ -441,8 +442,11 @@ class WebServer:
|
||||
sources = query.get(k).split(",")
|
||||
alerts = [a for a in alerts if a.source and a.source in sources]
|
||||
case "sig":
|
||||
# If a list of sigs is provided, the alert must have a sig and it must match one of them.
|
||||
# The special "sig" "NO_SIG", when supplied in the list, mathches alerts with no sig.
|
||||
sigs = query.get(k).split(",")
|
||||
alerts = [a for a in alerts if a.sig and a.sig in sigs]
|
||||
include_no_sig = "NO_SIG" in sigs
|
||||
spots = [a for a in alerts if (a.sig and a.sig in sigs) or (include_no_sig and not a.sig)]
|
||||
case "dx_continent":
|
||||
dxconts = query.get(k).split(",")
|
||||
alerts = [a for a in alerts if a.dx_continent and a.dx_continent in dxconts]
|
||||
|
||||
@@ -72,7 +72,7 @@ class DXCluster(SpotProvider):
|
||||
de_call=match.group(1),
|
||||
freq=float(match.group(2)) * 1000,
|
||||
comment=match.group(4).strip(),
|
||||
icon="desktop",
|
||||
icon="tower-cell",
|
||||
time=spot_datetime.timestamp())
|
||||
|
||||
# Add to our list
|
||||
|
||||
@@ -16,10 +16,18 @@
|
||||
<h4 class="mt-4">What are "DX", "DE" and modes?</h4>
|
||||
<p>In amateur radio terminology, the "DX" contact is the "interesting" one that is using the frequency shown and looking for callers. They might be on a remote island or just in a local park, but either way it's interesting enough that someone has "spotted" them. The callsign listed under "DE" is the person who entered the spot of the "DX" operator. "Modes" are the type of communication they are using. For example you might see "CW" which is Morse Code, or voice "modes" like SSB or FM, or more exotic "data" modes which are used for computer-to-computer communication.</p>
|
||||
<h4 class="mt-4">What data sources are supported?</h4>
|
||||
<p>Spothole can retrieve spots from: Telnet-based DX clusters, the Reverse Beacon Network (RBN), the APRS Internet Service (APRS-IS), POTA, SOTA, WWFF, GMA, WWBOTA, HEMA, Parks 'n' Peaks, ZLOTA, WOTA, the UK Packet Repeater Network, and any site based on the xOTA software by nischu.</p>
|
||||
<p>Spothole can retrieve alerts from: NG3K, POTA, SOTA, WWFF, Parks 'n' Peaks, WOTA and BOTA.</p>
|
||||
<p>Spothole can retrieve spots from: <a href="https://www.dxcluster.info/telnet/">Telnet-based DX clusters</a>, the <a href="https://www.reversebeacon.net/">Reverse Beacon Network (RBN)</a>, the <a href="https://www.aprs-is.net/">APRS Internet Service (APRS-IS)</a>, <a href="https://pota.app">POTA</a>, <a href="https://www.sota.org.uk/">SOTA</a>, <a href="https://wwff.co/">WWFF</a>, <a href="https://www.cqgma.org/">GMA</a>, <a href="https://wwbota.net/">WWBOTA</a>, <a href="http://www.hema.org.uk/">HEMA</a>, <a href="https://www.parksnpeaks.org/">Parks 'n' Peaks</a>, <a href="https://ontheair.nz">ZLOTA</a>, <a href="https://www.wota.org.uk/">WOTA</a>, the <a href="https://ukpacketradio.network/">UK Packet Repeater Network</a>, and any site based on the <a href="https://github.com/nischu/xOTA">xOTA software by nischu</a>.</p>
|
||||
<p>Spothole can retrieve alerts from: <a href="https://www.ng3k.com/">NG3K</a>, <a href="https://pota.app">POTA</a>, <a href="https://www.sota.org.uk/">SOTA</a>, <a href="https://wwff.co/">WWFF</a>, <a href="https://www.parksnpeaks.org/">Parks 'n' Peaks</a>, <a href="https://www.wota.org.uk/">WOTA</a> and <a href="https://www.beachesontheair.com/">BOTA</a>.</p>
|
||||
<p>Note that the server owner has not necessarily enabled all these data sources. In particular it is common to disable RBN, to avoid the server being swamped with FT8 traffic, and to disable APRS-IS and UK Packet Net so that the server only displays stations where there is likely to be an operator physically present for a QSO.</p>
|
||||
<p>Between the various data sources, the following Special Interest Groups (SIGs) are supported: Parks on the Air (POTA), Summits on the Air (SOTA), Worldwide Flora & Fauna (WWFF), Global Mountain Activity (GMA), Worldwide Bunkers on the Air (WWBOTA), HuMPs Excluding Marilyns Award (HEMA), Islands on the Air (IOTA), Mills on the Air (MOTA), the Amateur Radio Lighthouse Socirty (ARLHS), International Lighthouse Lightship Weekend (ILLW), Silos on the Air (SIOTA), World Castles Award (WCA), New Zealand on the Air (ZLOTA), Keith Roget Memorial National Parks Award (KRMNPA), Wainwrights on the Air (WOTA), Beaches on the Air (BOTA), Worked All Britain (WAB), Worked All Ireland (WAI), and Toilets on the Air (TOTA).</p>
|
||||
<p>As of the time of writing in November 2025, I think Spothole captures essentially all outdoor radio programmes that have a defined reference list, and almost certainly those that have a spotting/alerting API. If you know of one I've missed, please let me know!</p>
|
||||
<h4 class="mt-4">Why can I filter spots by both SIG and Source? Isn't that basically the same thing?</h4>
|
||||
<p>Mostly, but not quite. While POTA spots generally come from the POTA source and so on, there are a few exceptions:</p>
|
||||
<ol><li>Sources like GMA and Parks 'n' Peaks provide spots for multiple different programmes (SIGs).</li>
|
||||
<li>Cluster spots may name SIGs in their comment, in which case the source remains the Cluster, but a SIG is assigned.</li>
|
||||
<li>Some SIGs, such as Worked all Britain (WAB), don't have their own spotting site and can <em>only</em> be identified through comments on spots retrieved from other sources.</li>
|
||||
<li>SIGs have well-defined names, whereas the server owner may name the sources as they see fit.</li></ol>
|
||||
<p>Spothole's web interface exists not just for the end user, but also as a reference implementation for the API, so I have chosen to demonstrate both methods of filtering.</p>
|
||||
<h4 class="mt-4">How is this better than DXheat, DXsummit, POTA's own website, etc?</h4>
|
||||
<p>It's probably not? But it's nice to have choice.</p>
|
||||
<p>I think it's got three key advantages over those sites:</p>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row row-cols-1 g-4 mb-4">
|
||||
<div class="row row-cols-1 g-4 mb-4 row-cols-md-3">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -35,8 +35,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">SIGs</h5>
|
||||
<p id="sig-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Sources</h5>
|
||||
<p id="source-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 row-cols-md-4 g-4">
|
||||
<div class="row row-cols-1 row-cols-md-3 g-4">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -61,14 +77,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Sources</h5>
|
||||
<p id="source-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -108,6 +116,6 @@
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js"></script>
|
||||
<script src="/js/spotandmap.js"></script>
|
||||
<script src="/js/spotsbandsandmap.js"></script>
|
||||
<script src="/js/bands.js"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-bands").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row row-cols-1 g-4 mb-4">
|
||||
<div class="row row-cols-1 g-4 mb-4 row-cols-md-3">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -34,8 +34,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">SIGs</h5>
|
||||
<p id="sig-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Sources</h5>
|
||||
<p id="source-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 row-cols-md-4 g-4">
|
||||
<div class="row row-cols-1 row-cols-md-3 g-4">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -60,14 +76,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Sources</h5>
|
||||
<p id="source-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -126,6 +134,6 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/@joergdietrich/leaflet.terminator@1.1.0/L.Terminator.min.js"></script>
|
||||
|
||||
<script src="/js/common.js"></script>
|
||||
<script src="/js/spotandmap.js"></script>
|
||||
<script src="/js/spotsbandsandmap.js"></script>
|
||||
<script src="/js/map.js"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-map").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row row-cols-1 g-4 mb-4">
|
||||
<div class="row row-cols-1 g-4 mb-4 row-cols-md-3">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -46,8 +46,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">SIGs</h5>
|
||||
<p id="sig-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Sources</h5>
|
||||
<p id="source-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 row-cols-md-4 g-4">
|
||||
<div class="row row-cols-1 row-cols-md-3 g-4">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -72,14 +88,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Sources</h5>
|
||||
<p id="source-options" class="card-text spothole-card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,6 +196,6 @@
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js"></script>
|
||||
<script src="/js/spotandmap.js"></script>
|
||||
<script src="/js/spotsbandsandmap.js"></script>
|
||||
<script src="/js/spots.js"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-spots").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
@@ -52,55 +52,19 @@ paths:
|
||||
type: number
|
||||
- name: source
|
||||
in: query
|
||||
description: "Limit the spots to only ones from one or more sources. To select more than one source, supply a comma-separated list. The allowed options will vary based on how the sources are named within the server's config. See the /options call for how to retrieve a list of these."
|
||||
description: "Limit the spots to only ones from one or more sources. To select more than one source, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- ParksNPeaks
|
||||
- ZLOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- Cluster
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
- TOTA
|
||||
$ref: "#/components/schemas/Source"
|
||||
- name: sig
|
||||
in: query
|
||||
description: "Limit the spots to only ones from one or more Special Interest Groups provided as an argument. To select more than one SIG, supply a comma-separated list."
|
||||
description: "Limit the spots to only ones from one or more Special Interest Groups provided as an argument. To select more than one SIG, supply a comma-separated list. The special `sig` name `NO_SIG` matches spots with no sig set. You can use `sig=NO_SIG` to specifically only return generic spots with no associated SIG. You can also use combinations to request for example POTA + no SIG, but reject other SIGs. If you want to request 'every SIG and not No SIG', see the `needs_sig` query parameter for a shortcut."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
$ref: "#/components/schemas/SIGNameIncludingNoSIG"
|
||||
- name: needs_sig
|
||||
in: query
|
||||
description: "Limit the spots to only ones with a Special Interest Group such as POTA. Because supplying all known SIGs as a `sigs` parameter is unwieldy, and leaving `sigs` blank will also return spots with *no* SIG, this parameter can be set true to return only spots with a SIG, regardless of what it is, so long as it's not blank. This is what Field Spotter uses to exclude generic cluster spots and only retrieve xOTA things."
|
||||
description: "Limit the spots to only ones with a Special Interest Group such as POTA. Because supplying all known SIGs as a `sigs` parameter is unwieldy, and leaving `sigs` blank will also return spots with *no* SIG, this parameter can be set true to return only spots with a SIG, regardless of what it is, so long as it's not blank. This is the equivalent of supplying the `sig` query param with a list of every known SIG apart from the special `NO_SIG` value. This is what Field Spotter uses to exclude generic cluster spots and only retrieve xOTA things."
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
@@ -117,96 +81,31 @@ paths:
|
||||
description: "Limit the spots to only ones from one or more bands. To select more than one band, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- 160m
|
||||
- 80m
|
||||
- 60m
|
||||
- 40m
|
||||
- 30m
|
||||
- 20m
|
||||
- 17m
|
||||
- 15m
|
||||
- 12m
|
||||
- 10m
|
||||
- 6m
|
||||
- 4m
|
||||
- 2m
|
||||
- 70cm
|
||||
- 23cm
|
||||
- 13cm
|
||||
$ref: "#/components/schemas/BandName"
|
||||
- name: mode
|
||||
in: query
|
||||
description: "Limit the spots to only ones from one or more modes. To select more than one mode, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- CW
|
||||
- PHONE
|
||||
- SSB
|
||||
- USB
|
||||
- LSB
|
||||
- AM
|
||||
- FM
|
||||
- DV
|
||||
- DMR
|
||||
- DSTAR
|
||||
- C4FM
|
||||
- M17
|
||||
- DIGI
|
||||
- DATA
|
||||
- FT8
|
||||
- FT4
|
||||
- RTTY
|
||||
- SSTV
|
||||
- JS8
|
||||
- HELL
|
||||
- BPSK
|
||||
- PSK
|
||||
- BPSK31
|
||||
- OLIVIA
|
||||
- MFSK
|
||||
- MFSK32
|
||||
- PKT
|
||||
$ref: "#/components/schemas/Mode"
|
||||
- name: mode_type
|
||||
in: query
|
||||
description: "Limit the spots to only ones from one or more mode families. To select more than one mode family, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- CW
|
||||
- PHONE
|
||||
- DATA
|
||||
$ref: "#/components/schemas/Mode"
|
||||
- name: dx_continent
|
||||
in: query
|
||||
description: "Limit the spots to only ones where the DX (the operator being spotted) is on the given continent(s). To select more than one continent, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
$ref: "#/components/schemas/Continent"
|
||||
- name: de_continent
|
||||
in: query
|
||||
description: "Limit the spots to only ones where the spotteris on the given continent(s). To select more than one continent, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
$ref: "#/components/schemas/Continent"
|
||||
- name: dedupe
|
||||
in: query
|
||||
description: "\"De-duplicate\" the spots, returning only the latest spot for any given callsign."
|
||||
@@ -285,66 +184,22 @@ paths:
|
||||
type: boolean
|
||||
- name: source
|
||||
in: query
|
||||
description: "Limit the alerts to only ones from one or more sources. To select more than one source, supply a comma-separated list. The options will vary based on how the sources are named within the server's config. See the /options call for how to retrieve a list of these."
|
||||
description: "Limit the alerts to only ones from one or more sources. To select more than one source, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- ParksNPeaks
|
||||
- ZLOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- Cluster
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
- TOTA
|
||||
$ref: "#/components/schemas/Source"
|
||||
- name: sig
|
||||
in: query
|
||||
description: "Limit the alerts to only ones from one or more Special Interest Groups. To select more than one SIG, supply a comma-separated list."
|
||||
description: "Limit the alerts to only ones from one or more Special Interest Groups. To select more than one SIG, supply a comma-separated list. The special value 'NO_SIG' can be included to return alerts specifically without an associated SIG (i.e. general DXpeditions)."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
$ref: "#/components/schemas/SIGNameIncludingNoSIG"
|
||||
- name: dx_continent
|
||||
in: query
|
||||
description: "Limit the alerts to only ones where the DX operator is on the given continent(s). To select more than one continent, supply a comma-separated list."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
$ref: "#/components/schemas/Continent"
|
||||
- name: dx_call_includes
|
||||
in: query
|
||||
description: "Limit the alerts to only ones where the DX callsign includes the supplied string (case-insensitive). Generally a complete callsign, but you can supply a shorter string for partial matches."
|
||||
@@ -574,17 +429,8 @@ paths:
|
||||
description: Country flag of the operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
continent:
|
||||
type: string
|
||||
description: Continent of the operator
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
example: EU
|
||||
$ref: "#/components/schemas/Continent"
|
||||
dxcc_id:
|
||||
type: integer
|
||||
description: DXCC ID of the operator
|
||||
@@ -610,13 +456,8 @@ paths:
|
||||
description: Longitude of the opertor's QTH, in degrees. This could be from an online lookup service, or just based on the DXCC.
|
||||
example: -1.2345
|
||||
location_source:
|
||||
type: string
|
||||
description: Where we got the location (grid/latitude/longitude) from. Unlike a spot where we might have a summit position or WAB square, here the only options are an online QTH lookup, or a location based purely on DXCC, or nothing.
|
||||
enum:
|
||||
- "HOME QTH"
|
||||
- DXCC
|
||||
- NONE
|
||||
example: "HOME QTH"
|
||||
$ref: "#/components/schemas/LocationSourceForAlert"
|
||||
'422':
|
||||
description: Validation error e.g. callsign missing or format incorrect
|
||||
content:
|
||||
@@ -638,28 +479,7 @@ paths:
|
||||
in: query
|
||||
description: Special Interest Group (SIG), e.g. outdoor activity programme such as POTA
|
||||
required: true
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/SIGName"
|
||||
- name: id
|
||||
in: query
|
||||
description: ID of a reference in that SIG
|
||||
@@ -729,6 +549,184 @@ paths:
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Source:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- ParksNPeaks
|
||||
- ZLOTA
|
||||
- WOTA
|
||||
- Cluster
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
example: POTA
|
||||
|
||||
SIGName:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
example: POTA
|
||||
|
||||
SIGNameIncludingNoSIG:
|
||||
type: string
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
- NO_SIG
|
||||
example: POTA
|
||||
|
||||
Continent:
|
||||
type: string
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
example: EU
|
||||
|
||||
BandName:
|
||||
type: string
|
||||
enum:
|
||||
- 2200m
|
||||
- 600m
|
||||
- 160m
|
||||
- 80m
|
||||
- 60m
|
||||
- 40m
|
||||
- 30m
|
||||
- 20m
|
||||
- 17m
|
||||
- 15m
|
||||
- 12m
|
||||
- 11m
|
||||
- 10m
|
||||
- 6m
|
||||
- 5m
|
||||
- 4m
|
||||
- 2m
|
||||
- 1.25m
|
||||
- 70cm
|
||||
- 23cm
|
||||
- 2.4GHz
|
||||
- 5.8GHz
|
||||
- 10GHz
|
||||
- 24GHz
|
||||
- 47GHz
|
||||
- 76GHz
|
||||
example: 40m
|
||||
|
||||
Mode:
|
||||
type: string
|
||||
enum:
|
||||
- CW
|
||||
- PHONE
|
||||
- SSB
|
||||
- USB
|
||||
- LSB
|
||||
- AM
|
||||
- FM
|
||||
- DV
|
||||
- DMR
|
||||
- DSTAR
|
||||
- C4FM
|
||||
- M17
|
||||
- DIGI
|
||||
- DATA
|
||||
- FT8
|
||||
- FT4
|
||||
- RTTY
|
||||
- SSTV
|
||||
- JS8
|
||||
- HELL
|
||||
- BPSK
|
||||
- PSK
|
||||
- BPSK31
|
||||
- OLIVIA
|
||||
- MFSK
|
||||
- MFSK32
|
||||
- PKT
|
||||
example: SSB
|
||||
|
||||
ModeType:
|
||||
type: string
|
||||
enum:
|
||||
- CW
|
||||
- PHONE
|
||||
- DATA
|
||||
example: CW
|
||||
|
||||
ModeSource:
|
||||
type: string
|
||||
enum:
|
||||
- SPOT
|
||||
- COMMENT
|
||||
- BANDPLAN
|
||||
- NONE
|
||||
example: SPOT
|
||||
|
||||
LocationSourceForSpot:
|
||||
type: string
|
||||
enum:
|
||||
- SPOT
|
||||
- "SIG REF LOOKUP"
|
||||
- "WAB/WAI GRID"
|
||||
- "HOME QTH"
|
||||
- DXCC
|
||||
- NONE
|
||||
example: SPOT
|
||||
|
||||
LocationSourceForAlert:
|
||||
type: string
|
||||
enum:
|
||||
- "HOME QTH"
|
||||
- DXCC
|
||||
- NONE
|
||||
example: "HOME QTH"
|
||||
|
||||
SIGRef:
|
||||
type: object
|
||||
properties:
|
||||
@@ -737,29 +735,8 @@ components:
|
||||
description: SIG reference ID.
|
||||
example: GB-0001
|
||||
sig:
|
||||
type: string
|
||||
description: SIG that this reference is in.
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/SIGName"
|
||||
name:
|
||||
type: string
|
||||
description: SIG reference name
|
||||
@@ -809,17 +786,8 @@ components:
|
||||
description: Country flag of the DX operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
dx_continent:
|
||||
type: string
|
||||
description: Continent of the DX operator
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
example: EU
|
||||
$ref: "#/components/schemas/Continent"
|
||||
dx_dxcc_id:
|
||||
type: integer
|
||||
description: DXCC ID of the DX operator
|
||||
@@ -849,16 +817,8 @@ components:
|
||||
description: Longitude of the DX spot, in degrees. This could be from a geographical reference e.g. POTA, or from a QRZ lookup
|
||||
example: -1.2345
|
||||
dx_location_source:
|
||||
type: string
|
||||
description: Where we got the DX location (grid/latitude/longitude) from. If this was from the spot itself, or from a lookup of the SIG ref (e.g. park) it's likely quite accurate, but if we had to fall back to QRZ lookup, or even a location based on the DXCC itself, it will be a lot less accurate.
|
||||
enum:
|
||||
- SPOT
|
||||
- "SIG REF LOOKUP"
|
||||
- "WAB/WAI GRID"
|
||||
- "HOME QTH"
|
||||
- DXCC
|
||||
- NONE
|
||||
example: SPOT
|
||||
$ref: "#/components/schemas/LocationSourceForSpot"
|
||||
dx_location_good:
|
||||
type: boolean
|
||||
description: Does the software think the location is good enough to put a marker on a map? This is true if the source is "SPOT", "SIG REF LOOKUP" or "WAB/WAI GRID", or alternatively if the source is "HOME QTH" and the callsign doesn't have a slash in it (i.e. operator likely at home).
|
||||
@@ -876,17 +836,8 @@ components:
|
||||
description: Country flag of the spotter. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
de_continent:
|
||||
type: string
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
description: Continent of the spotter
|
||||
example: EU
|
||||
$ref: "#/components/schemas/Continent"
|
||||
de_dxcc_id:
|
||||
type: integer
|
||||
description: DXCC ID of the spotter
|
||||
@@ -905,82 +856,25 @@ components:
|
||||
example: 51.2345
|
||||
de_longitude:
|
||||
type: number
|
||||
description: Longitude of the spotter, in degrees. This is not going to be from a xOTA reference so it will likely just be a QRZ or DXCC lookup. If the spotter is also portable, this is probably wrong, but it's good enough for some simple mapping.
|
||||
description: Longitude of the DX spotspotter, in degrees. This is not going to be from a xOTA reference so it will likely just be a QRZ or DXCC lookup. If the spotter is also portable, this is probably wrong, but it's good enough for some simple mapping.
|
||||
example: -1.2345
|
||||
mode:
|
||||
type: string
|
||||
description: Reported mode.
|
||||
enum:
|
||||
- CW
|
||||
- PHONE
|
||||
- SSB
|
||||
- USB
|
||||
- LSB
|
||||
- AM
|
||||
- FM
|
||||
- DV
|
||||
- DMR
|
||||
- DSTAR
|
||||
- C4FM
|
||||
- M17
|
||||
- DIGI
|
||||
- DATA
|
||||
- FT8
|
||||
- FT4
|
||||
- RTTY
|
||||
- SSTV
|
||||
- JS8
|
||||
- HELL
|
||||
- BPSK
|
||||
- PSK
|
||||
- BPSK31
|
||||
- OLIVIA
|
||||
- MFSK
|
||||
- MFSK32
|
||||
- PKT
|
||||
$ref: "#/components/schemas/Mode"
|
||||
example: SSB
|
||||
mode_type:
|
||||
type: string
|
||||
description: Inferred mode "family".
|
||||
enum:
|
||||
- CW
|
||||
- PHONE
|
||||
- DATA
|
||||
example: PHONE
|
||||
$ref: "#/components/schemas/ModeType"
|
||||
mode_source:
|
||||
type: string
|
||||
description: Where we got the mode from. If this was from the spot itself, it's likely quite accurate, but if we had to fall back to the bandplan, it might not be correct.
|
||||
enum:
|
||||
- SPOT
|
||||
- COMMENT
|
||||
- BANDPLAN
|
||||
- NONE
|
||||
$ref: "#/components/schemas/ModeSource"
|
||||
freq:
|
||||
type: number
|
||||
description: Frequency, in Hz
|
||||
example: 7150500
|
||||
band:
|
||||
type: string
|
||||
description: Band, defined by the frequency.
|
||||
enum:
|
||||
- 160m
|
||||
- 80m
|
||||
- 60m
|
||||
- 40m
|
||||
- 30m
|
||||
- 20m
|
||||
- 17m
|
||||
- 15m
|
||||
- 12m
|
||||
- 10m
|
||||
- 6m
|
||||
- 4m
|
||||
- 2m
|
||||
- 70cm
|
||||
- 23cm
|
||||
- 13cm
|
||||
- Unknown
|
||||
example: 40m
|
||||
$ref: "#/components/schemas/BandName"
|
||||
time:
|
||||
type: number
|
||||
description: Time of the spot, UTC seconds since UNIX epoch
|
||||
@@ -1002,29 +896,8 @@ components:
|
||||
description: Comment left by the spotter, if any
|
||||
example: "59 in NY 73"
|
||||
sig:
|
||||
type: string
|
||||
description: Special Interest Group (SIG), e.g. outdoor activity programme such as POTA
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/SIGName"
|
||||
sig_refs:
|
||||
type: array
|
||||
items:
|
||||
@@ -1041,7 +914,7 @@ components:
|
||||
band_color:
|
||||
type: string
|
||||
descripton: Colour to represent this spot, if a client chooses to colour spots based on their frequency band, using PSK Reporter's default colours. HTML colour e.g. hex.
|
||||
example: #ff0000"
|
||||
example: "#ff0000"
|
||||
band_contrast_color:
|
||||
type: string
|
||||
descripton: Black or white, whichever best contrasts with "band_color".
|
||||
@@ -1051,24 +924,8 @@ components:
|
||||
description: QRT state. Some APIs return spots marked as QRT. Otherwise we can check the comments.
|
||||
example: false
|
||||
source:
|
||||
type: string
|
||||
description: Where we got the spot from. The options will vary based on how the sources are named within the server's config. See the /options call for how to retrieve a list of these.
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- ParksNPeaks
|
||||
- ZLOTA
|
||||
- WOTA
|
||||
- Cluster
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
- TOTA
|
||||
example: POTA
|
||||
description: Where we got the spot from.
|
||||
$ref: "#/components/schemas/Source"
|
||||
source_id:
|
||||
type: string
|
||||
description: The ID the source gave it, if any.
|
||||
@@ -1103,17 +960,8 @@ components:
|
||||
description: Country flag of the DX operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc.
|
||||
example: ""
|
||||
dx_continent:
|
||||
type: string
|
||||
description: Continent of the DX operator
|
||||
enum:
|
||||
- EU
|
||||
- NA
|
||||
- SA
|
||||
- AS
|
||||
- AF
|
||||
- OC
|
||||
- AN
|
||||
example: EU
|
||||
$ref: "#/components/schemas/Continent"
|
||||
dx_dxcc_id:
|
||||
type: integer
|
||||
description: DXCC ID of the DX operator
|
||||
@@ -1159,27 +1007,8 @@ components:
|
||||
description: Comment made by the activator, if any
|
||||
example: "2025 DXpedition to null island"
|
||||
sig:
|
||||
type: string
|
||||
description: Special Interest Group (SIG), e.g. outdoor activity programme such as POTA
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- WCA
|
||||
- MOTA
|
||||
- SIOTA
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/SIGName"
|
||||
sig_refs:
|
||||
type: array
|
||||
items:
|
||||
@@ -1196,22 +1025,7 @@ components:
|
||||
source:
|
||||
type: string
|
||||
description: Where we got the alert from.
|
||||
enum:
|
||||
- POTA
|
||||
- SOTA
|
||||
- WWFF
|
||||
- WWBOTA
|
||||
- GMA
|
||||
- HEMA
|
||||
- ParksNPeaks
|
||||
- ZLOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- Cluster
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/Source"
|
||||
source_id:
|
||||
type: string
|
||||
description: The ID the source gave it, if any.
|
||||
@@ -1221,9 +1035,8 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the provider.
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/Source"
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Whether the provider is enabled or not.
|
||||
@@ -1245,9 +1058,8 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the provider.
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/Source"
|
||||
enabled:
|
||||
type: boolean
|
||||
description: Whether the provider is enabled or not.
|
||||
@@ -1265,9 +1077,8 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the band
|
||||
example: 40m
|
||||
$ref: "#/components/schemas/BandName"
|
||||
start_freq:
|
||||
type: int
|
||||
description: The start frequency of this band, in Hz.
|
||||
@@ -1289,9 +1100,8 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The abbreviated name of the SIG
|
||||
example: POTA
|
||||
$ref: "#/components/schemas/SIGName"
|
||||
description:
|
||||
type: string
|
||||
description: The full name of the SIG
|
||||
|
||||
@@ -23,7 +23,7 @@ function loadSpots() {
|
||||
// Build a query string for the API, based on the filters that the user has selected.
|
||||
function buildQueryString() {
|
||||
var str = "?";
|
||||
["dx_continent", "de_continent", "mode_type", "source", "band"].forEach(fn => {
|
||||
["dx_continent", "de_continent", "mode_type", "source", "band", "sig"].forEach(fn => {
|
||||
if (!allFilterOptionsSelected(fn)) {
|
||||
str = str + getQueryStringFor(fn) + "&";
|
||||
}
|
||||
@@ -230,6 +230,7 @@ function loadOptions() {
|
||||
|
||||
// Populate the filters panel
|
||||
generateBandsMultiToggleFilterCard(options["bands"]);
|
||||
generateSIGsMultiToggleFilterCard(options["sigs"]);
|
||||
generateMultiToggleFilterCard("#dx-continent-options", "dx_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#de-continent-options", "de_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#mode-options", "mode_type", options["mode_types"]);
|
||||
|
||||
@@ -17,7 +17,7 @@ function loadSpots() {
|
||||
// Build a query string for the API, based on the filters that the user has selected.
|
||||
function buildQueryString() {
|
||||
var str = "?";
|
||||
["dx_continent", "de_continent", "mode_type", "source", "band"].forEach(fn => {
|
||||
["dx_continent", "de_continent", "mode_type", "source", "band", "sig"].forEach(fn => {
|
||||
if (!allFilterOptionsSelected(fn)) {
|
||||
str = str + getQueryStringFor(fn) + "&";
|
||||
}
|
||||
@@ -158,6 +158,7 @@ function loadOptions() {
|
||||
|
||||
// Populate the filters panel
|
||||
generateBandsMultiToggleFilterCard(options["bands"]);
|
||||
generateSIGsMultiToggleFilterCard(options["sigs"]);
|
||||
generateMultiToggleFilterCard("#dx-continent-options", "dx_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#de-continent-options", "de_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#mode-options", "mode_type", options["mode_types"]);
|
||||
|
||||
@@ -14,7 +14,7 @@ function loadSpots() {
|
||||
// Build a query string for the API, based on the filters that the user has selected.
|
||||
function buildQueryString() {
|
||||
var str = "?";
|
||||
["dx_continent", "de_continent", "mode_type", "source", "band"].forEach(fn => {
|
||||
["dx_continent", "de_continent", "mode_type", "source", "band", "sig"].forEach(fn => {
|
||||
if (!allFilterOptionsSelected(fn)) {
|
||||
str = str + getQueryStringFor(fn) + "&";
|
||||
}
|
||||
@@ -282,6 +282,7 @@ function loadOptions() {
|
||||
|
||||
// Populate the filters panel
|
||||
generateBandsMultiToggleFilterCard(options["bands"]);
|
||||
generateSIGsMultiToggleFilterCard(options["sigs"]);console.log(options["sigs"]);
|
||||
generateMultiToggleFilterCard("#dx-continent-options", "dx_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#de-continent-options", "de_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#mode-options", "mode_type", options["mode_types"]);
|
||||
|
||||
@@ -30,6 +30,18 @@ function generateBandsMultiToggleFilterCard(band_options) {
|
||||
$("#band-options").append(` <span style="display: inline-block"><button id="filter-button-band-all" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('band', true);">All</button> <button id="filter-button-band-none" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('band', false);">None</button></span>`);
|
||||
}
|
||||
|
||||
// Generate SIGs filter card. This one is also a special case.
|
||||
function generateSIGsMultiToggleFilterCard(sig_options) {
|
||||
// Create a button for each option
|
||||
sig_options.forEach(o => {
|
||||
$("#sig-options").append(`<input type="checkbox" class="btn-check filter-button-sig storeable-checkbox" name="options" id="filter-button-sig-${o['name']}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="btn btn-outline-primary" id="filter-button-label-sig-${o['name']}" for="filter-button-sig-${o['name']}" title="${o['description']}"><i class="fa-solid fa-${o['icon']}"></i> ${o['name']}</label> `);
|
||||
});
|
||||
// Create a bonus "NO_SIG" / "General DX" option
|
||||
$("#sig-options").append(`<input type="checkbox" class="btn-check filter-button-sig storeable-checkbox" name="options" id="filter-button-sig-NO_SIG" value="NO_SIG" autocomplete="off" onClick="filtersUpdated()" checked><label class="btn btn-outline-primary" id="filter-button-label-sig-NO_SIG" for="filter-button-sig-NO_SIG"><i class="fa-solid fa-tower-cell"></i> General DX</label> `);
|
||||
// Create All/None buttons
|
||||
$("#sig-options").append(` <span style="display: inline-block"><button id="filter-button-sig-all" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('sig', true);">All</button> <button id="filter-button-sig-none" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('sig', false);">None</button></span>`);
|
||||
}
|
||||
|
||||
// Method called when any filter is changed to reload the spots and persist the filter settings.
|
||||
function filtersUpdated() {
|
||||
loadSpots();
|
||||
Reference in New Issue
Block a user