@wemap/providers 11.2.4 → 11.3.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/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { deg2rad, Matrix4, Matrix3, Vector3, Quaternion, Matrix, Vector, Rotatio
|
|
|
9
9
|
import { ItineraryInfoManager } from "@wemap/routers";
|
|
10
10
|
import { TimeUtils, BrowserUtils, Browser, UserAgentUtils } from "@wemap/utils";
|
|
11
11
|
import Logger from "@wemap/logger";
|
|
12
|
-
import
|
|
12
|
+
import * as geomag from "geomag";
|
|
13
13
|
import { canvasToBase64, base64ToCanvas, convertToGrayscale, reduceImageSize, Camera, SharedCameras } from "@wemap/camera";
|
|
14
14
|
class RelativeAttitude extends Attitude {
|
|
15
15
|
}
|
|
@@ -2218,8 +2218,8 @@ class AbsoluteAttitudeFromBrowser extends Provider {
|
|
|
2218
2218
|
});
|
|
2219
2219
|
__publicField(this, "onAbsolutePositionEvent", (position) => {
|
|
2220
2220
|
this.absolutePositionEvent = position;
|
|
2221
|
-
const wmmResult =
|
|
2222
|
-
this.declinationQuaternion = Quaternion.fromAxisAngle([0, 0, 1], -deg2rad(wmmResult.
|
|
2221
|
+
const wmmResult = geomag.field(position.lat, position.lng);
|
|
2222
|
+
this.declinationQuaternion = Quaternion.fromAxisAngle([0, 0, 1], -deg2rad(wmmResult.declination));
|
|
2223
2223
|
AbsolutePositionProvider$1.removeEventListener(this.absolutePositionProviderId);
|
|
2224
2224
|
delete this.absolutePositionProviderId;
|
|
2225
2225
|
this.compute();
|