@aibee/crc-bmap 0.2.1 → 0.2.2

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/lib/bmap.esm.js CHANGED
@@ -22332,12 +22332,16 @@ var PdrPosition = class extends EventDispatcher14 {
22332
22332
  start() {
22333
22333
  this.sensor.start();
22334
22334
  this.sensor.addEventListener("add-data-item", ({ item }) => {
22335
- const [success, x, y] = this.pdr.pfFusionPDRiBeacon(item);
22336
- if (success) {
22337
- this.dispatchEvent({ type: "position", x, y, _type: item.type === "gps" /* GPS */ ? "gps" : "pdr" });
22338
- }
22335
+ this.getPositionBySensorItem(item);
22339
22336
  });
22340
22337
  }
22338
+ getPositionBySensorItem(data) {
22339
+ const [success, x, y] = this.pdr.pfFusionPDRiBeacon(data);
22340
+ if (success) {
22341
+ this.dispatchEvent({ type: "position", x, y, _type: data.type === "gps" /* GPS */ ? "gps" : "pdr" });
22342
+ }
22343
+ return [success, x, y];
22344
+ }
22341
22345
  setBeaconPosition(pos, time) {
22342
22346
  const [x, y] = this.pdr.setBeaconPosition(pos, time);
22343
22347
  this.dispatchEvent({ type: "position", x, y, _type: "beacon" });
@@ -23185,4 +23189,3 @@ fraction.js/fraction.js:
23185
23189
  * Dual licensed under the MIT or GPL Version 2 licenses.
23186
23190
  **)
23187
23191
  */
23188
- //# sourceMappingURL=bmap.esm.js.map