@aibee/crc-bmap 0.1.10 → 0.1.12

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
@@ -1083,17 +1083,17 @@ function moveOnRoute(startPoint, endPoint, distance) {
1083
1083
  const newY = startY + (endY - startY) * ratio;
1084
1084
  return [newX, newY];
1085
1085
  }
1086
- var PathDirection = /* @__PURE__ */ ((PathDirection4) => {
1087
- PathDirection4["START"] = "start";
1088
- PathDirection4["END"] = "end";
1089
- PathDirection4["FRONT"] = "front";
1090
- PathDirection4["RIGHT"] = "right";
1091
- PathDirection4["LEFT"] = "left";
1092
- PathDirection4["RIGHT_FRONT"] = "right_front";
1093
- PathDirection4["LEFT_FRONT"] = "left_front";
1094
- PathDirection4["RIGHT_BACK"] = "right_back";
1095
- PathDirection4["LEFT_BACK"] = "left_back";
1096
- return PathDirection4;
1086
+ var PathDirection = /* @__PURE__ */ ((PathDirection3) => {
1087
+ PathDirection3["START"] = "start";
1088
+ PathDirection3["END"] = "end";
1089
+ PathDirection3["FRONT"] = "front";
1090
+ PathDirection3["RIGHT"] = "right";
1091
+ PathDirection3["LEFT"] = "left";
1092
+ PathDirection3["RIGHT_FRONT"] = "right_front";
1093
+ PathDirection3["LEFT_FRONT"] = "left_front";
1094
+ PathDirection3["RIGHT_BACK"] = "right_back";
1095
+ PathDirection3["LEFT_BACK"] = "left_back";
1096
+ return PathDirection3;
1097
1097
  })(PathDirection || {});
1098
1098
  function calc_direction(p0, p1, p2) {
1099
1099
  const angle = calc_angle(p0, p1, p2);
@@ -9831,7 +9831,7 @@ var ImuPosition = class {
9831
9831
  }
9832
9832
  imuFreUpdate() {
9833
9833
  if (this.accH_time_fifo.length > 2) {
9834
- if (this.accH_time_fifo[this.accH_time_fifo.length - 1] - this.accH_time_fifo[this.accH_time_fifo.length - 2] < 0 || this.accH_time_fifo[this.accH_time_fifo.length - 1] - this.accH_time_fifo[this.accH_time_fifo.length - 2] > 10 || this.accH_time_fifo[this.accH_time_fifo.length - 1] === this.accH_time_fifo[0]) {
9834
+ if (this.accH_time_fifo[this.accH_time_fifo.length - 1] - this.accH_time_fifo[this.accH_time_fifo.length - 2] < 0 || this.accH_time_fifo[this.accH_time_fifo.length - 1] - this.accH_time_fifo[this.accH_time_fifo.length - 2] > 1e4 || this.accH_time_fifo[this.accH_time_fifo.length - 1] === this.accH_time_fifo[0]) {
9835
9835
  console.warn(`pdr reset last one time ${this.accH_time_fifo[this.accH_time_fifo.length - 1]} last two time ${this.accH_time_fifo[this.accH_time_fifo.length - 2]}`);
9836
9836
  this.reset();
9837
9837
  }
@@ -10036,6 +10036,7 @@ var PositioningSystem = class {
10036
10036
  if (data_type === "acceleration" /* ACCELERATION */) {
10037
10037
  const acc = data;
10038
10038
  const step_length = this.pdr.getStepLength(time, acc);
10039
+ console.log("SENSOR_TYPE.ACCELERATION", step_length);
10039
10040
  if (step_length !== 0) {
10040
10041
  this.particleFilter.motionModelStepLength(
10041
10042
  step_length,
@@ -10066,7 +10067,7 @@ var PositioningSystem = class {
10066
10067
  this.particleFilter.motionModelCompassYaw(data, time);
10067
10068
  this.particleFilter.setLastCompassTime(time);
10068
10069
  }
10069
- if (this.last_pos_time && time - this.last_pos_time > 0.5) {
10070
+ if (this.last_pos_time && time - this.last_pos_time > 500) {
10070
10071
  this.position_count += 1;
10071
10072
  success = true;
10072
10073
  }