@ac-kit/math-geodesy 0.1.0 → 0.1.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/CHANGELOG.md +52 -0
- package/dist/_ecef-height.d.ts +14 -12
- package/dist/_ecef-height.d.ts.map +1 -1
- package/dist/_ecef-height.js +115 -41
- package/dist/_ecef-height.js.map +1 -1
- package/dist/geodesic/_angle.d.ts +10 -15
- package/dist/geodesic/_angle.d.ts.map +1 -1
- package/dist/geodesic/_angle.js +54 -39
- package/dist/geodesic/_angle.js.map +1 -1
- package/dist/geodesic/_constants.d.ts.map +1 -1
- package/dist/geodesic/_constants.js +2 -1
- package/dist/geodesic/_constants.js.map +1 -1
- package/dist/geodesic/_inverse.d.ts.map +1 -1
- package/dist/geodesic/_inverse.js +34 -28
- package/dist/geodesic/_inverse.js.map +1 -1
- package/dist/geodesic/_line.d.ts +7 -8
- package/dist/geodesic/_line.d.ts.map +1 -1
- package/dist/geodesic/_line.js +28 -23
- package/dist/geodesic/_line.js.map +1 -1
- package/dist/geodesic/_series.js.map +1 -1
- package/dist/geodesic.d.ts +22 -9
- package/dist/geodesic.d.ts.map +1 -1
- package/dist/geodesic.js +138 -90
- package/dist/geodesic.js.map +1 -1
- package/dist/geodetic.d.ts +2 -1
- package/dist/geodetic.d.ts.map +1 -1
- package/dist/geodetic.js +42 -16
- package/dist/geodetic.js.map +1 -1
- package/dist/local-frame.d.ts.map +1 -1
- package/dist/local-frame.js +40 -9
- package/dist/local-frame.js.map +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @ac-kit/math-geodesy
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0b4fe43: The allocation contract is explicit. Solving a problem or a position allocates
|
|
8
|
+
nothing in the solver, whether or not the engine inlines its internals; a
|
|
9
|
+
caller that does not inline `geodesicDirect` or `geodesicLinePosition` boxes
|
|
10
|
+
their fractional `number` arguments, one heap number each. The two line
|
|
11
|
+
constructors allocate the line's record, once per line. `geodesicLinePositions`
|
|
12
|
+
accepts distances that share memory with its output and still allocates
|
|
13
|
+
nothing, and every function re-entered from a getter or setter on a caller's
|
|
14
|
+
record gives the right results.
|
|
15
|
+
- Updated dependencies [0b4fe43]
|
|
16
|
+
- Updated dependencies [0b4fe43]
|
|
17
|
+
- Updated dependencies [0b4fe43]
|
|
18
|
+
- Updated dependencies [0b4fe43]
|
|
19
|
+
- Updated dependencies [0b4fe43]
|
|
20
|
+
- Updated dependencies [0b4fe43]
|
|
21
|
+
- Updated dependencies [0b4fe43]
|
|
22
|
+
- Updated dependencies [0b4fe43]
|
|
23
|
+
- Updated dependencies [0b4fe43]
|
|
24
|
+
- Updated dependencies [0b4fe43]
|
|
25
|
+
- Updated dependencies [0b4fe43]
|
|
26
|
+
- Updated dependencies [0b4fe43]
|
|
27
|
+
- Updated dependencies [0b4fe43]
|
|
28
|
+
- Updated dependencies [0b4fe43]
|
|
29
|
+
- Updated dependencies [0b4fe43]
|
|
30
|
+
- Updated dependencies [0b4fe43]
|
|
31
|
+
- Updated dependencies [0b4fe43]
|
|
32
|
+
- Updated dependencies [0b4fe43]
|
|
33
|
+
- Updated dependencies [0b4fe43]
|
|
34
|
+
- Updated dependencies [0b4fe43]
|
|
35
|
+
- Updated dependencies [0b4fe43]
|
|
36
|
+
- Updated dependencies [0b4fe43]
|
|
37
|
+
- Updated dependencies [0b4fe43]
|
|
38
|
+
- Updated dependencies [0b4fe43]
|
|
39
|
+
- Updated dependencies [0b4fe43]
|
|
40
|
+
- Updated dependencies [0b4fe43]
|
|
41
|
+
- Updated dependencies [0b4fe43]
|
|
42
|
+
- Updated dependencies [0b4fe43]
|
|
43
|
+
- Updated dependencies [0b4fe43]
|
|
44
|
+
- Updated dependencies [0b4fe43]
|
|
45
|
+
- Updated dependencies [0b4fe43]
|
|
46
|
+
- Updated dependencies [0b4fe43]
|
|
47
|
+
- Updated dependencies [0b4fe43]
|
|
48
|
+
- Updated dependencies [0b4fe43]
|
|
49
|
+
- Updated dependencies [0b4fe43]
|
|
50
|
+
- @ac-kit/core@0.13.0
|
|
51
|
+
- @ac-kit/math-geometry@0.4.0
|
|
52
|
+
- @ac-kit/math-linear@0.4.0
|
|
53
|
+
- @ac-kit/math-scalar@0.4.0
|
|
54
|
+
|
|
3
55
|
## 0.1.0
|
|
4
56
|
|
|
5
57
|
### Minor Changes
|
package/dist/_ecef-height.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export declare const HEIGHT_X_ = 0;
|
|
2
|
+
export declare const HEIGHT_Y_ = 1;
|
|
3
|
+
export declare const HEIGHT_Z_ = 2;
|
|
4
|
+
export declare const HEIGHT_SINE_ = 3;
|
|
5
|
+
export declare const HEIGHT_SEMI_MAJOR_AXIS_ = 4;
|
|
6
|
+
export declare const HEIGHT_FLATTENING_ = 5;
|
|
7
|
+
export declare const HEIGHT_RESULT_ = 6;
|
|
8
|
+
export declare const heightRegisters_: Float64Array<ArrayBuffer>;
|
|
1
9
|
/**
|
|
2
10
|
* The height above the ellipsoid of the point `(x, y, z)` whose foot on the
|
|
3
11
|
* ellipsoid has the sine of the geodetic latitude `s` (the latitude only to
|
|
@@ -14,18 +22,12 @@
|
|
|
14
22
|
* for extending the available precision", 1971; Ogita–Rump–Oishi 2005). Needs
|
|
15
23
|
* the coordinates within `[1e−150, 1e150]`: it squares them.
|
|
16
24
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* `
|
|
20
|
-
*
|
|
25
|
+
* No double crosses a call, so a point allocates nothing whatever the engine
|
|
26
|
+
* inlines: the inputs are read from `heightRegisters_` (`HEIGHT_X_` …
|
|
27
|
+
* `HEIGHT_FLATTENING_`), the height is left in
|
|
28
|
+
* `heightRegisters_[HEIGHT_RESULT_]`, and the error-free transformations
|
|
29
|
+
* (`twoSumInPlace`, `twoProductInRangeInPlace`) take their operands and leave
|
|
30
|
+
* their errors in `pair_`.
|
|
21
31
|
*/
|
|
22
32
|
export declare function heightAboveEllipsoid_(): void;
|
|
23
|
-
export declare const HEIGHT_X_ = 0;
|
|
24
|
-
export declare const HEIGHT_Y_ = 1;
|
|
25
|
-
export declare const HEIGHT_Z_ = 2;
|
|
26
|
-
export declare const HEIGHT_SINE_ = 3;
|
|
27
|
-
export declare const HEIGHT_SEMI_MAJOR_AXIS_ = 4;
|
|
28
|
-
export declare const HEIGHT_FLATTENING_ = 5;
|
|
29
|
-
export declare const HEIGHT_RESULT_ = 6;
|
|
30
|
-
export declare const heightRegisters_: Float64Array<ArrayBuffer>;
|
|
31
33
|
//# sourceMappingURL=_ecef-height.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_ecef-height.d.ts","sourceRoot":"","sources":["../src/_ecef-height.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"_ecef-height.d.ts","sourceRoot":"","sources":["../src/_ecef-height.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,gBAAgB,2BAAsB,CAAC;AAQpD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CA8I5C"}
|
package/dist/_ecef-height.js
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { twoProductInRangeInPlace, twoSumInPlace } from "@ac-kit/math-scalar";
|
|
2
|
+
export const HEIGHT_X_ = 0;
|
|
3
|
+
export const HEIGHT_Y_ = 1;
|
|
4
|
+
export const HEIGHT_Z_ = 2;
|
|
5
|
+
export const HEIGHT_SINE_ = 3;
|
|
6
|
+
export const HEIGHT_SEMI_MAJOR_AXIS_ = 4;
|
|
7
|
+
export const HEIGHT_FLATTENING_ = 5;
|
|
8
|
+
export const HEIGHT_RESULT_ = 6;
|
|
9
|
+
export const heightRegisters_ = new Float64Array(7);
|
|
10
|
+
/**
|
|
11
|
+
* Where the error-free transformations below take their two operands and leave
|
|
12
|
+
* the result and its error.
|
|
13
|
+
*/
|
|
14
|
+
const pair_ = new Float64Array(2);
|
|
2
15
|
/**
|
|
3
16
|
* The height above the ellipsoid of the point `(x, y, z)` whose foot on the
|
|
4
17
|
* ellipsoid has the sine of the geodetic latitude `s` (the latitude only to
|
|
@@ -15,10 +28,12 @@ import { twoProductError, twoSumError } from "@ac-kit/math-scalar";
|
|
|
15
28
|
* for extending the available precision", 1971; Ogita–Rump–Oishi 2005). Needs
|
|
16
29
|
* the coordinates within `[1e−150, 1e150]`: it squares them.
|
|
17
30
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* `
|
|
21
|
-
*
|
|
31
|
+
* No double crosses a call, so a point allocates nothing whatever the engine
|
|
32
|
+
* inlines: the inputs are read from `heightRegisters_` (`HEIGHT_X_` …
|
|
33
|
+
* `HEIGHT_FLATTENING_`), the height is left in
|
|
34
|
+
* `heightRegisters_[HEIGHT_RESULT_]`, and the error-free transformations
|
|
35
|
+
* (`twoSumInPlace`, `twoProductInRangeInPlace`) take their operands and leave
|
|
36
|
+
* their errors in `pair_`.
|
|
22
37
|
*/
|
|
23
38
|
export function heightAboveEllipsoid_() {
|
|
24
39
|
const x = heightRegisters_[HEIGHT_X_];
|
|
@@ -31,69 +46,128 @@ export function heightAboveEllipsoid_() {
|
|
|
31
46
|
const x2 = x * x;
|
|
32
47
|
const y2 = y * y;
|
|
33
48
|
const q0 = x2 + y2;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
pair_[0] = x2;
|
|
50
|
+
pair_[1] = y2;
|
|
51
|
+
twoSumInPlace(pair_);
|
|
52
|
+
const q0Error = pair_[1];
|
|
53
|
+
pair_[0] = x;
|
|
54
|
+
pair_[1] = x;
|
|
55
|
+
twoProductInRangeInPlace(pair_);
|
|
56
|
+
const x2Error = pair_[1];
|
|
57
|
+
pair_[0] = y;
|
|
58
|
+
pair_[1] = y;
|
|
59
|
+
twoProductInRangeInPlace(pair_);
|
|
60
|
+
const q1 = q0Error + x2Error + pair_[1];
|
|
37
61
|
const ph = Math.sqrt(q0);
|
|
38
|
-
|
|
62
|
+
pair_[0] = ph;
|
|
63
|
+
pair_[1] = ph;
|
|
64
|
+
twoProductInRangeInPlace(pair_);
|
|
65
|
+
const pl = (q0 - ph * ph - pair_[1] + q1) / (2 * ph) || 0;
|
|
39
66
|
// the polar ratio r = 1 − f and r², as pairs
|
|
40
67
|
const rh = 1 - flattening;
|
|
41
|
-
|
|
68
|
+
pair_[0] = 1;
|
|
69
|
+
pair_[1] = -flattening;
|
|
70
|
+
twoSumInPlace(pair_);
|
|
71
|
+
const rl = pair_[1];
|
|
42
72
|
const r2h = rh * rh;
|
|
43
|
-
|
|
73
|
+
pair_[0] = rh;
|
|
74
|
+
pair_[1] = rh;
|
|
75
|
+
twoProductInRangeInPlace(pair_);
|
|
76
|
+
const r2l = pair_[1] + 2 * rh * rl;
|
|
44
77
|
// sin²φ and cos²φ = 1 − sin²φ, and cosφ
|
|
45
78
|
const s2h = s * s;
|
|
46
|
-
|
|
79
|
+
pair_[0] = s;
|
|
80
|
+
pair_[1] = s;
|
|
81
|
+
twoProductInRangeInPlace(pair_);
|
|
82
|
+
const s2l = pair_[1];
|
|
47
83
|
const c2h = 1 - s2h;
|
|
48
|
-
|
|
84
|
+
pair_[0] = 1;
|
|
85
|
+
pair_[1] = -s2h;
|
|
86
|
+
twoSumInPlace(pair_);
|
|
87
|
+
const c2l = pair_[1] - s2l;
|
|
49
88
|
const ch = Math.sqrt(c2h);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
89
|
+
let cl = 0;
|
|
90
|
+
if (ch !== 0) {
|
|
91
|
+
pair_[0] = ch;
|
|
92
|
+
pair_[1] = ch;
|
|
93
|
+
twoProductInRangeInPlace(pair_);
|
|
94
|
+
cl = (c2h - ch * ch - pair_[1] + c2l) / (2 * ch);
|
|
95
|
+
}
|
|
53
96
|
// w² = cos²φ + r²·sin²φ, and w = √w², then 1/w as a pair
|
|
54
97
|
const m0 = r2h * s2h;
|
|
55
|
-
|
|
98
|
+
pair_[0] = r2h;
|
|
99
|
+
pair_[1] = s2h;
|
|
100
|
+
twoProductInRangeInPlace(pair_);
|
|
101
|
+
const m1 = pair_[1] + r2h * s2l + r2l * s2h;
|
|
56
102
|
const w2h = c2h + m0;
|
|
57
|
-
|
|
103
|
+
pair_[0] = c2h;
|
|
104
|
+
pair_[1] = m0;
|
|
105
|
+
twoSumInPlace(pair_);
|
|
106
|
+
const w2l = pair_[1] + c2l + m1;
|
|
58
107
|
const wh = Math.sqrt(w2h);
|
|
59
|
-
|
|
108
|
+
pair_[0] = wh;
|
|
109
|
+
pair_[1] = wh;
|
|
110
|
+
twoProductInRangeInPlace(pair_);
|
|
111
|
+
const wl = (w2h - wh * wh - pair_[1] + w2l) / (2 * wh);
|
|
60
112
|
const uh = 1 / wh;
|
|
61
|
-
|
|
113
|
+
pair_[0] = wh;
|
|
114
|
+
pair_[1] = uh;
|
|
115
|
+
twoProductInRangeInPlace(pair_);
|
|
116
|
+
const ul = uh * (1 - wh * uh - pair_[1] - wl * uh);
|
|
62
117
|
// F_p = a·cosφ / w
|
|
63
118
|
const aph = semiMajorAxis * ch;
|
|
64
|
-
|
|
119
|
+
pair_[0] = semiMajorAxis;
|
|
120
|
+
pair_[1] = ch;
|
|
121
|
+
twoProductInRangeInPlace(pair_);
|
|
122
|
+
const apl = pair_[1] + semiMajorAxis * cl;
|
|
65
123
|
const fph = aph * uh;
|
|
66
|
-
|
|
124
|
+
pair_[0] = aph;
|
|
125
|
+
pair_[1] = uh;
|
|
126
|
+
twoProductInRangeInPlace(pair_);
|
|
127
|
+
const fpl = pair_[1] + aph * ul + apl * uh;
|
|
67
128
|
// F_z = a·r²·sinφ / w
|
|
68
129
|
const azh = semiMajorAxis * s;
|
|
69
|
-
|
|
130
|
+
pair_[0] = semiMajorAxis;
|
|
131
|
+
pair_[1] = s;
|
|
132
|
+
twoProductInRangeInPlace(pair_);
|
|
133
|
+
const azl = pair_[1];
|
|
70
134
|
const bzh = azh * r2h;
|
|
71
|
-
|
|
135
|
+
pair_[0] = azh;
|
|
136
|
+
pair_[1] = r2h;
|
|
137
|
+
twoProductInRangeInPlace(pair_);
|
|
138
|
+
const bzl = pair_[1] + azh * r2l + azl * r2h;
|
|
72
139
|
const fzh = bzh * uh;
|
|
73
|
-
|
|
140
|
+
pair_[0] = bzh;
|
|
141
|
+
pair_[1] = uh;
|
|
142
|
+
twoProductInRangeInPlace(pair_);
|
|
143
|
+
const fzl = pair_[1] + bzh * ul + bzl * uh;
|
|
74
144
|
// the offsets of the point from the foot point
|
|
75
145
|
const dph = ph - fph;
|
|
76
|
-
|
|
146
|
+
pair_[0] = ph;
|
|
147
|
+
pair_[1] = -fph;
|
|
148
|
+
twoSumInPlace(pair_);
|
|
149
|
+
const dpl = pair_[1] + pl - fpl;
|
|
77
150
|
const dzh = z - fzh;
|
|
78
|
-
|
|
151
|
+
pair_[0] = z;
|
|
152
|
+
pair_[1] = -fzh;
|
|
153
|
+
twoSumInPlace(pair_);
|
|
154
|
+
const dzl = pair_[1] - fzl;
|
|
79
155
|
// h = dp·cosφ + dz·sinφ
|
|
80
156
|
const t0 = dph * ch;
|
|
81
157
|
const t1 = dzh * s;
|
|
82
158
|
const hh = t0 + t1;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
159
|
+
pair_[0] = t0;
|
|
160
|
+
pair_[1] = t1;
|
|
161
|
+
twoSumInPlace(pair_);
|
|
162
|
+
const hhError = pair_[1];
|
|
163
|
+
pair_[0] = dph;
|
|
164
|
+
pair_[1] = ch;
|
|
165
|
+
twoProductInRangeInPlace(pair_);
|
|
166
|
+
const t0Error = pair_[1];
|
|
167
|
+
pair_[0] = dzh;
|
|
168
|
+
pair_[1] = s;
|
|
169
|
+
twoProductInRangeInPlace(pair_);
|
|
170
|
+
const hl = hhError + t0Error + pair_[1] + dph * cl + dpl * ch + dzl * s;
|
|
89
171
|
heightRegisters_[HEIGHT_RESULT_] = hh + hl;
|
|
90
172
|
}
|
|
91
|
-
export const HEIGHT_X_ = 0;
|
|
92
|
-
export const HEIGHT_Y_ = 1;
|
|
93
|
-
export const HEIGHT_Z_ = 2;
|
|
94
|
-
export const HEIGHT_SINE_ = 3;
|
|
95
|
-
export const HEIGHT_SEMI_MAJOR_AXIS_ = 4;
|
|
96
|
-
export const HEIGHT_FLATTENING_ = 5;
|
|
97
|
-
export const HEIGHT_RESULT_ = 6;
|
|
98
|
-
export const heightRegisters_ = new Float64Array(7);
|
|
99
173
|
//# sourceMappingURL=_ecef-height.js.map
|
package/dist/_ecef-height.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_ecef-height.js","sourceRoot":"","sources":["../src/_ecef-height.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"_ecef-height.js","sourceRoot":"","sources":["../src/_ecef-height.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC;AAC3B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC;AAC3B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC;AAC3B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAC9B,MAAM,CAAC,MAAM,uBAAuB,GAAG,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|
-
* Snaps
|
|
21
|
-
* is zero up to rounding is treated as the equator. Tiny
|
|
22
|
-
* and `−0`
|
|
20
|
+
* Snaps the angle `buffer[index]` within 1/16° of zero onto a grid of 2⁻⁵⁷°, so
|
|
21
|
+
* a latitude that is zero up to rounding is treated as the equator. Tiny
|
|
22
|
+
* negatives become `−0`, and `−0` stays `−0`.
|
|
23
23
|
*/
|
|
24
|
-
export declare function
|
|
24
|
+
export declare function angleRoundInPlace_(buffer: Scratch_, index: number): void;
|
|
25
25
|
/**
|
|
26
|
-
* `
|
|
27
|
-
*
|
|
28
|
-
* The rare result `copySign(180, x)` is computed on every path, here and in the
|
|
29
|
-
* functions below: a call that has never run has no type feedback, V8 cannot
|
|
30
|
-
* inline it, and merging its boxed result with a computed double makes V8 box
|
|
31
|
-
* that double on the common path too.
|
|
26
|
+
* The angle `buffer[index]` reduced to `[−180, 180]`; a result of ±180 or ±0
|
|
27
|
+
* takes the sign of the angle.
|
|
32
28
|
*/
|
|
33
|
-
export declare function
|
|
29
|
+
export declare function angleNormalizeInPlace_(buffer: Scratch_, index: number): void;
|
|
34
30
|
/**
|
|
35
31
|
* `io[1] − io[0]` reduced to `[−180, 180]`, written back as `io[0] + io[1]`:
|
|
36
32
|
* `io[0]` is the nearest double and `io[1]` the rounding error, below 2⁻²⁶. A
|
|
37
33
|
* result of ±0 or ±180 takes the sign of the difference (of `−error` when the
|
|
38
|
-
* error is not zero).
|
|
39
|
-
* arguments could box them.)
|
|
34
|
+
* error is not zero).
|
|
40
35
|
*/
|
|
41
36
|
export declare function angleDifference_(io: Scratch_): void;
|
|
42
37
|
/**
|
|
43
38
|
* Sine and cosine, written to `io[0]` and `io[1]`, of `io[0] + io[1]` degrees,
|
|
44
39
|
* where `io[1]` is the small error term of {@link angleDifference_}. The
|
|
45
40
|
* argument is reduced to `[−45, 45]` before the conversion to radians and the
|
|
46
|
-
* reduced sum snapped by {@link
|
|
47
|
-
* contract no `math-scalar` function has); 30° and 45° give their exact
|
|
41
|
+
* reduced sum snapped by {@link angleRoundInPlace_} (upstream's `sincosde`,
|
|
42
|
+
* whose contract no `math-scalar` function has); 30° and 45° give their exact
|
|
48
43
|
* algebraic values.
|
|
49
44
|
*/
|
|
50
45
|
export declare function sineCosineCorrected_(io: Scratch_): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_angle.d.ts","sourceRoot":"","sources":["../../src/geodesic/_angle.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAI7I;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC;AAEpC,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAEvD;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,QAA+C,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,YAAY,2BAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"_angle.d.ts","sourceRoot":"","sources":["../../src/geodesic/_angle.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAI7I;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC;AAEpC,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAEvD;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,QAA+C,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,YAAY,2BAAyB,CAAC;AAqBnD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAOxE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAM5E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAqBnD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CA+CvD"}
|
package/dist/geodesic/_angle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Derived from GeographicLib Math.js (geographiclib-geodesic 2.2.0), Copyright (c) 2011-2022, Charles Karney, MIT License — see LICENSE. */
|
|
2
|
-
import {
|
|
2
|
+
import { DEG_TO_RAD, twoSumInPlace } from "@ac-kit/math-scalar";
|
|
3
3
|
export function scratchCreate_(length) {
|
|
4
4
|
return new Float64Array(length);
|
|
5
5
|
}
|
|
@@ -14,59 +14,72 @@ export const TINY_ = Math.sqrt(Number.MIN_VALUE / Number.EPSILON);
|
|
|
14
14
|
* tagged value, and V8 then boxes that variable on every path.
|
|
15
15
|
*/
|
|
16
16
|
export const TINY_DOUBLE_ = Float64Array.of(TINY_);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
// Every helper below reads its doubles from a buffer and writes its results
|
|
18
|
+
// back to it: none has a double parameter or result, so none allocates whether
|
|
19
|
+
// or not the engine inlines it (V8 boxes a double crossing a call it does not
|
|
20
|
+
// inline). The sign tests are C's `signbit`, spelled `v < 0 || 1 / v < 0` (a
|
|
21
|
+
// negative zero counts as negative, NaN as positive) rather than a call.
|
|
22
|
+
/**
|
|
23
|
+
* `buffer[index]` modulo 360, in `[−180, 180]`, exactly (upstream's
|
|
24
|
+
* `remainder(x, 360)`).
|
|
25
|
+
*/
|
|
26
|
+
function remainder360InPlace_(buffer, index) {
|
|
27
|
+
const reduced = buffer[index] % 360;
|
|
28
|
+
if (reduced < -180) {
|
|
29
|
+
buffer[index] = reduced + 360;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
buffer[index] = reduced < 180 ? reduced : reduced - 360;
|
|
22
33
|
}
|
|
23
|
-
return reduced < period / 2 ? reduced : reduced - period;
|
|
24
34
|
}
|
|
25
35
|
/**
|
|
26
|
-
* Snaps
|
|
27
|
-
* is zero up to rounding is treated as the equator. Tiny
|
|
28
|
-
* and `−0`
|
|
36
|
+
* Snaps the angle `buffer[index]` within 1/16° of zero onto a grid of 2⁻⁵⁷°, so
|
|
37
|
+
* a latitude that is zero up to rounding is treated as the equator. Tiny
|
|
38
|
+
* negatives become `−0`, and `−0` stays `−0`.
|
|
29
39
|
*/
|
|
30
|
-
export function
|
|
40
|
+
export function angleRoundInPlace_(buffer, index) {
|
|
31
41
|
const grid = 1 / 16;
|
|
42
|
+
const x = buffer[index];
|
|
32
43
|
const magnitude = Math.abs(x);
|
|
33
44
|
// `grid - (grid - magnitude)` is not `magnitude`: the rounding is the point.
|
|
34
45
|
const rounded = magnitude < grid ? grid - (grid - magnitude) : magnitude;
|
|
35
|
-
|
|
46
|
+
buffer[index] = x < 0 || 1 / x < 0 ? -rounded : rounded;
|
|
36
47
|
}
|
|
37
48
|
/**
|
|
38
|
-
* `
|
|
39
|
-
*
|
|
40
|
-
* The rare result `copySign(180, x)` is computed on every path, here and in the
|
|
41
|
-
* functions below: a call that has never run has no type feedback, V8 cannot
|
|
42
|
-
* inline it, and merging its boxed result with a computed double makes V8 box
|
|
43
|
-
* that double on the common path too.
|
|
49
|
+
* The angle `buffer[index]` reduced to `[−180, 180]`; a result of ±180 or ±0
|
|
50
|
+
* takes the sign of the angle.
|
|
44
51
|
*/
|
|
45
|
-
export function
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
export function angleNormalizeInPlace_(buffer, index) {
|
|
53
|
+
const x = buffer[index];
|
|
54
|
+
remainder360InPlace_(buffer, index);
|
|
55
|
+
if (Math.abs(buffer[index]) === 180) {
|
|
56
|
+
buffer[index] = x < 0 || 1 / x < 0 ? -180 : 180;
|
|
57
|
+
}
|
|
49
58
|
}
|
|
50
59
|
/**
|
|
51
60
|
* `io[1] − io[0]` reduced to `[−180, 180]`, written back as `io[0] + io[1]`:
|
|
52
61
|
* `io[0]` is the nearest double and `io[1]` the rounding error, below 2⁻²⁶. A
|
|
53
62
|
* result of ±0 or ±180 takes the sign of the difference (of `−error` when the
|
|
54
|
-
* error is not zero).
|
|
55
|
-
* arguments could box them.)
|
|
63
|
+
* error is not zero).
|
|
56
64
|
*/
|
|
57
65
|
export function angleDifference_(io) {
|
|
58
66
|
const x = io[0];
|
|
59
67
|
const y = io[1];
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
io[0] = -x;
|
|
69
|
+
remainder360InPlace_(io, 0);
|
|
70
|
+
io[1] = y;
|
|
71
|
+
remainder360InPlace_(io, 1);
|
|
72
|
+
twoSumInPlace(io, 0);
|
|
73
|
+
if (io[0] === 0) {
|
|
74
|
+
io[1] = io[0];
|
|
75
|
+
}
|
|
76
|
+
remainder360InPlace_(io, 0);
|
|
77
|
+
twoSumInPlace(io, 0);
|
|
78
|
+
let sum = io[0];
|
|
79
|
+
const error = sum === 0 ? sum : io[1];
|
|
68
80
|
if (sum === 0 || Math.abs(sum) === 180) {
|
|
69
|
-
|
|
81
|
+
const sign = error === 0 ? y - x : -error;
|
|
82
|
+
sum = sign < 0 || 1 / sign < 0 ? -Math.abs(sum) : Math.abs(sum);
|
|
70
83
|
}
|
|
71
84
|
io[0] = sum;
|
|
72
85
|
io[1] = error;
|
|
@@ -75,8 +88,8 @@ export function angleDifference_(io) {
|
|
|
75
88
|
* Sine and cosine, written to `io[0]` and `io[1]`, of `io[0] + io[1]` degrees,
|
|
76
89
|
* where `io[1]` is the small error term of {@link angleDifference_}. The
|
|
77
90
|
* argument is reduced to `[−45, 45]` before the conversion to radians and the
|
|
78
|
-
* reduced sum snapped by {@link
|
|
79
|
-
* contract no `math-scalar` function has); 30° and 45° give their exact
|
|
91
|
+
* reduced sum snapped by {@link angleRoundInPlace_} (upstream's `sincosde`,
|
|
92
|
+
* whose contract no `math-scalar` function has); 30° and 45° give their exact
|
|
80
93
|
* algebraic values.
|
|
81
94
|
*/
|
|
82
95
|
export function sineCosineCorrected_(io) {
|
|
@@ -84,12 +97,14 @@ export function sineCosineCorrected_(io) {
|
|
|
84
97
|
const correction = io[1];
|
|
85
98
|
const reduced = x % 360;
|
|
86
99
|
const quadrant = Math.round(reduced / 90);
|
|
87
|
-
|
|
100
|
+
io[0] = reduced - 90 * quadrant + correction;
|
|
101
|
+
angleRoundInPlace_(io, 0);
|
|
102
|
+
const angle = io[0];
|
|
88
103
|
const radians = angle * DEG_TO_RAD;
|
|
89
104
|
let sine = Math.sin(radians);
|
|
90
105
|
let cosine = Math.cos(radians);
|
|
91
106
|
const magnitude = Math.abs(angle);
|
|
92
|
-
const sign =
|
|
107
|
+
const sign = radians < 0 || 1 / radians < 0 ? -1 : 1;
|
|
93
108
|
if (magnitude === 45) {
|
|
94
109
|
cosine = Math.SQRT1_2;
|
|
95
110
|
sine = sign * cosine;
|
|
@@ -119,9 +134,9 @@ export function sineCosineCorrected_(io) {
|
|
|
119
134
|
break;
|
|
120
135
|
}
|
|
121
136
|
resultCosine += 0;
|
|
122
|
-
const zeroSine = copySign(0, x + correction);
|
|
123
137
|
if (resultSine === 0) {
|
|
124
|
-
|
|
138
|
+
const total = x + correction;
|
|
139
|
+
resultSine = total < 0 || 1 / total < 0 ? -0 : 0;
|
|
125
140
|
}
|
|
126
141
|
io[0] = resultSine;
|
|
127
142
|
io[1] = resultCosine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_angle.js","sourceRoot":"","sources":["../../src/geodesic/_angle.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAE7I,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"_angle.js","sourceRoot":"","sources":["../../src/geodesic/_angle.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAE7I,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQhE,MAAM,UAAU,cAAc,CAAC,MAAc;IAC5C,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,M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AU,CAAC;IACnB,EAAE,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_constants.d.ts","sourceRoot":"","sources":["../../src/geodesic/_constants.ts"],"names":[],"mappings":"AAAA,iJAAiJ;AAIjJ,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAK/B,6CAA6C;AAC7C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAe;AACf,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,wDAAwD;AACxD,eAAO,MAAM,qCAAqC,IAAI,CAAC;AACvD,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,gEAAgE;AAChE,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,8DAA8D;AAC9D,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,iDAAiD;AACjD,eAAO,MAAM,YAAY,QAA+B,CAAC;AAGzD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,MAAyC,CAAC;AAkD9E;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC/B,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,GAChB,QAAQ,CA2CV;AAKD,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"_constants.d.ts","sourceRoot":"","sources":["../../src/geodesic/_constants.ts"],"names":[],"mappings":"AAAA,iJAAiJ;AAIjJ,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAK/B,6CAA6C;AAC7C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAe;AACf,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,wDAAwD;AACxD,eAAO,MAAM,qCAAqC,IAAI,CAAC;AACvD,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,gEAAgE;AAChE,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,8DAA8D;AAC9D,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,iDAAiD;AACjD,eAAO,MAAM,YAAY,QAA+B,CAAC;AAGzD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,MAAyC,CAAC;AAkD9E;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC/B,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,GAChB,QAAQ,CA2CV;AAKD,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,QAAQ,CAe3D"}
|
|
@@ -127,7 +127,8 @@ export function constantsCreate_(equatorialRadius, flattening) {
|
|
|
127
127
|
const derived_ = new WeakMap();
|
|
128
128
|
/** The constants an ellipsoid record carries, derived again for a copy of one. */
|
|
129
129
|
export function constantsOf_(ellipsoid) {
|
|
130
|
-
const
|
|
130
|
+
const record = ellipsoid; // an ellipsoid record may carry its constants under a private symbol key
|
|
131
|
+
const own = record[CONSTANTS_KEY_];
|
|
131
132
|
if (own !== undefined) {
|
|
132
133
|
return own;
|
|
133
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_constants.js","sourceRoot":"","sources":["../../src/geodesic/_constants.ts"],"names":[],"mappings":"AAAA,iJAA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","sourceRoot":"","sources":["../../src/geodesic/_inverse.ts"],"names":[],"mappings":"AAAA,iJAAiJ;AAcjJ,OAAO,EAGN,KAAK,QAAQ,EAKb,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"_inverse.d.ts","sourceRoot":"","sources":["../../src/geodesic/_inverse.ts"],"names":[],"mappings":"AAAA,iJAAiJ;AAcjJ,OAAO,EAGN,KAAK,QAAQ,EAKb,MAAM,aAAa,CAAC;AAydrB,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,GAAG,IAAI,CA8RhE"}
|