@aibee/crc-bmap 0.8.26 → 0.8.27
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.cjs.min.js +6 -6
- package/lib/bmap.esm.js +13 -5
- package/lib/bmap.esm.min.js +7 -7
- package/lib/bmap.min.js +6 -6
- package/lib/src/plugins/navigation/navigation.d.ts +2 -1
- package/lib/src/plugins/navigation/position-navigation.d.ts +3 -2
- package/lib/src/plugins/pdr-position/pdr.d.ts +4 -1
- package/lib/src/plugins/pdr-position/position.d.ts +4 -3
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -10662,10 +10662,11 @@ var defaultConfig3 = {
|
|
|
10662
10662
|
simulationSpeed: 1
|
|
10663
10663
|
};
|
|
10664
10664
|
var PositionNavigation = class extends EventDispatcher13 {
|
|
10665
|
-
constructor(navigation, options) {
|
|
10665
|
+
constructor(navigation, options, roadData) {
|
|
10666
10666
|
super();
|
|
10667
10667
|
this.navigation = navigation;
|
|
10668
10668
|
this.options = Object.assign({}, defaultConfig3, options);
|
|
10669
|
+
this.roadData = roadData;
|
|
10669
10670
|
this.registryEvent();
|
|
10670
10671
|
}
|
|
10671
10672
|
offset = false;
|
|
@@ -10685,6 +10686,7 @@ var PositionNavigation = class extends EventDispatcher13 {
|
|
|
10685
10686
|
tweenUtil = new TweenUtil();
|
|
10686
10687
|
simulationTween;
|
|
10687
10688
|
throttleUpdatePosition;
|
|
10689
|
+
roadData;
|
|
10688
10690
|
get curRoutePath() {
|
|
10689
10691
|
return this.paths[this.routeIndex] || null;
|
|
10690
10692
|
}
|
|
@@ -11113,7 +11115,8 @@ var defaultConfig4 = {
|
|
|
11113
11115
|
offsetY: 150,
|
|
11114
11116
|
directionEmitThreshold: 5,
|
|
11115
11117
|
disablePathAnimation: false,
|
|
11116
|
-
speed: 1
|
|
11118
|
+
speed: 1,
|
|
11119
|
+
roadData: []
|
|
11117
11120
|
};
|
|
11118
11121
|
var Navigation = class extends Plugin {
|
|
11119
11122
|
path = null;
|
|
@@ -11154,7 +11157,7 @@ var Navigation = class extends Plugin {
|
|
|
11154
11157
|
this.positionNavigation = new PositionNavigation(this, {
|
|
11155
11158
|
simulationSpeed: this.options.speed,
|
|
11156
11159
|
...this.options.positionNavigation
|
|
11157
|
-
});
|
|
11160
|
+
}, this.options.roadData);
|
|
11158
11161
|
this.registryEvent();
|
|
11159
11162
|
}
|
|
11160
11163
|
get curFloorPathLength() {
|
|
@@ -23909,6 +23912,9 @@ var ImuPosition = class {
|
|
|
23909
23912
|
};
|
|
23910
23913
|
|
|
23911
23914
|
// ../src/plugins/pdr-position/pdr.ts
|
|
23915
|
+
var defaultPdrPositionOptions = {
|
|
23916
|
+
using_gps: true
|
|
23917
|
+
};
|
|
23912
23918
|
var PositioningSystem = class {
|
|
23913
23919
|
particleFilter;
|
|
23914
23920
|
pdr;
|
|
@@ -23924,7 +23930,9 @@ var PositioningSystem = class {
|
|
|
23924
23930
|
outTrustRegionNum = 0;
|
|
23925
23931
|
TrustNum = 4;
|
|
23926
23932
|
cacheSensorData = [];
|
|
23927
|
-
constructor() {
|
|
23933
|
+
constructor(options) {
|
|
23934
|
+
const config4 = { ...defaultPdrPositionOptions, ...options };
|
|
23935
|
+
this.using_gps = config4.using_gps;
|
|
23928
23936
|
this.particleFilter = new ParticleFilter({
|
|
23929
23937
|
NumParticle: 200,
|
|
23930
23938
|
reSampNumParticle: 0.65,
|
|
@@ -24082,7 +24090,7 @@ var PdrPosition = class extends EventDispatcher17 {
|
|
|
24082
24090
|
constructor(options = {}) {
|
|
24083
24091
|
super();
|
|
24084
24092
|
this.sensor = new Sensor(options.sensor);
|
|
24085
|
-
this.pdr = new PositioningSystem();
|
|
24093
|
+
this.pdr = new PositioningSystem(options.pdr || {});
|
|
24086
24094
|
}
|
|
24087
24095
|
checkSensor() {
|
|
24088
24096
|
return this.sensor.checkSensor();
|