mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-13 07:33:39 +00:00
Compare commits
2 Commits
0c8973bbc6
...
82-tota
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
583735c99f | ||
|
|
6c9f3136b8 |
@@ -10,7 +10,7 @@ The API is deliberately well-defined with an OpenAPI specification and auto-gene
|
||||
|
||||
Spothole itself is also open source, Public Domain licenced code that anyone can take and modify.
|
||||
|
||||
Supported data sources include DX Clusters, the Reverse Beacon Network (RBN), the APRS Internet Service (APRS-IS), POTA, SOTA, WWFF, GMA, WWBOTA, HEMA, Parks 'n' Peaks, ZLOTA, WOTA, BOTA, the UK Packet Repeater Network, and NG3K.
|
||||
Supported data sources include DX Clusters, the Reverse Beacon Network (RBN), the APRS Internet Service (APRS-IS), POTA, SOTA, WWFF, GMA, WWBOTA, HEMA, Parks 'n' Peaks, ZLOTA, WOTA, BOTA, the UK Packet Repeater Network, NG3K, and any site based on the xOTA software by nischu.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -81,6 +81,18 @@ spot-providers:
|
||||
class: "UKPacketNet"
|
||||
name: "UK Packet Radio Net"
|
||||
enabled: false
|
||||
-
|
||||
class: "XOTA"
|
||||
name: "39C3 TOTA"
|
||||
enabled: false
|
||||
url: "https://39c3.c3nav.de/"
|
||||
# Fixed SIG/latitude/longitude for all spots from a provider is currently only a feature for the "XOTA" provider,
|
||||
# the software found at https://github.com/nischu/xOTA/. This is because this is a generic backend for xOTA
|
||||
# programmes and so different URLs provide different programmes.
|
||||
sig: "TOTA"
|
||||
latitude: 53.5622678
|
||||
longitude: 9.9855205
|
||||
|
||||
|
||||
# Alert providers to use. Same setup as the spot providers list above.
|
||||
alert-providers:
|
||||
|
||||
@@ -29,7 +29,8 @@ SIGS = [
|
||||
SIG(name="BOTA", description="Beaches on the Air", icon="water"),
|
||||
SIG(name="KRMNPA", description="Keith Roget Memorial National Parks Award", icon="earth-oceania"),
|
||||
SIG(name="WAB", description="Worked All Britain", icon="table-cells-large", ref_regex=r"[A-Z]{1,2}[0-9]{2}"),
|
||||
SIG(name="WAI", description="Worked All Ireland", icon="table-cells-large", ref_regex=r"[A-Z][0-9]{2}")
|
||||
SIG(name="WAI", description="Worked All Ireland", icon="table-cells-large", ref_regex=r"[A-Z][0-9]{2}"),
|
||||
SIG(name="TOTA", description="Toilets on the Air", icon="toilet", ref_regex=r"T\-[0-9]{2}")
|
||||
]
|
||||
|
||||
# Modes. Note "DIGI" and "DIGITAL" are also supported but are normalised into "DATA".
|
||||
|
||||
43
spotproviders/xota.py
Normal file
43
spotproviders/xota.py
Normal file
@@ -0,0 +1,43 @@
|
||||
from datetime import datetime
|
||||
|
||||
from data.sig_ref import SIGRef
|
||||
from data.spot import Spot
|
||||
from spotproviders.http_spot_provider import HTTPSpotProvider
|
||||
|
||||
|
||||
# Spot provider for servers based on the "xOTA" software at https://github.com/nischu/xOTA/
|
||||
# The provider typically doesn't give us a lat/lon or SIG explicitly, so our own config provides this information. This
|
||||
# functionality is implemented for TOTA events.
|
||||
class XOTA(HTTPSpotProvider):
|
||||
POLL_INTERVAL_SEC = 300
|
||||
FIXED_LATITUDE = None
|
||||
FIXED_LONGITUDE = None
|
||||
SIG = None
|
||||
|
||||
def __init__(self, provider_config):
|
||||
super().__init__(provider_config, provider_config["url"] + "/api/spot/all", self.POLL_INTERVAL_SEC)
|
||||
self.FIXED_LATITUDE = provider_config["latitude"] if "latitude" in provider_config else None
|
||||
self.FIXED_LONGITUDE = provider_config["longitude"] if "longitude" in provider_config else None
|
||||
self.SIG = provider_config["sig"] if "sig" in provider_config else None
|
||||
|
||||
def http_response_to_spots(self, http_response):
|
||||
new_spots = []
|
||||
# Iterate through source data
|
||||
for source_spot in http_response.json():
|
||||
# Convert to our spot format
|
||||
spot = Spot(source=self.name,
|
||||
source_id=source_spot["id"],
|
||||
dx_call=source_spot["stationCallSign"].upper(),
|
||||
freq=float(source_spot["freq"]) * 1000,
|
||||
mode=source_spot["mode"].upper(),
|
||||
sig=self.SIG,
|
||||
sig_refs=[SIGRef(id=source_spot["reference"]["title"], sig=self.SIG, url=source_spot["reference"]["website"])],
|
||||
time=datetime.fromisoformat(source_spot["modificationDate"]).timestamp(),
|
||||
dx_latitude=self.FIXED_LATITUDE,
|
||||
dx_longitude=self.FIXED_LONGITUDE,
|
||||
qrt=source_spot["state"] != "active")
|
||||
|
||||
# Add to our list. Don't worry about de-duping, removing old spots etc. at this point; other code will do
|
||||
# that for us.
|
||||
new_spots.append(spot)
|
||||
return new_spots
|
||||
@@ -16,10 +16,10 @@
|
||||
<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, and the UK Packet Repeater Network.</p>
|
||||
<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>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: POTA, SOTA, WWFF, GMA, WWBOTA, HEMA, IOTA, MOTA, ARLHS, ILLW, SIOTA, WCA, ZLOTA, KRMNPA, WOTA, BOTA, WAB & WAI.</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>
|
||||
<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>
|
||||
|
||||
@@ -52,7 +52,7 @@ 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."
|
||||
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."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
@@ -71,6 +71,7 @@ paths:
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
- TOTA
|
||||
- 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."
|
||||
@@ -90,11 +91,13 @@ paths:
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
- 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."
|
||||
@@ -282,7 +285,7 @@ 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."
|
||||
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."
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
@@ -301,6 +304,7 @@ paths:
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
- TOTA
|
||||
- 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."
|
||||
@@ -320,11 +324,13 @@ paths:
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
- 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."
|
||||
@@ -646,11 +652,13 @@ paths:
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
example: POTA
|
||||
- name: id
|
||||
in: query
|
||||
@@ -744,11 +752,13 @@ components:
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
example: POTA
|
||||
name:
|
||||
type: string
|
||||
@@ -895,7 +905,7 @@ components:
|
||||
example: 51.2345
|
||||
de_longitude:
|
||||
type: number
|
||||
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.
|
||||
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.
|
||||
example: -1.2345
|
||||
mode:
|
||||
type: string
|
||||
@@ -1007,11 +1017,13 @@ components:
|
||||
- ARLHS
|
||||
- ILLW
|
||||
- ZLOTA
|
||||
- KRMNPA
|
||||
- IOTA
|
||||
- WOTA
|
||||
- BOTA
|
||||
- WAB
|
||||
- WAI
|
||||
- TOTA
|
||||
example: POTA
|
||||
sig_refs:
|
||||
type: array
|
||||
@@ -1040,7 +1052,7 @@ components:
|
||||
example: false
|
||||
source:
|
||||
type: string
|
||||
description: Where we got the spot from.
|
||||
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
|
||||
@@ -1055,6 +1067,7 @@ components:
|
||||
- RBN
|
||||
- APRS-IS
|
||||
- UKPacketNet
|
||||
- TOTA
|
||||
example: POTA
|
||||
source_id:
|
||||
type: string
|
||||
|
||||
Reference in New Issue
Block a user