gnss-js 2.0.0 → 2.1.0
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/dist/{chunk-2CMAFEHI.js → chunk-DWUQRJ37.js} +284 -139
- package/dist/has-BaXnQarR.d.cts +123 -0
- package/dist/has-BaXnQarR.d.ts +123 -0
- package/dist/index.cjs +292 -143
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -1
- package/dist/positioning.cjs +286 -137
- package/dist/positioning.d.cts +161 -2
- package/dist/positioning.d.ts +161 -2
- package/dist/positioning.js +9 -1
- package/dist/sbf.d.cts +2 -123
- package/dist/sbf.d.ts +2 -123
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/** Constellations HAS corrects: GPS (GNSS ID 0), Galileo (GNSS ID 2). */
|
|
2
|
+
type HasSystem = 'G' | 'E';
|
|
3
|
+
/** One system's satellite/signal mask (ICD §6.4.3). */
|
|
4
|
+
interface HasSystemMask {
|
|
5
|
+
/** GNSS ID as broadcast: 0 GPS, 2 Galileo. */
|
|
6
|
+
gnssId: number;
|
|
7
|
+
system: HasSystem;
|
|
8
|
+
/** Masked satellites in mask order, e.g. ["E03", "E05", ...]. */
|
|
9
|
+
prns: string[];
|
|
10
|
+
/** Set bits of the 16-bit signal mask, ascending. */
|
|
11
|
+
signalIndices: number[];
|
|
12
|
+
/** ICD names for `signalIndices`. */
|
|
13
|
+
signals: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Cell mask, [satellite][signal] in mask order — true when the
|
|
16
|
+
* sat×signal combination carries biases. Null when the cell-mask
|
|
17
|
+
* availability flag is 0 (all combinations available).
|
|
18
|
+
*/
|
|
19
|
+
cellMask: boolean[][] | null;
|
|
20
|
+
/** Nav-message index the corrections refer to (0 = LNAV / I/NAV). */
|
|
21
|
+
navMessage: number;
|
|
22
|
+
}
|
|
23
|
+
/** The satellite/signal mask block of one mask ID. */
|
|
24
|
+
interface HasMasks {
|
|
25
|
+
maskId: number;
|
|
26
|
+
systems: HasSystemMask[];
|
|
27
|
+
}
|
|
28
|
+
/** Orbit correction for one satellite (ICD §6.5). */
|
|
29
|
+
interface HasOrbitCorrection {
|
|
30
|
+
system: HasSystem;
|
|
31
|
+
prn: string;
|
|
32
|
+
/** Broadcast issue of data the deltas refer to (IODE / IODNav). */
|
|
33
|
+
gnssIod: number;
|
|
34
|
+
/** Delta radial in m (LSB 0.0025), null = data not available. */
|
|
35
|
+
deltaRadial: number | null;
|
|
36
|
+
/** Delta in-track in m (LSB 0.008), null = data not available. */
|
|
37
|
+
deltaInTrack: number | null;
|
|
38
|
+
/** Delta cross-track in m (LSB 0.008), null = data not available. */
|
|
39
|
+
deltaCrossTrack: number | null;
|
|
40
|
+
}
|
|
41
|
+
interface HasOrbitBlock {
|
|
42
|
+
validityIndex: number;
|
|
43
|
+
/** Validity interval in s (null = reserved index 15). */
|
|
44
|
+
validitySeconds: number | null;
|
|
45
|
+
corrections: HasOrbitCorrection[];
|
|
46
|
+
}
|
|
47
|
+
/** Clock correction for one satellite (ICD §6.6-6.7). */
|
|
48
|
+
interface HasClockCorrection {
|
|
49
|
+
system: HasSystem;
|
|
50
|
+
prn: string;
|
|
51
|
+
/**
|
|
52
|
+
* Delta clock C0 in m, multiplier folded in; positive means the
|
|
53
|
+
* satellite clock offset grows (add Δclock/c to the broadcast
|
|
54
|
+
* clock). Null when data not available or the satellite is flagged
|
|
55
|
+
* "shall not be used" (see `notUsable`).
|
|
56
|
+
*/
|
|
57
|
+
deltaClock: number | null;
|
|
58
|
+
/** True for the reserved "insufficient accuracy, do not use" value. */
|
|
59
|
+
notUsable: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface HasClockBlock {
|
|
62
|
+
validityIndex: number;
|
|
63
|
+
validitySeconds: number | null;
|
|
64
|
+
/** Delta-clock C0 multiplier per system (1-4), in mask order. */
|
|
65
|
+
multipliers: {
|
|
66
|
+
system: HasSystem;
|
|
67
|
+
multiplier: number;
|
|
68
|
+
}[];
|
|
69
|
+
corrections: HasClockCorrection[];
|
|
70
|
+
}
|
|
71
|
+
/** Code or phase bias of one satellite × signal cell (ICD §6.8-6.9). */
|
|
72
|
+
interface HasSignalBias {
|
|
73
|
+
system: HasSystem;
|
|
74
|
+
prn: string;
|
|
75
|
+
signalIndex: number;
|
|
76
|
+
signal: string;
|
|
77
|
+
/** Bias in m (code, LSB 0.02) or cycles (phase, LSB 0.01); null = N/A. */
|
|
78
|
+
bias: number | null;
|
|
79
|
+
/** Phase-discontinuity indicator (phase biases only). */
|
|
80
|
+
discontinuity?: number;
|
|
81
|
+
}
|
|
82
|
+
interface HasBiasBlock {
|
|
83
|
+
validityIndex: number;
|
|
84
|
+
validitySeconds: number | null;
|
|
85
|
+
biases: HasSignalBias[];
|
|
86
|
+
}
|
|
87
|
+
/** Which sub-blocks the MT1 header flags as present (ICD §6.2). */
|
|
88
|
+
interface HasContentFlags {
|
|
89
|
+
mask: boolean;
|
|
90
|
+
orbit: boolean;
|
|
91
|
+
clockFullSet: boolean;
|
|
92
|
+
clockSubset: boolean;
|
|
93
|
+
codeBias: boolean;
|
|
94
|
+
phaseBias: boolean;
|
|
95
|
+
}
|
|
96
|
+
/** One decoded HAS MT1 message. */
|
|
97
|
+
interface HasMessage {
|
|
98
|
+
/** Receiver time of week (s) of the page completing the message. */
|
|
99
|
+
tow?: number;
|
|
100
|
+
/** HAS status of the carrying pages (0 test, 1 operational). */
|
|
101
|
+
status: number;
|
|
102
|
+
messageId: number;
|
|
103
|
+
/** Message size in pages (= pages used for the RS decode). */
|
|
104
|
+
messageSize: number;
|
|
105
|
+
/** Time of hour of the corrections, s (0-3599, ICD §6.2). */
|
|
106
|
+
toh: number;
|
|
107
|
+
maskId: number;
|
|
108
|
+
iodSetId: number;
|
|
109
|
+
flags: HasContentFlags;
|
|
110
|
+
/** The mask block in force (own or cached, see `maskFromCache`). */
|
|
111
|
+
masks?: HasMasks;
|
|
112
|
+
/** True when `masks` came from an earlier message with this mask ID. */
|
|
113
|
+
maskFromCache: boolean;
|
|
114
|
+
orbit?: HasOrbitBlock;
|
|
115
|
+
clockFullSet?: HasClockBlock;
|
|
116
|
+
clockSubset?: HasClockBlock;
|
|
117
|
+
codeBias?: HasBiasBlock;
|
|
118
|
+
phaseBias?: HasBiasBlock;
|
|
119
|
+
/** Null when fully parsed, else why the sub-blocks are missing. */
|
|
120
|
+
parseError: string | null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type { HasMessage as H, HasOrbitCorrection as a, HasClockCorrection as b };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/** Constellations HAS corrects: GPS (GNSS ID 0), Galileo (GNSS ID 2). */
|
|
2
|
+
type HasSystem = 'G' | 'E';
|
|
3
|
+
/** One system's satellite/signal mask (ICD §6.4.3). */
|
|
4
|
+
interface HasSystemMask {
|
|
5
|
+
/** GNSS ID as broadcast: 0 GPS, 2 Galileo. */
|
|
6
|
+
gnssId: number;
|
|
7
|
+
system: HasSystem;
|
|
8
|
+
/** Masked satellites in mask order, e.g. ["E03", "E05", ...]. */
|
|
9
|
+
prns: string[];
|
|
10
|
+
/** Set bits of the 16-bit signal mask, ascending. */
|
|
11
|
+
signalIndices: number[];
|
|
12
|
+
/** ICD names for `signalIndices`. */
|
|
13
|
+
signals: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Cell mask, [satellite][signal] in mask order — true when the
|
|
16
|
+
* sat×signal combination carries biases. Null when the cell-mask
|
|
17
|
+
* availability flag is 0 (all combinations available).
|
|
18
|
+
*/
|
|
19
|
+
cellMask: boolean[][] | null;
|
|
20
|
+
/** Nav-message index the corrections refer to (0 = LNAV / I/NAV). */
|
|
21
|
+
navMessage: number;
|
|
22
|
+
}
|
|
23
|
+
/** The satellite/signal mask block of one mask ID. */
|
|
24
|
+
interface HasMasks {
|
|
25
|
+
maskId: number;
|
|
26
|
+
systems: HasSystemMask[];
|
|
27
|
+
}
|
|
28
|
+
/** Orbit correction for one satellite (ICD §6.5). */
|
|
29
|
+
interface HasOrbitCorrection {
|
|
30
|
+
system: HasSystem;
|
|
31
|
+
prn: string;
|
|
32
|
+
/** Broadcast issue of data the deltas refer to (IODE / IODNav). */
|
|
33
|
+
gnssIod: number;
|
|
34
|
+
/** Delta radial in m (LSB 0.0025), null = data not available. */
|
|
35
|
+
deltaRadial: number | null;
|
|
36
|
+
/** Delta in-track in m (LSB 0.008), null = data not available. */
|
|
37
|
+
deltaInTrack: number | null;
|
|
38
|
+
/** Delta cross-track in m (LSB 0.008), null = data not available. */
|
|
39
|
+
deltaCrossTrack: number | null;
|
|
40
|
+
}
|
|
41
|
+
interface HasOrbitBlock {
|
|
42
|
+
validityIndex: number;
|
|
43
|
+
/** Validity interval in s (null = reserved index 15). */
|
|
44
|
+
validitySeconds: number | null;
|
|
45
|
+
corrections: HasOrbitCorrection[];
|
|
46
|
+
}
|
|
47
|
+
/** Clock correction for one satellite (ICD §6.6-6.7). */
|
|
48
|
+
interface HasClockCorrection {
|
|
49
|
+
system: HasSystem;
|
|
50
|
+
prn: string;
|
|
51
|
+
/**
|
|
52
|
+
* Delta clock C0 in m, multiplier folded in; positive means the
|
|
53
|
+
* satellite clock offset grows (add Δclock/c to the broadcast
|
|
54
|
+
* clock). Null when data not available or the satellite is flagged
|
|
55
|
+
* "shall not be used" (see `notUsable`).
|
|
56
|
+
*/
|
|
57
|
+
deltaClock: number | null;
|
|
58
|
+
/** True for the reserved "insufficient accuracy, do not use" value. */
|
|
59
|
+
notUsable: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface HasClockBlock {
|
|
62
|
+
validityIndex: number;
|
|
63
|
+
validitySeconds: number | null;
|
|
64
|
+
/** Delta-clock C0 multiplier per system (1-4), in mask order. */
|
|
65
|
+
multipliers: {
|
|
66
|
+
system: HasSystem;
|
|
67
|
+
multiplier: number;
|
|
68
|
+
}[];
|
|
69
|
+
corrections: HasClockCorrection[];
|
|
70
|
+
}
|
|
71
|
+
/** Code or phase bias of one satellite × signal cell (ICD §6.8-6.9). */
|
|
72
|
+
interface HasSignalBias {
|
|
73
|
+
system: HasSystem;
|
|
74
|
+
prn: string;
|
|
75
|
+
signalIndex: number;
|
|
76
|
+
signal: string;
|
|
77
|
+
/** Bias in m (code, LSB 0.02) or cycles (phase, LSB 0.01); null = N/A. */
|
|
78
|
+
bias: number | null;
|
|
79
|
+
/** Phase-discontinuity indicator (phase biases only). */
|
|
80
|
+
discontinuity?: number;
|
|
81
|
+
}
|
|
82
|
+
interface HasBiasBlock {
|
|
83
|
+
validityIndex: number;
|
|
84
|
+
validitySeconds: number | null;
|
|
85
|
+
biases: HasSignalBias[];
|
|
86
|
+
}
|
|
87
|
+
/** Which sub-blocks the MT1 header flags as present (ICD §6.2). */
|
|
88
|
+
interface HasContentFlags {
|
|
89
|
+
mask: boolean;
|
|
90
|
+
orbit: boolean;
|
|
91
|
+
clockFullSet: boolean;
|
|
92
|
+
clockSubset: boolean;
|
|
93
|
+
codeBias: boolean;
|
|
94
|
+
phaseBias: boolean;
|
|
95
|
+
}
|
|
96
|
+
/** One decoded HAS MT1 message. */
|
|
97
|
+
interface HasMessage {
|
|
98
|
+
/** Receiver time of week (s) of the page completing the message. */
|
|
99
|
+
tow?: number;
|
|
100
|
+
/** HAS status of the carrying pages (0 test, 1 operational). */
|
|
101
|
+
status: number;
|
|
102
|
+
messageId: number;
|
|
103
|
+
/** Message size in pages (= pages used for the RS decode). */
|
|
104
|
+
messageSize: number;
|
|
105
|
+
/** Time of hour of the corrections, s (0-3599, ICD §6.2). */
|
|
106
|
+
toh: number;
|
|
107
|
+
maskId: number;
|
|
108
|
+
iodSetId: number;
|
|
109
|
+
flags: HasContentFlags;
|
|
110
|
+
/** The mask block in force (own or cached, see `maskFromCache`). */
|
|
111
|
+
masks?: HasMasks;
|
|
112
|
+
/** True when `masks` came from an earlier message with this mask ID. */
|
|
113
|
+
maskFromCache: boolean;
|
|
114
|
+
orbit?: HasOrbitBlock;
|
|
115
|
+
clockFullSet?: HasClockBlock;
|
|
116
|
+
clockSubset?: HasClockBlock;
|
|
117
|
+
codeBias?: HasBiasBlock;
|
|
118
|
+
phaseBias?: HasBiasBlock;
|
|
119
|
+
/** Null when fully parsed, else why the sub-blocks are missing. */
|
|
120
|
+
parseError: string | null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type { HasMessage as H, HasOrbitCorrection as a, HasClockCorrection as b };
|