gnss-js 0.1.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +171 -5
- package/dist/analysis.cjs +1488 -0
- package/dist/analysis.d.cts +211 -0
- package/dist/analysis.d.ts +211 -0
- package/dist/analysis.js +14 -0
- package/dist/antex.cjs +239 -0
- package/dist/antex.d.cts +77 -0
- package/dist/antex.d.ts +77 -0
- package/dist/antex.js +8 -0
- package/dist/chunk-37QNKGTC.js +65 -0
- package/dist/chunk-4YN353Q7.js +440 -0
- package/dist/chunk-5CMSYIYM.js +214 -0
- package/dist/chunk-5S5MONFK.js +0 -0
- package/dist/chunk-6FAL6P4G.js +12 -0
- package/dist/chunk-7NOFXKET.js +433 -0
- package/dist/chunk-BJHTBYNG.js +154 -0
- package/dist/chunk-HBLU2EJ4.js +802 -0
- package/dist/chunk-HKN3PUGN.js +800 -0
- package/dist/chunk-LEEU5OIO.js +75 -0
- package/dist/chunk-LWNTWBHB.js +268 -0
- package/dist/chunk-MIIM4LDY.js +239 -0
- package/dist/chunk-SO3POWWR.js +502 -0
- package/dist/chunk-W4YMQKWH.js +622 -0
- package/dist/chunk-WP2JFDLA.js +1475 -0
- package/dist/chunk-YDMYO3YK.js +220 -0
- package/dist/constants.cjs +423 -0
- package/dist/constants.d.cts +14 -0
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +103 -0
- package/dist/coordinates.cjs +337 -0
- package/dist/coordinates.d.cts +81 -0
- package/dist/coordinates.d.ts +81 -0
- package/dist/coordinates.js +39 -0
- package/dist/ecef-CF0uAysr.d.cts +40 -0
- package/dist/ecef-CF0uAysr.d.ts +40 -0
- package/dist/ephemeris-C10stHhM.d.cts +114 -0
- package/dist/ephemeris-C10stHhM.d.ts +114 -0
- package/dist/gnss-BT6ulR17.d.cts +56 -0
- package/dist/gnss-C-tgoYNa.d.ts +56 -0
- package/dist/index.cjs +5940 -78
- package/dist/index.d.cts +17 -96
- package/dist/index.d.ts +17 -96
- package/dist/index.js +352 -415
- package/dist/nav-BAI1a9vK.d.cts +108 -0
- package/dist/nav-BAI1a9vK.d.ts +108 -0
- package/dist/nmea.cjs +247 -0
- package/dist/nmea.d.cts +37 -0
- package/dist/nmea.d.ts +37 -0
- package/dist/nmea.js +12 -0
- package/dist/ntrip.cjs +180 -0
- package/dist/ntrip.d.cts +98 -0
- package/dist/ntrip.d.ts +98 -0
- package/dist/ntrip.js +10 -0
- package/dist/orbit.cjs +511 -0
- package/dist/orbit.d.cts +117 -0
- package/dist/orbit.d.ts +117 -0
- package/dist/orbit.js +29 -0
- package/dist/parser-JPjjFgeP.d.cts +73 -0
- package/dist/parser-JPjjFgeP.d.ts +73 -0
- package/dist/rinex.cjs +1469 -0
- package/dist/rinex.d.cts +116 -0
- package/dist/rinex.d.ts +116 -0
- package/dist/rinex.js +37 -0
- package/dist/rtcm3.cjs +1512 -0
- package/dist/rtcm3.d.cts +143 -0
- package/dist/rtcm3.d.ts +143 -0
- package/dist/rtcm3.js +31 -0
- package/dist/signals.cjs +858 -0
- package/dist/signals.d.cts +93 -0
- package/dist/signals.d.ts +93 -0
- package/dist/signals.js +70 -0
- package/dist/time-DnI1VpE8.d.cts +33 -0
- package/dist/time-DnI1VpE8.d.ts +33 -0
- package/dist/time.cjs +585 -0
- package/dist/time.d.cts +307 -0
- package/dist/time.d.ts +307 -0
- package/dist/time.js +154 -0
- package/package.json +112 -14
- package/.prettierrc +0 -5
- package/jest.config.ts +0 -9
- package/test/functions.test.ts +0 -63
- package/test/gnss-scales.test.ts +0 -95
- package/test/julian.test.ts +0 -145
- package/test/rinex.test.ts +0 -11
- package/test/test.ts +0 -10
- package/test/utc.test.ts +0 -25
package/dist/ntrip.cjs
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/ntrip/index.ts
|
|
21
|
+
var ntrip_exports = {};
|
|
22
|
+
__export(ntrip_exports, {
|
|
23
|
+
connectToMountpoint: () => connectToMountpoint,
|
|
24
|
+
fetchSourcetable: () => fetchSourcetable,
|
|
25
|
+
parseSourcetable: () => parseSourcetable
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(ntrip_exports);
|
|
28
|
+
function parseStreamEntry(fields) {
|
|
29
|
+
if (fields.length < 19) return null;
|
|
30
|
+
return {
|
|
31
|
+
type: "STR",
|
|
32
|
+
mountpoint: fields[1] ?? "",
|
|
33
|
+
identifier: fields[2] ?? "",
|
|
34
|
+
format: fields[3] ?? "",
|
|
35
|
+
formatDetails: fields[4] ?? "",
|
|
36
|
+
carrier: parseInt(fields[5] ?? "0") || 0,
|
|
37
|
+
navSystem: fields[6] ?? "",
|
|
38
|
+
network: fields[7] ?? "",
|
|
39
|
+
country: fields[8] ?? "",
|
|
40
|
+
latitude: parseFloat(fields[9] ?? "0") || 0,
|
|
41
|
+
longitude: parseFloat(fields[10] ?? "0") || 0,
|
|
42
|
+
nmea: parseInt(fields[11] ?? "0") || 0,
|
|
43
|
+
solution: parseInt(fields[12] ?? "0") || 0,
|
|
44
|
+
generator: fields[13] ?? "",
|
|
45
|
+
compression: fields[14] ?? "",
|
|
46
|
+
authentication: fields[15] ?? "N",
|
|
47
|
+
fee: fields[16] ?? "N",
|
|
48
|
+
bitrate: parseInt(fields[17] ?? "0") || 0,
|
|
49
|
+
misc: fields[18] ?? ""
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function parseCasterEntry(fields) {
|
|
53
|
+
if (fields.length < 12) return null;
|
|
54
|
+
return {
|
|
55
|
+
type: "CAS",
|
|
56
|
+
host: fields[1] ?? "",
|
|
57
|
+
port: parseInt(fields[2] ?? "0") || 0,
|
|
58
|
+
identifier: fields[3] ?? "",
|
|
59
|
+
operator: fields[4] ?? "",
|
|
60
|
+
nmea: parseInt(fields[5] ?? "0") || 0,
|
|
61
|
+
country: fields[6] ?? "",
|
|
62
|
+
latitude: parseFloat(fields[7] ?? "0") || 0,
|
|
63
|
+
longitude: parseFloat(fields[8] ?? "0") || 0,
|
|
64
|
+
fallbackHost: fields[9] ?? "",
|
|
65
|
+
fallbackPort: parseInt(fields[10] ?? "0") || 0,
|
|
66
|
+
misc: fields[11] ?? ""
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function parseNetworkEntry(fields) {
|
|
70
|
+
if (fields.length < 9) return null;
|
|
71
|
+
return {
|
|
72
|
+
type: "NET",
|
|
73
|
+
identifier: fields[1] ?? "",
|
|
74
|
+
operator: fields[2] ?? "",
|
|
75
|
+
authentication: fields[3] ?? "",
|
|
76
|
+
fee: fields[4] ?? "",
|
|
77
|
+
webUrl: fields[5] ?? "",
|
|
78
|
+
streamUrl: fields[6] ?? "",
|
|
79
|
+
registrationUrl: fields[7] ?? "",
|
|
80
|
+
misc: fields[8] ?? ""
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function parseSourcetable(text) {
|
|
84
|
+
const streams = [];
|
|
85
|
+
const casters = [];
|
|
86
|
+
const networks = [];
|
|
87
|
+
for (const rawLine of text.split("\n")) {
|
|
88
|
+
const line = rawLine.trim();
|
|
89
|
+
if (!line || line === "ENDSOURCETABLE") continue;
|
|
90
|
+
const fields = line.split(";");
|
|
91
|
+
const entryType = fields[0]?.toUpperCase();
|
|
92
|
+
if (entryType === "STR") {
|
|
93
|
+
const entry = parseStreamEntry(fields);
|
|
94
|
+
if (entry) streams.push(entry);
|
|
95
|
+
} else if (entryType === "CAS") {
|
|
96
|
+
const entry = parseCasterEntry(fields);
|
|
97
|
+
if (entry) casters.push(entry);
|
|
98
|
+
} else if (entryType === "NET") {
|
|
99
|
+
const entry = parseNetworkEntry(fields);
|
|
100
|
+
if (entry) networks.push(entry);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return { streams, casters, networks, raw: text };
|
|
104
|
+
}
|
|
105
|
+
function buildAuthHeader(username, password) {
|
|
106
|
+
if (!username) return null;
|
|
107
|
+
return "Basic " + btoa(`${username}:${password ?? ""}`);
|
|
108
|
+
}
|
|
109
|
+
function ntripHeaders(info) {
|
|
110
|
+
const headers = {
|
|
111
|
+
"Ntrip-Version": info.version === "2.0" ? "Ntrip/2.0" : "Ntrip/1.0",
|
|
112
|
+
"User-Agent": "NTRIP gnss-js/1.0",
|
|
113
|
+
"X-Ntrip-Host": info.host,
|
|
114
|
+
"X-Ntrip-Port": String(info.port)
|
|
115
|
+
};
|
|
116
|
+
const auth = buildAuthHeader(info.username, info.password);
|
|
117
|
+
if (auth) headers["Authorization"] = auth;
|
|
118
|
+
return headers;
|
|
119
|
+
}
|
|
120
|
+
async function ntripFetch(proxyUrl, path, headers, signal) {
|
|
121
|
+
const url = `${proxyUrl}${path}`;
|
|
122
|
+
try {
|
|
123
|
+
return await fetch(url, { headers, signal });
|
|
124
|
+
} catch (err) {
|
|
125
|
+
if (err instanceof Error && err.name === "AbortError") throw err;
|
|
126
|
+
const message = err instanceof Error ? err.message : "The service may be temporarily unavailable.";
|
|
127
|
+
throw new Error(`Could not reach the NTRIP proxy: ${message}`, {
|
|
128
|
+
cause: err
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function fetchSourcetable(proxyUrl, info, signal) {
|
|
133
|
+
const headers = ntripHeaders(info);
|
|
134
|
+
const res = await ntripFetch(proxyUrl, "/", headers, signal);
|
|
135
|
+
if (res.status === 401) {
|
|
136
|
+
throw new Error(
|
|
137
|
+
"Authentication required. Please provide valid credentials."
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
if (!res.ok) {
|
|
141
|
+
throw new Error(`Caster returned ${res.status} ${res.statusText}`);
|
|
142
|
+
}
|
|
143
|
+
const text = await res.text();
|
|
144
|
+
return parseSourcetable(text);
|
|
145
|
+
}
|
|
146
|
+
async function connectToMountpoint(proxyUrl, info, signal) {
|
|
147
|
+
const headers = ntripHeaders(info);
|
|
148
|
+
const controller = new AbortController();
|
|
149
|
+
const combinedSignal = signal ? AbortSignal.any([signal, controller.signal]) : controller.signal;
|
|
150
|
+
const res = await ntripFetch(
|
|
151
|
+
proxyUrl,
|
|
152
|
+
`/${info.mountpoint}`,
|
|
153
|
+
headers,
|
|
154
|
+
combinedSignal
|
|
155
|
+
);
|
|
156
|
+
if (res.status === 401) {
|
|
157
|
+
throw new Error("Authentication required for this mountpoint.");
|
|
158
|
+
}
|
|
159
|
+
if (res.status === 404) {
|
|
160
|
+
throw new Error(`Mountpoint "/${info.mountpoint}" not found on caster.`);
|
|
161
|
+
}
|
|
162
|
+
if (!res.ok) {
|
|
163
|
+
throw new Error(`Caster returned ${res.status} ${res.statusText}`);
|
|
164
|
+
}
|
|
165
|
+
if (!res.body) {
|
|
166
|
+
throw new Error(
|
|
167
|
+
"No response body \u2014 streaming not supported by this environment."
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
reader: res.body.getReader(),
|
|
172
|
+
abort: () => controller.abort()
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
176
|
+
0 && (module.exports = {
|
|
177
|
+
connectToMountpoint,
|
|
178
|
+
fetchSourcetable,
|
|
179
|
+
parseSourcetable
|
|
180
|
+
});
|
package/dist/ntrip.d.cts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NTRIP client library — supports both NTRIP 1.0 and 2.0 protocols.
|
|
3
|
+
*
|
|
4
|
+
* NTRIP (Networked Transport of RTCM via Internet Protocol) streams GNSS
|
|
5
|
+
* correction data from a caster to clients over HTTP.
|
|
6
|
+
*
|
|
7
|
+
* Protocol differences:
|
|
8
|
+
* - NTRIP 1.0: ICY-style responses, no chunked encoding, User-Agent starts with "NTRIP"
|
|
9
|
+
* - NTRIP 2.0: Standard HTTP/1.1, chunked transfer encoding, Ntrip-Version header
|
|
10
|
+
*
|
|
11
|
+
* Since browsers can't connect directly to NTRIP casters (CORS), all requests
|
|
12
|
+
* are proxied through a lightweight endpoint (e.g. Cloudflare Worker).
|
|
13
|
+
*/
|
|
14
|
+
type NtripVersion = '1.0' | '2.0';
|
|
15
|
+
/** A STR (stream) entry from the sourcetable. */
|
|
16
|
+
interface NtripStream {
|
|
17
|
+
type: 'STR';
|
|
18
|
+
mountpoint: string;
|
|
19
|
+
identifier: string;
|
|
20
|
+
format: string;
|
|
21
|
+
formatDetails: string;
|
|
22
|
+
carrier: number;
|
|
23
|
+
navSystem: string;
|
|
24
|
+
network: string;
|
|
25
|
+
country: string;
|
|
26
|
+
latitude: number;
|
|
27
|
+
longitude: number;
|
|
28
|
+
nmea: number;
|
|
29
|
+
solution: number;
|
|
30
|
+
generator: string;
|
|
31
|
+
compression: string;
|
|
32
|
+
authentication: string;
|
|
33
|
+
fee: string;
|
|
34
|
+
bitrate: number;
|
|
35
|
+
misc: string;
|
|
36
|
+
}
|
|
37
|
+
/** A CAS (caster) entry from the sourcetable. */
|
|
38
|
+
interface NtripCaster {
|
|
39
|
+
type: 'CAS';
|
|
40
|
+
host: string;
|
|
41
|
+
port: number;
|
|
42
|
+
identifier: string;
|
|
43
|
+
operator: string;
|
|
44
|
+
nmea: number;
|
|
45
|
+
country: string;
|
|
46
|
+
latitude: number;
|
|
47
|
+
longitude: number;
|
|
48
|
+
fallbackHost: string;
|
|
49
|
+
fallbackPort: number;
|
|
50
|
+
misc: string;
|
|
51
|
+
}
|
|
52
|
+
/** A NET (network) entry from the sourcetable. */
|
|
53
|
+
interface NtripNetwork {
|
|
54
|
+
type: 'NET';
|
|
55
|
+
identifier: string;
|
|
56
|
+
operator: string;
|
|
57
|
+
authentication: string;
|
|
58
|
+
fee: string;
|
|
59
|
+
webUrl: string;
|
|
60
|
+
streamUrl: string;
|
|
61
|
+
registrationUrl: string;
|
|
62
|
+
misc: string;
|
|
63
|
+
}
|
|
64
|
+
type SourcetableEntry = NtripStream | NtripCaster | NtripNetwork;
|
|
65
|
+
interface Sourcetable {
|
|
66
|
+
streams: NtripStream[];
|
|
67
|
+
casters: NtripCaster[];
|
|
68
|
+
networks: NtripNetwork[];
|
|
69
|
+
raw: string;
|
|
70
|
+
}
|
|
71
|
+
interface NtripConnectionInfo {
|
|
72
|
+
host: string;
|
|
73
|
+
port: number;
|
|
74
|
+
mountpoint?: string;
|
|
75
|
+
username?: string;
|
|
76
|
+
password?: string;
|
|
77
|
+
version: NtripVersion;
|
|
78
|
+
}
|
|
79
|
+
/** Parse the full sourcetable text returned by a caster. */
|
|
80
|
+
declare function parseSourcetable(text: string): Sourcetable;
|
|
81
|
+
/**
|
|
82
|
+
* Fetch the sourcetable from an NTRIP caster.
|
|
83
|
+
* @param proxyUrl Base URL of the CORS proxy (e.g. "https://ntrip-proxy.example.com")
|
|
84
|
+
*/
|
|
85
|
+
declare function fetchSourcetable(proxyUrl: string, info: NtripConnectionInfo, signal?: AbortSignal): Promise<Sourcetable>;
|
|
86
|
+
interface NtripStreamConnection {
|
|
87
|
+
reader: ReadableStreamDefaultReader<Uint8Array>;
|
|
88
|
+
abort: () => void;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Connect to an NTRIP mountpoint and return a stream reader.
|
|
92
|
+
* @param proxyUrl Base URL of the CORS proxy
|
|
93
|
+
*/
|
|
94
|
+
declare function connectToMountpoint(proxyUrl: string, info: NtripConnectionInfo & {
|
|
95
|
+
mountpoint: string;
|
|
96
|
+
}, signal?: AbortSignal): Promise<NtripStreamConnection>;
|
|
97
|
+
|
|
98
|
+
export { type NtripCaster, type NtripConnectionInfo, type NtripNetwork, type NtripStream, type NtripStreamConnection, type NtripVersion, type Sourcetable, type SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable };
|
package/dist/ntrip.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NTRIP client library — supports both NTRIP 1.0 and 2.0 protocols.
|
|
3
|
+
*
|
|
4
|
+
* NTRIP (Networked Transport of RTCM via Internet Protocol) streams GNSS
|
|
5
|
+
* correction data from a caster to clients over HTTP.
|
|
6
|
+
*
|
|
7
|
+
* Protocol differences:
|
|
8
|
+
* - NTRIP 1.0: ICY-style responses, no chunked encoding, User-Agent starts with "NTRIP"
|
|
9
|
+
* - NTRIP 2.0: Standard HTTP/1.1, chunked transfer encoding, Ntrip-Version header
|
|
10
|
+
*
|
|
11
|
+
* Since browsers can't connect directly to NTRIP casters (CORS), all requests
|
|
12
|
+
* are proxied through a lightweight endpoint (e.g. Cloudflare Worker).
|
|
13
|
+
*/
|
|
14
|
+
type NtripVersion = '1.0' | '2.0';
|
|
15
|
+
/** A STR (stream) entry from the sourcetable. */
|
|
16
|
+
interface NtripStream {
|
|
17
|
+
type: 'STR';
|
|
18
|
+
mountpoint: string;
|
|
19
|
+
identifier: string;
|
|
20
|
+
format: string;
|
|
21
|
+
formatDetails: string;
|
|
22
|
+
carrier: number;
|
|
23
|
+
navSystem: string;
|
|
24
|
+
network: string;
|
|
25
|
+
country: string;
|
|
26
|
+
latitude: number;
|
|
27
|
+
longitude: number;
|
|
28
|
+
nmea: number;
|
|
29
|
+
solution: number;
|
|
30
|
+
generator: string;
|
|
31
|
+
compression: string;
|
|
32
|
+
authentication: string;
|
|
33
|
+
fee: string;
|
|
34
|
+
bitrate: number;
|
|
35
|
+
misc: string;
|
|
36
|
+
}
|
|
37
|
+
/** A CAS (caster) entry from the sourcetable. */
|
|
38
|
+
interface NtripCaster {
|
|
39
|
+
type: 'CAS';
|
|
40
|
+
host: string;
|
|
41
|
+
port: number;
|
|
42
|
+
identifier: string;
|
|
43
|
+
operator: string;
|
|
44
|
+
nmea: number;
|
|
45
|
+
country: string;
|
|
46
|
+
latitude: number;
|
|
47
|
+
longitude: number;
|
|
48
|
+
fallbackHost: string;
|
|
49
|
+
fallbackPort: number;
|
|
50
|
+
misc: string;
|
|
51
|
+
}
|
|
52
|
+
/** A NET (network) entry from the sourcetable. */
|
|
53
|
+
interface NtripNetwork {
|
|
54
|
+
type: 'NET';
|
|
55
|
+
identifier: string;
|
|
56
|
+
operator: string;
|
|
57
|
+
authentication: string;
|
|
58
|
+
fee: string;
|
|
59
|
+
webUrl: string;
|
|
60
|
+
streamUrl: string;
|
|
61
|
+
registrationUrl: string;
|
|
62
|
+
misc: string;
|
|
63
|
+
}
|
|
64
|
+
type SourcetableEntry = NtripStream | NtripCaster | NtripNetwork;
|
|
65
|
+
interface Sourcetable {
|
|
66
|
+
streams: NtripStream[];
|
|
67
|
+
casters: NtripCaster[];
|
|
68
|
+
networks: NtripNetwork[];
|
|
69
|
+
raw: string;
|
|
70
|
+
}
|
|
71
|
+
interface NtripConnectionInfo {
|
|
72
|
+
host: string;
|
|
73
|
+
port: number;
|
|
74
|
+
mountpoint?: string;
|
|
75
|
+
username?: string;
|
|
76
|
+
password?: string;
|
|
77
|
+
version: NtripVersion;
|
|
78
|
+
}
|
|
79
|
+
/** Parse the full sourcetable text returned by a caster. */
|
|
80
|
+
declare function parseSourcetable(text: string): Sourcetable;
|
|
81
|
+
/**
|
|
82
|
+
* Fetch the sourcetable from an NTRIP caster.
|
|
83
|
+
* @param proxyUrl Base URL of the CORS proxy (e.g. "https://ntrip-proxy.example.com")
|
|
84
|
+
*/
|
|
85
|
+
declare function fetchSourcetable(proxyUrl: string, info: NtripConnectionInfo, signal?: AbortSignal): Promise<Sourcetable>;
|
|
86
|
+
interface NtripStreamConnection {
|
|
87
|
+
reader: ReadableStreamDefaultReader<Uint8Array>;
|
|
88
|
+
abort: () => void;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Connect to an NTRIP mountpoint and return a stream reader.
|
|
92
|
+
* @param proxyUrl Base URL of the CORS proxy
|
|
93
|
+
*/
|
|
94
|
+
declare function connectToMountpoint(proxyUrl: string, info: NtripConnectionInfo & {
|
|
95
|
+
mountpoint: string;
|
|
96
|
+
}, signal?: AbortSignal): Promise<NtripStreamConnection>;
|
|
97
|
+
|
|
98
|
+
export { type NtripCaster, type NtripConnectionInfo, type NtripNetwork, type NtripStream, type NtripStreamConnection, type NtripVersion, type Sourcetable, type SourcetableEntry, connectToMountpoint, fetchSourcetable, parseSourcetable };
|