Merge remote-tracking branch 'origin/main' into fix/tle-catalog-matching

This commit is contained in:
VG31OP committed 2026-10-16 22:44:46 +05:30
commit b48f44f6e8
205 files changed
+20440 -1206

No files matched your search

+11 -3
View File
@@ -15,9 +15,9 @@ export const PANEL_WORKER_PRELUDE_PATH = 'cesium/worker-prelude.js';
/**
* Sites the app's browser code loads from directly: map imagery, 3D tiles,
* terrain, fonts, and Street Level's Mapillary Graph API and image CDN (its
* coverage tiles come through the app's server), Google Street View and
* KartaView. Everything from the app's
* own server comes through the MCP server.
* coverage tiles come through the app's server), Google Street View,
* KartaView and Panoramax. Everything from the app's own server comes
* through the MCP server.
*/
const PROVIDER_ORIGINS = Object.freeze([
'https://tile.googleapis.com',
@@ -49,6 +49,14 @@ const PROVIDER_ORIGINS = Object.freeze([
'https://api.kartaview.org',
'https://cdn.kartaview.org',
'https://*.openstreetcam.org',
// Panoramax's meta-catalogue, and the federated instances holding most of
// its pictures (a picture on another instance shows only in the app).
'https://api.panoramax.xyz',
'https://panoramax.openstreetmap.fr',
'https://panoramax.ign.fr',
// IGN's pictures redirect to its OVH object storage.
'https://panoramax-storage-public-fast.s3.gra.perf.cloud.ovh.net',
'https://panoramax.mapcomplete.org',
]);
export const MCP_APP_MIME_TYPE = 'text/html;profile=mcp-app';
+45
View File
@@ -457,6 +457,51 @@ test('bike share names the systems it did not search', async () => {
);
});
test('bike share over Oslo searches only the nearby Norwegian systems', async () => {
const requested = [];
const result = await composeCatalog({
tools: coreTools,
services: {
bikeshare: {
systems: GBFS_CITY_REGISTRY,
getStations: async (url) => {
requested.push(url);
return { data: { stations: [] } };
},
},
},
}).call('get_bike_share', {
area: { lat: 59.9139, lon: 10.7522, radius_km: 5 },
});
assert.deepEqual(result.data.systems.sort(), [
'Lillestrøm, Norway',
'Oslo, Norway',
]);
assert.deepEqual(result.data.systems_not_searched, []);
assert.ok(
requested.every(
(url) =>
url.startsWith('https://gbfs.urbansharing.com/oslobysykkel.no/') ||
url.startsWith('https://api.cyclocity.fr/contracts/lillestrom/'),
),
);
});
test('bike share over Stavanger searches Kolumbus Bysykkel', async () => {
const result = await composeCatalog({
tools: coreTools,
services: {
bikeshare: {
systems: GBFS_CITY_REGISTRY,
getStations: async () => ({ data: { stations: [] } }),
},
},
}).call('get_bike_share', {
area: { lat: 58.97, lon: 5.7331, radius_km: 5 },
});
assert.deepEqual(result.data.systems, ['Stavanger, Norway']);
});
test('traffic counts only roads inside a radius area and reports missing tiles', async () => {
const flow = (segments, partial = false) => ({
getStatus: async () => ({ hasKey: true }),
+18
View File
@@ -68,6 +68,24 @@ SAT B
assert.equal(tleCatalogNumber(entries[0].line2), 48274);
});
test('TLE parsing accepts matching Alpha-5 pairs and rejects mismatched Alpha-5 pairs', () => {
const text = `SAT MISMATCH
1 A0000U 98067A 24001.50000000 .00016717 00000-0 30270-3 0 9994
2 A0001 41.4697 175.8913 0005643 312.8370 141.6893 15.61287398150000
SAT ALPHA5
1 A0000U 98067A 24001.50000000 .00016717 00000-0 30270-3 0 9994
2 A0000 41.4697 175.8913 0005643 312.8370 141.6893 15.61287398150000
`;
const entries = parseTleText(text);
assert.deepEqual(
entries.map((entry) => entry.name),
['SAT ALPHA5'],
);
assert.equal(tleCatalogNumber(entries[0].line1), 100000);
assert.equal(tleCatalogNumber(entries[0].line2), 100000);
});
test('the next pass defaults to the ISS and reports times, peak and direction', async () => {
const catalog = composeCatalog({
tools: coreTools,