@aibee/crc-bmap 0.2.3 → 0.2.4

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
@@ -11438,7 +11438,7 @@ var BMapSelect = class extends Plugin {
11438
11438
  import { cloneDeep as cloneDeep4, isNil, throttle } from "lodash";
11439
11439
  import { EventDispatcher as EventDispatcher13 } from "three";
11440
11440
  var defaultSensorOptions = {
11441
- time: 200,
11441
+ time: 1e3,
11442
11442
  elements: ["compass" /* COMPASS */, "deviceMotion" /* DEVICE_MOTION */, "acceleration" /* ACCELERATION */, "gps" /* GPS */]
11443
11443
  };
11444
11444
  var Sensor = class extends EventDispatcher13 {
@@ -11680,6 +11680,11 @@ var ParticleFilter = class {
11680
11680
  this.particleWeight[0][index] *= this.unaccess_weight;
11681
11681
  }
11682
11682
  }
11683
+ console.log(
11684
+ "sin",
11685
+ Math.sin(-this.particleX[2][0] / 180 * Math.PI),
11686
+ Math.cos(this.particleX[2][0] / 180 * Math.PI)
11687
+ );
11683
11688
  const weightSum = this.particleWeight[0].reduce((a, b) => a + b, 0);
11684
11689
  this.particleWeight[0] = this.particleWeight[0].map((w) => w / weightSum);
11685
11690
  }
@@ -22138,8 +22143,10 @@ var ImuPosition = class {
22138
22143
  delta_yaw = this.delta_yaw_accum;
22139
22144
  this.delta_yaw_accum = 0;
22140
22145
  this.delta_yaw_accum_timestamp = timestamp;
22146
+ return delta_yaw;
22147
+ } else {
22148
+ return null;
22141
22149
  }
22142
- return delta_yaw;
22143
22150
  }
22144
22151
  limitYaw(yaw) {
22145
22152
  while (yaw < -180) yaw += 360;
@@ -22217,8 +22224,11 @@ var PositioningSystem = class {
22217
22224
  }
22218
22225
  }
22219
22226
  if (data_type === "deviceMotion" /* DEVICE_MOTION */) {
22220
- const delt_yaw = this.pdr.getDeltaYawFromRot(time / 1e3, data);
22221
- this.particleFilter.motionModelRotYaw(delt_yaw);
22227
+ const delta_yaw = this.pdr.getDeltaYawFromRot(time / 1e3, data);
22228
+ if (delta_yaw !== null) {
22229
+ console.log("delta_yaw", delta_yaw);
22230
+ this.particleFilter.motionModelRotYaw(delta_yaw);
22231
+ }
22222
22232
  }
22223
22233
  if (data_type === "compass" /* COMPASS */) {
22224
22234
  this.particleFilter.motionModelCompassYaw(data, time);