Skip to content

Commit d02cae3

Browse files
committed
Model AIS feed as observation-only source
1 parent c22118b commit d02cae3

3 files changed

Lines changed: 5 additions & 12 deletions

File tree

docs/research/finland-publisher-expansion/Finland_Source_Endpoint_Probe_2026-05-29.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ Selected Phase 4 demo window:
6363

6464
Implementation choice: publish one bounded feed-adapter system and one `digitrafficMarineAisPosition` datastream. Runtime observations lift MMSI, vessel metadata, lat/lon, SOG, COG, heading, navigation status, ship type, destination, source update time, and compact source payload JSON. AIS sentinel values are normalized before publishing: SOG >= 102.2, COG >= 360, and heading >= 511 become `"NaN"`.
6565

66-
Live smoke on 2026-05-30: bootstrapped procedure `04ig`, system `06702`, datastream `07hg2`, root deployment `06i02`, and feed deployment `06ig2` on the public SensorHub. The first retained full cycle used millisecond offsets from source snapshot time so the server stores all vessels from the same Digitraffic snapshot; public proxy verification returned 62 AIS observations, including the 60-record 2026-05-30T07:02:25Z cycle.
66+
Live smoke on 2026-05-30: bootstrapped procedure `04ig`, system `06702`, datastream `07hg2`, and root grouping deployment `06i02` on the public SensorHub. A legacy platform-linked feed deployment `06ig2` was removed after visual review because AIS is a feed adapter/query window, not a physical emplacement; Explorer should visualize the vessel observations rather than a static deployment symbol at the bbox center. The first retained full cycle used millisecond offsets from source snapshot time so the server stores all vessels from the same Digitraffic snapshot; public proxy verification returned 62 AIS observations, including the 60-record 2026-05-30T07:02:25Z cycle.

publishers/digitraffic_marine_ais/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Publishes live vessel positions from Fintraffic Digitraffic Marine AIS for a bounded Gulf of Finland demo window.
44

5-
The publisher uses a single CSAPI feed-adapter system and one datastream. Each publish cycle filters the public AIS latest-location feed to the configured bbox, caps the cycle to `max_vessels_per_cycle`, enriches records with vessel metadata where available, and emits one observation per vessel.
5+
The publisher uses a single CSAPI feed-adapter system and one datastream. It intentionally does not model the feed adapter as a physical deployment marker; the map experience comes from vessel observations, not a static sensor symbol at the query-window center. Each publish cycle filters the public AIS latest-location feed to the configured bbox, caps the cycle to `max_vessels_per_cycle`, enriches records with vessel metadata where available, and emits one observation per vessel.
66

77
```powershell
88
py publishers\digitraffic_marine_ais\bootstrap_digitraffic_marine_ais.py --dry-run

publishers/digitraffic_marine_ais/bootstrap_digitraffic_marine_ais.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
PROC_UID = "urn:os4csapi:procedure:digitraffic-marine-ais:v1"
1919
SYSTEM_UID = "urn:os4csapi:system:digitraffic-marine-ais-feed:v1"
2020
DEPLOY_ROOT_UID = "urn:os4csapi:deployment:digitraffic-marine-ais-demo:v1"
21-
DEPLOY_FEED_UID = "urn:os4csapi:deployment:digitraffic-marine-ais-feed:v1"
21+
LEGACY_DEPLOY_FEED_UID = "urn:os4csapi:deployment:digitraffic-marine-ais-feed:v1"
2222
DS_OUTPUT_NAME = "digitrafficMarineAisPosition"
2323

2424
DIGITRAFFIC_MARINE_HOME = "https://www.digitraffic.fi/en/marine-traffic/"
@@ -88,13 +88,8 @@ def _deploy_root(config: dict) -> dict:
8888
return {"type": "Feature", "geometry": {"type": "Point", "coordinates": [lon, lat]}, "properties": {"uid": DEPLOY_ROOT_UID, "featureType": "sosa:Deployment", "name": "Digitraffic Marine AIS Demo", "description": "Top-level grouping for the Finnish Digitraffic Marine AIS feed-adapter demo.", "validTime": [VALID_TIME_START, ".."]}}
8989

9090

91-
def _deploy_feed(config: dict, system_server_id: str, base_url: str) -> dict:
92-
lon, lat = _bbox_center(config)
93-
return {"type": "Feature", "geometry": {"type": "Point", "coordinates": [lon, lat]}, "properties": {"uid": DEPLOY_FEED_UID, "featureType": "sosa:Deployment", "name": "Digitraffic Marine AIS Feed", "description": f"Deployment linking the Digitraffic Marine AIS feed adapter to the configured Gulf of Finland query window ({_bbox_label(config)}).", "validTime": [VALID_TIME_START, ".."], "platform@link": {"href": f"{base_url.rstrip('/')}/systems/{system_server_id}", "uid": SYSTEM_UID, "title": "Digitraffic Marine AIS Feed - Gulf of Finland"}}}
94-
95-
9691
def clean_all(base_url: str, auth: str, *, dry_run: bool, stats: dict):
97-
clean_resource(base_url, auth, "deployments", DEPLOY_FEED_UID, dry_run=dry_run, stats=stats, cascade=True)
92+
clean_resource(base_url, auth, "deployments", LEGACY_DEPLOY_FEED_UID, dry_run=dry_run, stats=stats, cascade=True)
9893
clean_resource(base_url, auth, "deployments", DEPLOY_ROOT_UID, dry_run=dry_run, stats=stats, cascade=True)
9994
clean_resource(base_url, auth, "systems", SYSTEM_UID, dry_run=dry_run, stats=stats, cascade=True)
10095
clean_resource(base_url, auth, "procedures", PROC_UID, dry_run=dry_run, stats=stats)
@@ -111,9 +106,7 @@ def bootstrap(*, clean: bool = False, clean_only: bool = False, dry_run: bool =
111106
print(" -- System + Datastream --"); system_id = ensure_system(base_url, auth, SYSTEM_UID, _system_stub(config), _system_sml(config), dry_run=dry_run, stats=stats, force_sml=force_sml)
112107
if system_id:
113108
ensure_datastream(base_url, auth, system_id, DS_OUTPUT_NAME, _datastream_schema(), dry_run=dry_run, stats=stats)
114-
print(" -- Deployments --"); ensure_deployment(base_url, auth, DEPLOY_ROOT_UID, _deploy_root(config), dry_run=dry_run, stats=stats)
115-
if system_id:
116-
ensure_deployment(base_url, auth, DEPLOY_FEED_UID, _deploy_feed(config, system_id, base_url), dry_run=dry_run, stats=stats)
109+
print(" -- Deployments --"); clean_resource(base_url, auth, "deployments", LEGACY_DEPLOY_FEED_UID, dry_run=dry_run, stats=stats, cascade=False); ensure_deployment(base_url, auth, DEPLOY_ROOT_UID, _deploy_root(config), dry_run=dry_run, stats=stats)
117110
print_summary(stats, dry_run)
118111

119112

0 commit comments

Comments
 (0)