@wemap/positioning 14.7.3 → 14.8.0-beta.1
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/cdn/wemap-positioning.umd.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -21
- package/dist/src/location-sources/LocationSource.d.ts +17 -3
- package/dist/src/location-sources/LocationSource.d.ts.map +1 -1
- package/dist/src/location-sources/VPSLocationSource.d.ts +45 -1
- package/dist/src/location-sources/VPSLocationSource.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@wemap/providers"),require("@wemap/core"),require("@wemap/geo")):typeof define==`function`&&define.amd?define([`exports`,`@wemap/providers`,`@wemap/core`,`@wemap/geo`],t):(e=typeof globalThis<`u`?globalThis:e||self,t((e.Wemap=e.Wemap||{},e.Wemap.Positioning={}),e.Wemap.Providers,e.Wemap.Core,e.Wemap.Geo))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=class{currentPose={};updateCallbacks=new Set;errorCallbacks=new Set;isStarted=!1;_locationState=`no_positioning`;locationStateCallbacks=new Set;async dispose(){await this.stop(),this.updateCallbacks.clear(),this.errorCallbacks.clear(),this.locationStateCallbacks.clear()}onUpdate(e){if(this.updateCallbacks.add(e),Object.keys(this.currentPose).length>0)try{e({...this.currentPose})}catch(e){console.error(`Error in ${this.constructor.name} initial callback:`,e)}}offUpdate(e){this.updateCallbacks.delete(e)}onError(e){this.errorCallbacks.add(e)}offError(e){this.errorCallbacks.delete(e)}configureMapMatching(e){e?.maxDistance!==void 0&&(t.MapMatchingHandler.maxDistance=e.maxDistance),e?.maxAngleBearing!==void 0&&(t.MapMatchingHandler.maxAngleBearing=e.maxAngleBearing),e?.maxDistance===void 0&&(t.MapMatchingHandler.maxDistance=30),e?.useOrientationMatching!==void 0&&(t.MapMatchingHandler.useOrientationMatching=e.useOrientationMatching),e?.useStrict!==void 0&&(t.MapMatchingHandler.useStrict=e.useStrict)}mergeAndEmitUpdate(e){e.position!==void 0&&(this.currentPose.position=e.position),e.attitude!==void 0&&(this.currentPose.attitude=e.attitude),e.inclination!==void 0&&(this.currentPose.inclination=e.inclination),e.time!==void 0&&(this.currentPose.time=e.time),e.accuracy!==void 0&&(this.currentPose.accuracy=e.accuracy),this.emitUpdate({...this.currentPose})}emitUpdate(e){this.updateCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`Error in ${this.constructor.name} callback:`,e)}})}emitError(e){this.errorCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`Error in ${this.constructor.name} error callback:`,e)}})}get locationState(){return this._locationState}onLocationStateChange(e){this.locationStateCallbacks.add(e)}offLocationStateChange(e){this.locationStateCallbacks.delete(e)}setLocationState(e){this._locationState!==e&&(this._locationState=e,this.locationStateCallbacks.forEach(t=>{t(e)}))}},a=3e4,o=!0,s=50,c=100,l=class extends i{absolutePositionProviderId=null;absoluteAttitudeProviderId=null;vpsProviderListenerId=null;positionSmoother;_scanStatus=`stopped`;scanPromise=null;scanResolve=null;firstScan=!1;lastPosition=null;lastScanPosition=null;distanceSinceLastScan=0;backgroundScanEnabled;_backgroundScanStatus;scanStatusCallbacks=new Set;backgroundScanStatusCallbacks=new Set;backgroundScanner=null;backgroundScanStatusUnsubscribe=null;lastBackgroundCandidatePosition=null;ACCURACY_BACKGROUND_SCAN_THRESHOLD=15;degradedLocationStateThreshold;noPositioningLocationStateThreshold;constructor(e={}){super(),this.backgroundScanEnabled=e.vps?.backgroundScan??o,this.degradedLocationStateThreshold=e.vps?.degradedLocationStateThreshold??s,this.noPositioningLocationStateThreshold=e.vps?.noPositioningLocationStateThreshold??c,this.configureVpsProvider(e.vps),this.configureMapMatching(e),e.usePositionSmoother!==!1&&(this.positionSmoother=new t.PositionSmoother(e=>{this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})})),t.ProvidersOptions.ignoreProviders=[`GnssWifi`];let n=e.vps?.backgroundScanIntervalMs??a;this.backgroundScanner=new t.VpsBackgroundScanner({enabled:this.backgroundScanEnabled,intervalMs:n},e=>this.handleBackgroundVpsEvent(e),e=>{this.emitError(e)}),this._backgroundScanStatus=this.backgroundScanEnabled?`idle`:`disabled`,this.backgroundScanner&&(this.backgroundScanStatusUnsubscribe=this.backgroundScanner.onStatusChange(e=>{this.setBackgroundScanStatus(e)}))}get scanStatus(){return this._scanStatus}get backgroundScanStatus(){return this._backgroundScanStatus}onScanStatusChange(e){return this.scanStatusCallbacks.add(e),()=>{this.offScanStatusChange(e)}}offScanStatusChange(e){this.scanStatusCallbacks.delete(e)}onBackgroundScanStatusChange(e){return this.backgroundScanStatusCallbacks.add(e),()=>{this.offBackgroundScanStatusChange(e)}}offBackgroundScanStatusChange(e){this.backgroundScanStatusCallbacks.delete(e)}setScanStatus(e){this._scanStatus!==e&&(this._scanStatus=e,this.scanStatusCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`[VPSLocationSource] Error in scanStatus listener`,e)}}))}setBackgroundScanStatus(e){this._backgroundScanStatus!==e&&(this._backgroundScanStatus=e,this.backgroundScanStatusCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`[VPSLocationSource] Error in backgroundScanStatus listener`,e)}}))}configureVpsProvider(e){let r=n.CoreConfig.getConfig()?.arNavigationData?.providers?.vps,i=e?.endpoint??r?.endpoint;if(!i)throw Error(`VPSLocationSource requires an endpoint URL. Provide it in config or ensure CoreConfig is initialized with arNavigationData.providers.vps.endpoint`);let a=new URL(i);a.href+=`geopose`,t.VpsProvider.endpoint=a.toString();let o=e?.minInclinationForRequest??(r?.minInclinationForRequest?r.minInclinationForRequest*Math.PI/180:void 0);o!==void 0&&(t.VpsProvider.minInclinationForRequest=o);let s=e?.waitTimeMinInclinationForRequest??r?.waitTimeMinInclinationForRequest;s!==void 0&&(t.VpsProvider.waitTimeMinInclinationForRequest=s);let c=e?.useCoarsePose??r?.useCoarsePose;c!==void 0&&(t.VpsProvider.useCoarsePose=c),e?.requestCaller!==void 0&&(t.VpsProvider.requestCaller=e.requestCaller)}async start(){this.isStarted||(this.setupListeners(),this.isStarted=!0,this.backgroundScanEnabled?this.backgroundScanner?.schedule():this.setBackgroundScanStatus(`disabled`))}async stop(){this.isStarted&&(this.vpsProviderListenerId!==null&&(t.VpsProvider.removeEventListener(this.vpsProviderListenerId),this.vpsProviderListenerId=null,t.VpsProvider.stop()),this.absolutePositionProviderId!==null&&(t.AbsolutePositionProvider.removeEventListener(this.absolutePositionProviderId),this.absolutePositionProviderId=null),this.absoluteAttitudeProviderId!==null&&(t.AbsoluteAttitudeProvider.removeEventListener(this.absoluteAttitudeProviderId),this.absoluteAttitudeProviderId=null),this.backgroundScanner?.clear(),this.setBackgroundScanStatus(this.backgroundScanEnabled?`idle`:`disabled`),this.isStarted=!1,this.setLocationState(`no_positioning`))}async dispose(){await super.dispose(),this.backgroundScanStatusUnsubscribe?.(),this.backgroundScanStatusUnsubscribe=null,this.backgroundScanner?.clear(),this.scanStatusCallbacks.clear(),this.backgroundScanStatusCallbacks.clear()}async startScan(){return await this.backgroundScanner?.cancelRunningScan(),this.startScanInternal()}async startScanInternal(){if(this.firstScan=!0,this.isStarted||await this.start(),await this.setupListeners(),this.vpsProviderListenerId!==null)return this.scanPromise??Promise.resolve(!1);let e=await t.VpsProvider.getAvailability();if(e instanceof Error)throw e;return this.setScanStatus(`scanning`),this.scanPromise=new Promise(e=>{this.scanResolve=e,this.vpsProviderListenerId=t.VpsProvider.addEventListener(t=>{this.scanResolve=null,this.stopScan(),this.handleVpsEvent(t),this.backgroundScanner?.schedule(),e(!0)},t=>{this.scanResolve=null,this.emitError(t),this.backgroundScanner?.schedule(),e(!1)})}),this.scanPromise}async stopScan(e=!1){e&&this.scanResolve&&(this.scanResolve(!1),this.scanResolve=null),this.vpsProviderListenerId!==null&&(t.VpsProvider.removeEventListener(this.vpsProviderListenerId),this.vpsProviderListenerId=null,t.VpsProvider.stop(),this.setScanStatus(`stopped`))}async setupListeners(){if(!this.absolutePositionProviderId&&this.firstScan&&(await t.AbsolutePositionProvider.getAvailability()instanceof Error||(this.absolutePositionProviderId=t.AbsolutePositionProvider.addEventListener(e=>{this.scanStatus!==`scanning`&&this.handleAbsolutePosition(e)},e=>{this.emitError(e)}))),!this.absoluteAttitudeProviderId&&this.firstScan){let e=await t.AbsoluteAttitudeProvider.getAvailability();e instanceof Error?console.warn(`AbsoluteAttitudeProvider not available:`,e):this.absoluteAttitudeProviderId=t.AbsoluteAttitudeProvider.addEventListener(e=>{this.mergeAndEmitUpdate({attitude:e,time:`time`in e?e.time:Date.now()})},e=>{this.emitError(e)})}}handleAbsolutePosition(e){this.updateDistanceAndLocationState(e),this.positionSmoother?this.positionSmoother.feed(e):this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})}handleVpsEvent(e){let t={};if(e.absolutePosition){this.registerScanSuccess(e.absolutePosition),t.position=e.absolutePosition;let n=`time`in e.absolutePosition?e.absolutePosition.time:Date.now(),r=`accuracy`in e.absolutePosition?e.absolutePosition.accuracy:void 0;t.time=n,r!==void 0&&(t.accuracy=r)}e.absoluteAttitude&&(t.attitude=e.absoluteAttitude),this.mergeAndEmitUpdate(t)}getCurrentAbsolutePosition(){let e=this.currentPose.position;return!e||!(`latitude`in e)||!(`longitude`in e)?null:e}handleBackgroundVpsEvent(e){let t=e.absolutePosition;if(!t){this.backgroundScanner?.schedule();return}let n=this.getCurrentAbsolutePosition();if(!this.lastBackgroundCandidatePosition){if(n&&t.distanceTo(n)<this.ACCURACY_BACKGROUND_SCAN_THRESHOLD){this.handleVpsEvent(e),this.backgroundScanner?.schedule();return}this.lastBackgroundCandidatePosition=t,this.backgroundScanner?.runNow();return}let r=this.lastBackgroundCandidatePosition;this.lastBackgroundCandidatePosition=null;let i=!1;n&&t.distanceTo(n)<this.ACCURACY_BACKGROUND_SCAN_THRESHOLD&&(i=!0),!i&&r&&t.distanceTo(r)<this.ACCURACY_BACKGROUND_SCAN_THRESHOLD&&(i=!0),i&&this.handleVpsEvent(e),this.backgroundScanner?.schedule()}registerScanSuccess(e){this.lastScanPosition=e,this.lastPosition=e,this.distanceSinceLastScan=0,this.setLocationState(`accurate`)}updateDistanceAndLocationState(e){if(this.scanStatus===`scanning`)return;if(!this.lastPosition){this.lastPosition=e;return}let t=this.lastPosition.distanceTo(e);this.lastPosition=e,this.lastScanPosition&&(this.distanceSinceLastScan+=t,this.distanceSinceLastScan>=this.noPositioningLocationStateThreshold?this.setLocationState(`no_positioning`):this.distanceSinceLastScan>=this.degradedLocationStateThreshold?this.setLocationState(`degraded`):this.setLocationState(`accurate`))}},u=class extends i{absolutePositionProviderId=null;absoluteAttitudeProviderId=null;gnssWifiErrorListenerId=null;positionSmoother;config;constructor(e={}){super(),this.config=e,this.configureGnssWifi(e.gnssWifi),this.configureMapMatching(e),e.usePositionSmoother!==!1&&(this.positionSmoother=new t.PositionSmoother(e=>{this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})})),this.gnssWifiErrorListenerId=t.GnssWifiProvider.addEventListener(()=>{},e=>{this.emitError(e)},!1)}configureGnssWifi(e){let r=n.CoreConfig.getConfig()?.arNavigationData?.providers,i=e??r?.gnssWifi;i&&(i.discardPositionsAbove!==void 0&&(t.GnssWifiProvider.discardPositionsAbove=i.discardPositionsAbove),i.enableHighAccuracy!==void 0&&(t.GnssWifiProvider.enableHighAccuracy=i.enableHighAccuracy))}async start(){if(!this.isStarted)try{let e=await t.AbsolutePositionProvider.getAvailability();if(e instanceof Error)throw e;if(this.absolutePositionProviderId=t.AbsolutePositionProvider.addEventListener(e=>{this.setLocationState(`accurate`),this.positionSmoother?this.positionSmoother.feed(e):this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})},e=>{this.emitError(e)}),this.config.enableAttitude!==!1)try{this.startAttitude()}catch(e){console.warn(`Failed to start AbsoluteAttitudeProvider:`,e)}this.isStarted=!0}catch(e){throw this.emitError(e instanceof Error?e:Error(String(e))),e}}async startAttitude(){let e=await t.AbsoluteAttitudeProvider.getAvailability();e instanceof Error?console.warn(`AbsoluteAttitudeProvider not available:`,e):this.absoluteAttitudeProviderId=t.AbsoluteAttitudeProvider.addEventListener(e=>{this.mergeAndEmitUpdate({attitude:e,time:`time`in e?e.time:Date.now()})},e=>{this.emitError(e)})}async stopAttitude(){this.absoluteAttitudeProviderId!==null&&(t.AbsoluteAttitudeProvider.removeEventListener(this.absoluteAttitudeProviderId),this.absoluteAttitudeProviderId=null)}async stop(){this.isStarted&&(this.absolutePositionProviderId!==null&&(t.AbsolutePositionProvider.removeEventListener(this.absolutePositionProviderId),this.absolutePositionProviderId=null),this.absoluteAttitudeProviderId!==null&&(t.AbsoluteAttitudeProvider.removeEventListener(this.absoluteAttitudeProviderId),this.absoluteAttitudeProviderId=null),this.isStarted=!1,this.setLocationState(`no_positioning`))}async dispose(){this.gnssWifiErrorListenerId!==null&&(t.GnssWifiProvider.removeEventListener(this.gnssWifiErrorListenerId),this.gnssWifiErrorListenerId=null),await super.dispose()}},d=class{static itinerary=null;static setItinerary(e){this.itinerary=e,t.MapMatchingHandler.itinerary=e}static getItinerary(){return this.itinerary??null}static clearItinerary(){this.itinerary=null,t.MapMatchingHandler.itinerary=null}};async function f(){if(typeof DeviceMotionEvent<`u`&&`requestPermission`in DeviceMotionEvent&&typeof DeviceMotionEvent.requestPermission==`function`)try{if(await DeviceMotionEvent.requestPermission()!==`granted`)return!1}catch{return!1}return!0}async function p(){return new Promise(e=>{t.GnssWifiProvider.addEventListener(()=>{e(!0)},()=>{e(!1)})})}Object.defineProperty(e,"Coordinates",{enumerable:!0,get:function(){return r.Coordinates}}),e.GnssWifiLocationSource=u,e.LocationSource=i,e.MapMatching=d,Object.defineProperty(e,"UserPosition",{enumerable:!0,get:function(){return r.UserPosition}}),e.VPSLocationSource=l,e.requestLocationPermissions=p,e.requestSensorPermissions=f});
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@wemap/providers"),require("@wemap/core"),require("@wemap/geo")):typeof define==`function`&&define.amd?define([`exports`,`@wemap/providers`,`@wemap/core`,`@wemap/geo`],t):(e=typeof globalThis<`u`?globalThis:e||self,t((e.Wemap=e.Wemap||{},e.Wemap.Positioning={}),e.Wemap.Providers,e.Wemap.Core,e.Wemap.Geo))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=30,a=30*Math.PI/180,o=class{currentPose={};updateCallbacks=new Set;errorCallbacks=new Set;isStarted=!1;_locationState=`no_positioning`;locationStateCallbacks=new Set;async dispose(){await this.stop(),this.updateCallbacks.clear(),this.errorCallbacks.clear(),this.locationStateCallbacks.clear()}onUpdate(e){if(this.updateCallbacks.add(e),Object.keys(this.currentPose).length>0)try{e({...this.currentPose})}catch(e){console.error(`Error in ${this.constructor.name} initial callback:`,e)}}offUpdate(e){this.updateCallbacks.delete(e)}onError(e){this.errorCallbacks.add(e)}offError(e){this.errorCallbacks.delete(e)}configureMapMatching(e,r=`indoor`){let o=n.CoreConfig.getConfig()?.arNavigationData?.[r]?.mapmatching,s=typeof o?.maxAngleBearing==`number`?o.maxAngleBearing*Math.PI/180:void 0;t.MapMatchingHandler.maxDistance=e?.maxDistance??o?.maxDistance??i,t.MapMatchingHandler.maxAngleBearing=e?.maxAngleBearing??s??a,t.MapMatchingHandler.useOrientationMatching=e?.useOrientationMatching??o?.useOrientationMatching??!1,t.MapMatchingHandler.useStrict=e?.useStrict??o?.useStrict??!1}mergeAndEmitUpdate(e){e.position!==void 0&&(this.currentPose.position=e.position),e.attitude!==void 0&&(this.currentPose.attitude=e.attitude),e.inclination!==void 0&&(this.currentPose.inclination=e.inclination),e.time!==void 0&&(this.currentPose.time=e.time),e.accuracy!==void 0&&(this.currentPose.accuracy=e.accuracy),this.emitUpdate({...this.currentPose})}emitUpdate(e){this.updateCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`Error in ${this.constructor.name} callback:`,e)}})}emitError(e){this.errorCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`Error in ${this.constructor.name} error callback:`,e)}})}get locationState(){return this._locationState}onLocationStateChange(e){this.locationStateCallbacks.add(e)}offLocationStateChange(e){this.locationStateCallbacks.delete(e)}setLocationState(e){this._locationState!==e&&(this._locationState=e,this.locationStateCallbacks.forEach(t=>{t(e)}))}},s=3e4,c=30*6e4,l=!0,u=50,d=100,f=class extends o{absolutePositionProviderId=null;absoluteAttitudeProviderId=null;vpsProviderListenerId=null;positionSmoother;_scanStatus=`stopped`;scanPromise=null;scanResolve=null;firstScan=!1;lastPosition=null;lastScanPosition=null;distanceSinceLastScan=0;backgroundScanEnabled;_backgroundScanStatus;scanStatusCallbacks=new Set;backgroundScanStatusCallbacks=new Set;backgroundScanner=null;backgroundScanStatusUnsubscribe=null;lastBackgroundCandidatePosition=null;ACCURACY_BACKGROUND_SCAN_THRESHOLD=15;degradedLocationStateThreshold;noPositioningLocationStateThreshold;wallCrossingEnabled;walls;wallCrossingImpact;wallsRequested=!1;wallCrossed=!1;constructor(e={}){super(),this.backgroundScanEnabled=e.vps?.backgroundScan??l,this.degradedLocationStateThreshold=e.vps?.degradedLocationStateThreshold??u,this.noPositioningLocationStateThreshold=e.vps?.noPositioningLocationStateThreshold??d;let r=n.CoreConfig.getConfig()?.arNavigationData?.wallCrossing;this.wallCrossingEnabled=e.wallCrossing?.enabled??r?.enabled??!1,this.walls=e.wallCrossing?.walls??new Map,this.wallCrossingImpact=e.wallCrossing?.locationImpact??(r?.locationImpact===`lost`?`no_positioning`:`degraded`),this.configureVpsProvider(e.vps),this.configureMapMatching(e,`indoor`),e.usePositionSmoother!==!1&&(this.positionSmoother=new t.PositionSmoother(e=>{this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})})),t.ProvidersOptions.ignoreProviders=[`GnssWifi`];let i=e.vps?.backgroundScanIntervalMs??s,a=e.vps?.backgroundScanMaxDurationMs??c;this.backgroundScanner=new t.VpsBackgroundScanner({enabled:this.backgroundScanEnabled,intervalMs:i,maxDurationMs:a},e=>this.handleBackgroundVpsEvent(e),e=>{this.emitError(e)}),this._backgroundScanStatus=this.backgroundScanEnabled?`idle`:`disabled`,this.backgroundScanner&&(this.backgroundScanStatusUnsubscribe=this.backgroundScanner.onStatusChange(e=>{this.setBackgroundScanStatus(e)}))}get scanStatus(){return this._scanStatus}get backgroundScanStatus(){return this._backgroundScanStatus}onScanStatusChange(e){return this.scanStatusCallbacks.add(e),()=>{this.offScanStatusChange(e)}}offScanStatusChange(e){this.scanStatusCallbacks.delete(e)}onBackgroundScanStatusChange(e){return this.backgroundScanStatusCallbacks.add(e),()=>{this.offBackgroundScanStatusChange(e)}}offBackgroundScanStatusChange(e){this.backgroundScanStatusCallbacks.delete(e)}setScanStatus(e){this._scanStatus!==e&&(this._scanStatus=e,this.scanStatusCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`[VPSLocationSource] Error in scanStatus listener`,e)}}))}setBackgroundScanStatus(e){this._backgroundScanStatus!==e&&(this._backgroundScanStatus=e,this.backgroundScanStatusCallbacks.forEach(t=>{try{t(e)}catch(e){console.error(`[VPSLocationSource] Error in backgroundScanStatus listener`,e)}}))}configureVpsProvider(e){let r=n.CoreConfig.getConfig()?.arNavigationData?.providers?.vps,i=e?.endpoint??r?.endpoint;if(!i)throw Error(`VPSLocationSource requires an endpoint URL. Provide it in config or ensure CoreConfig is initialized with arNavigationData.providers.vps.endpoint`);let a=new URL(i);a.href+=`geopose`,t.VpsProvider.endpoint=a.toString();let o=e?.minInclinationForRequest??(r?.minInclinationForRequest?r.minInclinationForRequest*Math.PI/180:void 0);o!==void 0&&(t.VpsProvider.minInclinationForRequest=o);let s=e?.waitTimeMinInclinationForRequest??r?.waitTimeMinInclinationForRequest;s!==void 0&&(t.VpsProvider.waitTimeMinInclinationForRequest=s);let c=e?.useCoarsePose??r?.useCoarsePose;c!==void 0&&(t.VpsProvider.useCoarsePose=c),e?.maxScanDurationMs!==void 0&&(t.VpsProvider.maxScanDuration=e.maxScanDurationMs),e?.requestCaller!==void 0&&(t.VpsProvider.requestCaller=e.requestCaller)}async start(){this.isStarted||(this.setupListeners(),this.isStarted=!0,this.backgroundScanEnabled?this.backgroundScanner?.schedule():this.setBackgroundScanStatus(`disabled`))}async stop(){this.isStarted&&(this.vpsProviderListenerId!==null&&(t.VpsProvider.removeEventListener(this.vpsProviderListenerId),this.vpsProviderListenerId=null,t.VpsProvider.stop()),this.absolutePositionProviderId!==null&&(t.AbsolutePositionProvider.removeEventListener(this.absolutePositionProviderId),this.absolutePositionProviderId=null),this.absoluteAttitudeProviderId!==null&&(t.AbsoluteAttitudeProvider.removeEventListener(this.absoluteAttitudeProviderId),this.absoluteAttitudeProviderId=null),this.backgroundScanner?.clear(),this.setBackgroundScanStatus(this.backgroundScanEnabled?`idle`:`disabled`),this.isStarted=!1,this.setLocationState(`no_positioning`))}async dispose(){await super.dispose(),this.backgroundScanStatusUnsubscribe?.(),this.backgroundScanStatusUnsubscribe=null,this.backgroundScanner?.clear(),this.scanStatusCallbacks.clear(),this.backgroundScanStatusCallbacks.clear()}async startScan(){return this.backgroundScanner?.resetBudget(),await this.backgroundScanner?.cancelRunningScan(),this.startScanInternal()}async startScanInternal(){if(this.firstScan=!0,this.isStarted||await this.start(),await this.setupListeners(),this.vpsProviderListenerId!==null)return this.scanPromise??Promise.resolve(!1);let e=await t.VpsProvider.getAvailability();if(e instanceof Error)throw e;return this.setScanStatus(`scanning`),this.scanPromise=new Promise(e=>{this.scanResolve=e,this.vpsProviderListenerId=t.VpsProvider.addEventListener(t=>{this.scanResolve=null,this.stopScan(),this.handleVpsEvent(t),this.backgroundScanner?.schedule(),e(!0)},t=>{this.scanResolve=null,this.stopScan(),this.emitError(t),this.backgroundScanner?.schedule(),e(!1)})}),this.scanPromise}async stopScan(e=!1){e&&this.scanResolve&&(this.scanResolve(!1),this.scanResolve=null),this.vpsProviderListenerId!==null&&(t.VpsProvider.removeEventListener(this.vpsProviderListenerId),this.vpsProviderListenerId=null,t.VpsProvider.stop(),this.setScanStatus(`stopped`))}async setupListeners(){if(!this.absolutePositionProviderId&&this.firstScan&&(await t.AbsolutePositionProvider.getAvailability()instanceof Error||(this.absolutePositionProviderId=t.AbsolutePositionProvider.addEventListener(e=>{this.scanStatus!==`scanning`&&this.handleAbsolutePosition(e)},e=>{this.emitError(e)}))),!this.absoluteAttitudeProviderId&&this.firstScan){let e=await t.AbsoluteAttitudeProvider.getAvailability();e instanceof Error?console.warn(`AbsoluteAttitudeProvider not available:`,e):this.absoluteAttitudeProviderId=t.AbsoluteAttitudeProvider.addEventListener(e=>{this.mergeAndEmitUpdate({attitude:e,time:`time`in e?e.time:Date.now()})},e=>{this.emitError(e)})}}handleAbsolutePosition(e){this.updateDistanceAndLocationState(e),this.positionSmoother?this.positionSmoother.feed(e):this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})}handleVpsEvent(e){let t={};if(e.absolutePosition){this.registerScanSuccess(e.absolutePosition),t.position=e.absolutePosition;let n=`time`in e.absolutePosition?e.absolutePosition.time:Date.now(),r=`accuracy`in e.absolutePosition?e.absolutePosition.accuracy:void 0;t.time=n,r!==void 0&&(t.accuracy=r)}e.absoluteAttitude&&(t.attitude=e.absoluteAttitude),this.mergeAndEmitUpdate(t)}getCurrentAbsolutePosition(){let e=this.currentPose.position;return!e||!(`latitude`in e)||!(`longitude`in e)?null:e}handleBackgroundVpsEvent(e){let t=e.absolutePosition;if(!t){this.backgroundScanner?.schedule();return}let n=this.getCurrentAbsolutePosition();if(!this.lastBackgroundCandidatePosition){if(n&&t.distanceTo(n)<this.ACCURACY_BACKGROUND_SCAN_THRESHOLD){this.handleVpsEvent(e),this.backgroundScanner?.schedule();return}this.lastBackgroundCandidatePosition=t,this.backgroundScanner?.runNow();return}let r=this.lastBackgroundCandidatePosition;this.lastBackgroundCandidatePosition=null;let i=!1;n&&t.distanceTo(n)<this.ACCURACY_BACKGROUND_SCAN_THRESHOLD&&(i=!0),!i&&r&&t.distanceTo(r)<this.ACCURACY_BACKGROUND_SCAN_THRESHOLD&&(i=!0),i&&this.handleVpsEvent(e),this.backgroundScanner?.schedule()}registerScanSuccess(e){this.wallCrossingEnabled&&!this.walls.size&&!this.wallsRequested&&(this.wallsRequested=!0,this.loadWalls(e).catch(e=>this.emitError(e))),this.lastScanPosition=e,this.lastPosition=e,this.distanceSinceLastScan=0,this.wallCrossed=!1,this.setLocationState(`accurate`)}updateDistanceAndLocationState(e){if(this.scanStatus===`scanning`)return;if(!this.lastPosition){this.lastPosition=e;return}let t=this.lastPosition,n=t.distanceTo(e);this.lastPosition=e,this.lastScanPosition&&(this.distanceSinceLastScan+=n,!this.wallCrossed&&this.crossedWall(t,e)&&(this.wallCrossed=!0),this.distanceSinceLastScan>=this.noPositioningLocationStateThreshold?this.setLocationState(`no_positioning`):this.wallCrossed?this.setLocationState(this.wallCrossingImpact):this.distanceSinceLastScan>=this.degradedLocationStateThreshold?this.setLocationState(`degraded`):this.setLocationState(`accurate`))}crossedWall(e,t){return!this.wallCrossingEnabled||!this.walls.size?!1:(0,r.findWallCrossing)(e,t,r.Level.equals(e.level,t.level)?this.wallsOf(t.level):[...this.wallsOf(e.level),...this.wallsOf(t.level)])!==null}wallsOf(e){return typeof e==`number`?this.walls.get(e)??[]:[]}async loadWalls(e){let t=(await n.core.createBuildingService().getBuildingsFromBbox(new r.BoundingBox(e,e))).find(e=>e.venue!==null)?.venue;if(t!=null)for(let e of await n.core.createWallService().searchWalls(t)){let t=this.walls.get(e.level)??[];t.push(...(0,r.wallSegments)(e.geometry)),this.walls.set(e.level,t)}}},p=class extends o{absolutePositionProviderId=null;absoluteAttitudeProviderId=null;gnssWifiErrorListenerId=null;positionSmoother;config;constructor(e={}){super(),this.config=e,this.configureGnssWifi(e.gnssWifi),this.configureMapMatching(e,`outdoor`),e.usePositionSmoother!==!1&&(this.positionSmoother=new t.PositionSmoother(e=>{this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})})),this.gnssWifiErrorListenerId=t.GnssWifiProvider.addEventListener(()=>{},e=>{this.emitError(e)},!1)}configureGnssWifi(e){let r=n.CoreConfig.getConfig()?.arNavigationData?.providers,i=e??r?.gnssWifi;i&&(i.discardPositionsAbove!==void 0&&(t.GnssWifiProvider.discardPositionsAbove=i.discardPositionsAbove),i.enableHighAccuracy!==void 0&&(t.GnssWifiProvider.enableHighAccuracy=i.enableHighAccuracy))}async start(){if(!this.isStarted)try{let e=await t.AbsolutePositionProvider.getAvailability();if(e instanceof Error)throw e;if(this.absolutePositionProviderId=t.AbsolutePositionProvider.addEventListener(e=>{this.setLocationState(`accurate`),this.positionSmoother?this.positionSmoother.feed(e):this.mergeAndEmitUpdate({position:e,time:`time`in e?e.time:Date.now(),accuracy:`accuracy`in e?e.accuracy:void 0})},e=>{this.emitError(e)}),this.config.enableAttitude!==!1)try{this.startAttitude()}catch(e){console.warn(`Failed to start AbsoluteAttitudeProvider:`,e)}this.isStarted=!0}catch(e){throw this.emitError(e instanceof Error?e:Error(String(e))),e}}async startAttitude(){let e=await t.AbsoluteAttitudeProvider.getAvailability();e instanceof Error?console.warn(`AbsoluteAttitudeProvider not available:`,e):this.absoluteAttitudeProviderId=t.AbsoluteAttitudeProvider.addEventListener(e=>{this.mergeAndEmitUpdate({attitude:e,time:`time`in e?e.time:Date.now()})},e=>{this.emitError(e)})}async stopAttitude(){this.absoluteAttitudeProviderId!==null&&(t.AbsoluteAttitudeProvider.removeEventListener(this.absoluteAttitudeProviderId),this.absoluteAttitudeProviderId=null)}async stop(){this.isStarted&&(this.absolutePositionProviderId!==null&&(t.AbsolutePositionProvider.removeEventListener(this.absolutePositionProviderId),this.absolutePositionProviderId=null),this.absoluteAttitudeProviderId!==null&&(t.AbsoluteAttitudeProvider.removeEventListener(this.absoluteAttitudeProviderId),this.absoluteAttitudeProviderId=null),this.isStarted=!1,this.setLocationState(`no_positioning`))}async dispose(){this.gnssWifiErrorListenerId!==null&&(t.GnssWifiProvider.removeEventListener(this.gnssWifiErrorListenerId),this.gnssWifiErrorListenerId=null),await super.dispose()}},m=class{static itinerary=null;static setItinerary(e){this.itinerary=e,t.MapMatchingHandler.itinerary=e}static getItinerary(){return this.itinerary??null}static clearItinerary(){this.itinerary=null,t.MapMatchingHandler.itinerary=null}};async function h(){if(typeof DeviceMotionEvent<`u`&&`requestPermission`in DeviceMotionEvent&&typeof DeviceMotionEvent.requestPermission==`function`)try{if(await DeviceMotionEvent.requestPermission()!==`granted`)return!1}catch{return!1}return!0}async function g(){return new Promise(e=>{t.GnssWifiProvider.addEventListener(()=>{e(!0)},()=>{e(!1)})})}Object.defineProperty(e,"Coordinates",{enumerable:!0,get:function(){return r.Coordinates}}),e.GnssWifiLocationSource=p,e.LocationSource=o,e.MapMatching=m,Object.defineProperty(e,"UserPosition",{enumerable:!0,get:function(){return r.UserPosition}}),e.VPSLocationSource=f,e.requestLocationPermissions=g,e.requestSensorPermissions=h});
|
package/dist/index.d.ts
CHANGED
|
@@ -12,5 +12,6 @@ export type { GnssWifiLocationSourceConfig } from './src/location-sources/GnssWi
|
|
|
12
12
|
export { MapMatching } from './src/MapMatching';
|
|
13
13
|
export { requestSensorPermissions, requestLocationPermissions } from './src/utils/permissions';
|
|
14
14
|
export { Coordinates, UserPosition } from '@wemap/geo';
|
|
15
|
-
export type { Pose, PartialPose } from './src/types';
|
|
15
|
+
export type { Pose, PartialPose, LocationState, LocationSourceOptions, MapMatchingOptions } from './src/types';
|
|
16
|
+
export type { ScanStatus, BackgroundScanStatus } from './src/location-sources/VPSLocationSource';
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,YAAY,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,YAAY,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAG/F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGvD,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,YAAY,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,YAAY,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAG/F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGvD,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/G,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AbsoluteAttitudeProvider as e, AbsolutePositionProvider as t, GnssWifiProvider as n, MapMatchingHandler as r, PositionSmoother as i, ProvidersOptions as a, VpsBackgroundScanner as o, VpsProvider as s } from "@wemap/providers";
|
|
2
|
-
import { CoreConfig as c } from "@wemap/core";
|
|
3
|
-
import { Coordinates as
|
|
2
|
+
import { CoreConfig as c, core as l } from "@wemap/core";
|
|
3
|
+
import { BoundingBox as u, Coordinates as d, Level as f, UserPosition as p, findWallCrossing as m, wallSegments as h } from "@wemap/geo";
|
|
4
4
|
//#region src/location-sources/LocationSource.ts
|
|
5
|
-
var
|
|
5
|
+
var g = 30, _ = 30 * Math.PI / 180, v = class {
|
|
6
6
|
currentPose = {};
|
|
7
7
|
updateCallbacks = /* @__PURE__ */ new Set();
|
|
8
8
|
errorCallbacks = /* @__PURE__ */ new Set();
|
|
@@ -28,8 +28,9 @@ var d = class {
|
|
|
28
28
|
offError(e) {
|
|
29
29
|
this.errorCallbacks.delete(e);
|
|
30
30
|
}
|
|
31
|
-
configureMapMatching(e) {
|
|
32
|
-
|
|
31
|
+
configureMapMatching(e, t = "indoor") {
|
|
32
|
+
let n = c.getConfig()?.arNavigationData?.[t]?.mapmatching, i = typeof n?.maxAngleBearing == "number" ? n.maxAngleBearing * Math.PI / 180 : void 0;
|
|
33
|
+
r.maxDistance = e?.maxDistance ?? n?.maxDistance ?? g, r.maxAngleBearing = e?.maxAngleBearing ?? i ?? _, r.useOrientationMatching = e?.useOrientationMatching ?? n?.useOrientationMatching ?? !1, r.useStrict = e?.useStrict ?? n?.useStrict ?? !1;
|
|
33
34
|
}
|
|
34
35
|
mergeAndEmitUpdate(e) {
|
|
35
36
|
e.position !== void 0 && (this.currentPose.position = e.position), e.attitude !== void 0 && (this.currentPose.attitude = e.attitude), e.inclination !== void 0 && (this.currentPose.inclination = e.inclination), e.time !== void 0 && (this.currentPose.time = e.time), e.accuracy !== void 0 && (this.currentPose.accuracy = e.accuracy), this.emitUpdate({ ...this.currentPose });
|
|
@@ -66,7 +67,7 @@ var d = class {
|
|
|
66
67
|
t(e);
|
|
67
68
|
}));
|
|
68
69
|
}
|
|
69
|
-
},
|
|
70
|
+
}, y = 3e4, b = 30 * 6e4, x = !0, S = 50, C = 100, w = class extends v {
|
|
70
71
|
absolutePositionProviderId = null;
|
|
71
72
|
absoluteAttitudeProviderId = null;
|
|
72
73
|
vpsProviderListenerId = null;
|
|
@@ -88,18 +89,26 @@ var d = class {
|
|
|
88
89
|
ACCURACY_BACKGROUND_SCAN_THRESHOLD = 15;
|
|
89
90
|
degradedLocationStateThreshold;
|
|
90
91
|
noPositioningLocationStateThreshold;
|
|
92
|
+
wallCrossingEnabled;
|
|
93
|
+
walls;
|
|
94
|
+
wallCrossingImpact;
|
|
95
|
+
wallsRequested = !1;
|
|
96
|
+
wallCrossed = !1;
|
|
91
97
|
constructor(e = {}) {
|
|
92
|
-
super(), this.backgroundScanEnabled = e.vps?.backgroundScan ??
|
|
98
|
+
super(), this.backgroundScanEnabled = e.vps?.backgroundScan ?? x, this.degradedLocationStateThreshold = e.vps?.degradedLocationStateThreshold ?? S, this.noPositioningLocationStateThreshold = e.vps?.noPositioningLocationStateThreshold ?? C;
|
|
99
|
+
let t = c.getConfig()?.arNavigationData?.wallCrossing;
|
|
100
|
+
this.wallCrossingEnabled = e.wallCrossing?.enabled ?? t?.enabled ?? !1, this.walls = e.wallCrossing?.walls ?? /* @__PURE__ */ new Map(), this.wallCrossingImpact = e.wallCrossing?.locationImpact ?? (t?.locationImpact === "lost" ? "no_positioning" : "degraded"), this.configureVpsProvider(e.vps), this.configureMapMatching(e, "indoor"), e.usePositionSmoother !== !1 && (this.positionSmoother = new i((e) => {
|
|
93
101
|
this.mergeAndEmitUpdate({
|
|
94
102
|
position: e,
|
|
95
103
|
time: "time" in e ? e.time : Date.now(),
|
|
96
104
|
accuracy: "accuracy" in e ? e.accuracy : void 0
|
|
97
105
|
});
|
|
98
106
|
})), a.ignoreProviders = ["GnssWifi"];
|
|
99
|
-
let
|
|
107
|
+
let n = e.vps?.backgroundScanIntervalMs ?? y, r = e.vps?.backgroundScanMaxDurationMs ?? b;
|
|
100
108
|
this.backgroundScanner = new o({
|
|
101
109
|
enabled: this.backgroundScanEnabled,
|
|
102
|
-
intervalMs:
|
|
110
|
+
intervalMs: n,
|
|
111
|
+
maxDurationMs: r
|
|
103
112
|
}, (e) => this.handleBackgroundVpsEvent(e), (e) => {
|
|
104
113
|
this.emitError(e);
|
|
105
114
|
}), this._backgroundScanStatus = this.backgroundScanEnabled ? "idle" : "disabled", this.backgroundScanner && (this.backgroundScanStatusUnsubscribe = this.backgroundScanner.onStatusChange((e) => {
|
|
@@ -156,7 +165,7 @@ var d = class {
|
|
|
156
165
|
let a = e?.waitTimeMinInclinationForRequest ?? t?.waitTimeMinInclinationForRequest;
|
|
157
166
|
a !== void 0 && (s.waitTimeMinInclinationForRequest = a);
|
|
158
167
|
let o = e?.useCoarsePose ?? t?.useCoarsePose;
|
|
159
|
-
o !== void 0 && (s.useCoarsePose = o), e?.requestCaller !== void 0 && (s.requestCaller = e.requestCaller);
|
|
168
|
+
o !== void 0 && (s.useCoarsePose = o), e?.maxScanDurationMs !== void 0 && (s.maxScanDuration = e.maxScanDurationMs), e?.requestCaller !== void 0 && (s.requestCaller = e.requestCaller);
|
|
160
169
|
}
|
|
161
170
|
async start() {
|
|
162
171
|
this.isStarted || (this.setupListeners(), this.isStarted = !0, this.backgroundScanEnabled ? this.backgroundScanner?.schedule() : this.setBackgroundScanStatus("disabled"));
|
|
@@ -168,7 +177,7 @@ var d = class {
|
|
|
168
177
|
await super.dispose(), this.backgroundScanStatusUnsubscribe?.(), this.backgroundScanStatusUnsubscribe = null, this.backgroundScanner?.clear(), this.scanStatusCallbacks.clear(), this.backgroundScanStatusCallbacks.clear();
|
|
169
178
|
}
|
|
170
179
|
async startScan() {
|
|
171
|
-
return await this.backgroundScanner?.cancelRunningScan(), this.startScanInternal();
|
|
180
|
+
return this.backgroundScanner?.resetBudget(), await this.backgroundScanner?.cancelRunningScan(), this.startScanInternal();
|
|
172
181
|
}
|
|
173
182
|
async startScanInternal() {
|
|
174
183
|
if (this.firstScan = !0, this.isStarted || await this.start(), await this.setupListeners(), this.vpsProviderListenerId !== null) return this.scanPromise ?? Promise.resolve(!1);
|
|
@@ -178,7 +187,7 @@ var d = class {
|
|
|
178
187
|
this.scanResolve = e, this.vpsProviderListenerId = s.addEventListener((t) => {
|
|
179
188
|
this.scanResolve = null, this.stopScan(), this.handleVpsEvent(t), this.backgroundScanner?.schedule(), e(!0);
|
|
180
189
|
}, (t) => {
|
|
181
|
-
this.scanResolve = null, this.emitError(t), this.backgroundScanner?.schedule(), e(!1);
|
|
190
|
+
this.scanResolve = null, this.stopScan(), this.emitError(t), this.backgroundScanner?.schedule(), e(!1);
|
|
182
191
|
});
|
|
183
192
|
}), this.scanPromise;
|
|
184
193
|
}
|
|
@@ -243,7 +252,7 @@ var d = class {
|
|
|
243
252
|
n && t.distanceTo(n) < this.ACCURACY_BACKGROUND_SCAN_THRESHOLD && (i = !0), !i && r && t.distanceTo(r) < this.ACCURACY_BACKGROUND_SCAN_THRESHOLD && (i = !0), i && this.handleVpsEvent(e), this.backgroundScanner?.schedule();
|
|
244
253
|
}
|
|
245
254
|
registerScanSuccess(e) {
|
|
246
|
-
this.lastScanPosition = e, this.lastPosition = e, this.distanceSinceLastScan = 0, this.setLocationState("accurate");
|
|
255
|
+
this.wallCrossingEnabled && !this.walls.size && !this.wallsRequested && (this.wallsRequested = !0, this.loadWalls(e).catch((e) => this.emitError(e))), this.lastScanPosition = e, this.lastPosition = e, this.distanceSinceLastScan = 0, this.wallCrossed = !1, this.setLocationState("accurate");
|
|
247
256
|
}
|
|
248
257
|
updateDistanceAndLocationState(e) {
|
|
249
258
|
if (this.scanStatus === "scanning") return;
|
|
@@ -251,17 +260,30 @@ var d = class {
|
|
|
251
260
|
this.lastPosition = e;
|
|
252
261
|
return;
|
|
253
262
|
}
|
|
254
|
-
let t = this.lastPosition.distanceTo(e);
|
|
255
|
-
this.lastPosition = e, this.lastScanPosition && (this.distanceSinceLastScan += t, this.distanceSinceLastScan >= this.noPositioningLocationStateThreshold ? this.setLocationState("no_positioning") : this.distanceSinceLastScan >= this.degradedLocationStateThreshold ? this.setLocationState("degraded") : this.setLocationState("accurate"));
|
|
263
|
+
let t = this.lastPosition, n = t.distanceTo(e);
|
|
264
|
+
this.lastPosition = e, this.lastScanPosition && (this.distanceSinceLastScan += n, !this.wallCrossed && this.crossedWall(t, e) && (this.wallCrossed = !0), this.distanceSinceLastScan >= this.noPositioningLocationStateThreshold ? this.setLocationState("no_positioning") : this.wallCrossed ? this.setLocationState(this.wallCrossingImpact) : this.distanceSinceLastScan >= this.degradedLocationStateThreshold ? this.setLocationState("degraded") : this.setLocationState("accurate"));
|
|
256
265
|
}
|
|
257
|
-
|
|
266
|
+
crossedWall(e, t) {
|
|
267
|
+
return !this.wallCrossingEnabled || !this.walls.size ? !1 : m(e, t, f.equals(e.level, t.level) ? this.wallsOf(t.level) : [...this.wallsOf(e.level), ...this.wallsOf(t.level)]) !== null;
|
|
268
|
+
}
|
|
269
|
+
wallsOf(e) {
|
|
270
|
+
return typeof e == "number" ? this.walls.get(e) ?? [] : [];
|
|
271
|
+
}
|
|
272
|
+
async loadWalls(e) {
|
|
273
|
+
let t = (await l.createBuildingService().getBuildingsFromBbox(new u(e, e))).find((e) => e.venue !== null)?.venue;
|
|
274
|
+
if (t != null) for (let e of await l.createWallService().searchWalls(t)) {
|
|
275
|
+
let t = this.walls.get(e.level) ?? [];
|
|
276
|
+
t.push(...h(e.geometry)), this.walls.set(e.level, t);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}, T = class extends v {
|
|
258
280
|
absolutePositionProviderId = null;
|
|
259
281
|
absoluteAttitudeProviderId = null;
|
|
260
282
|
gnssWifiErrorListenerId = null;
|
|
261
283
|
positionSmoother;
|
|
262
284
|
config;
|
|
263
285
|
constructor(e = {}) {
|
|
264
|
-
super(), this.config = e, this.configureGnssWifi(e.gnssWifi), this.configureMapMatching(e), e.usePositionSmoother !== !1 && (this.positionSmoother = new i((e) => {
|
|
286
|
+
super(), this.config = e, this.configureGnssWifi(e.gnssWifi), this.configureMapMatching(e, "outdoor"), e.usePositionSmoother !== !1 && (this.positionSmoother = new i((e) => {
|
|
265
287
|
this.mergeAndEmitUpdate({
|
|
266
288
|
position: e,
|
|
267
289
|
time: "time" in e ? e.time : Date.now(),
|
|
@@ -317,7 +339,7 @@ var d = class {
|
|
|
317
339
|
async dispose() {
|
|
318
340
|
this.gnssWifiErrorListenerId !== null && (n.removeEventListener(this.gnssWifiErrorListenerId), this.gnssWifiErrorListenerId = null), await super.dispose();
|
|
319
341
|
}
|
|
320
|
-
},
|
|
342
|
+
}, E = class {
|
|
321
343
|
static itinerary = null;
|
|
322
344
|
static setItinerary(e) {
|
|
323
345
|
this.itinerary = e, r.itinerary = e;
|
|
@@ -331,7 +353,7 @@ var d = class {
|
|
|
331
353
|
};
|
|
332
354
|
//#endregion
|
|
333
355
|
//#region src/utils/permissions.ts
|
|
334
|
-
async function
|
|
356
|
+
async function D() {
|
|
335
357
|
if (typeof DeviceMotionEvent < "u" && "requestPermission" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission == "function") try {
|
|
336
358
|
if (await DeviceMotionEvent.requestPermission() !== "granted") return !1;
|
|
337
359
|
} catch {
|
|
@@ -339,7 +361,7 @@ async function y() {
|
|
|
339
361
|
}
|
|
340
362
|
return !0;
|
|
341
363
|
}
|
|
342
|
-
async function
|
|
364
|
+
async function O() {
|
|
343
365
|
return new Promise((e) => {
|
|
344
366
|
n.addEventListener(() => {
|
|
345
367
|
e(!0);
|
|
@@ -349,4 +371,4 @@ async function b() {
|
|
|
349
371
|
});
|
|
350
372
|
}
|
|
351
373
|
//#endregion
|
|
352
|
-
export {
|
|
374
|
+
export { d as Coordinates, T as GnssWifiLocationSource, v as LocationSource, E as MapMatching, p as UserPosition, w as VPSLocationSource, O as requestLocationPermissions, D as requestSensorPermissions };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ILocationSource } from '../ILocationSource';
|
|
2
2
|
import { PartialPose, Pose, MapMatchingOptions, LocationState } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Which `arnavigationdata` section of the livemap snippet holds the map matching
|
|
5
|
+
* defaults for a source: VPS is an indoor sensor, GNSS/WiFi an outdoor one.
|
|
6
|
+
*/
|
|
7
|
+
export type MapMatchingProfile = 'indoor' | 'outdoor';
|
|
3
8
|
/**
|
|
4
9
|
* Base class for all location sources
|
|
5
10
|
*
|
|
@@ -92,11 +97,20 @@ export declare abstract class LocationSource implements ILocationSource {
|
|
|
92
97
|
*/
|
|
93
98
|
offError(callback: (error: Error) => void): void;
|
|
94
99
|
/**
|
|
95
|
-
* Configure map matching parameters
|
|
100
|
+
* Configure map matching parameters.
|
|
101
|
+
*
|
|
102
|
+
* Values come from the livemap snippet (`arnavigationdata.<profile>.mapmatching`)
|
|
103
|
+
* so a venue can tune matching without touching integration code; anything
|
|
104
|
+
* passed in `options` wins over the snippet.
|
|
105
|
+
*
|
|
106
|
+
* `MapMatchingHandler` is a singleton shared by every source, so each value is
|
|
107
|
+
* assigned unconditionally — leaving one out would silently keep whatever the
|
|
108
|
+
* previously created source put there.
|
|
96
109
|
*
|
|
97
|
-
* @param options - Map matching
|
|
110
|
+
* @param options - Map matching overrides from the integrator
|
|
111
|
+
* @param profile - Snippet section to read the defaults from
|
|
98
112
|
*/
|
|
99
|
-
protected configureMapMatching(options?: MapMatchingOptions): void;
|
|
113
|
+
protected configureMapMatching(options?: MapMatchingOptions, profile?: MapMatchingProfile): void;
|
|
100
114
|
/**
|
|
101
115
|
* Merge partial pose update into current pose and emit the complete pose
|
|
102
116
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationSource.d.ts","sourceRoot":"","sources":["../../../src/location-sources/LocationSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"LocationSource.d.ts","sourceRoot":"","sources":["../../../src/location-sources/LocationSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAErF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAMtD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,8BAAsB,cAAe,YAAW,eAAe;IAC7D,SAAS,CAAC,WAAW,EAAE,IAAI,CAAM;IACjC,SAAS,CAAC,eAAe,aAAkB,WAAW,KAAK,IAAI,EAAI;IACnE,SAAS,CAAC,cAAc,cAAmB,KAAK,KAAK,IAAI,EAAI;IACtD,SAAS,UAAS;IAEzB,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,sBAAsB,CAA8C;IAE5E;;OAEG;IACH,QAAQ,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B;;;;;;;;;;;;;OAaG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,IAAI;IAa9C;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,IAAI;IAI/C;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI;IAI/C;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI;IAIhD;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,kBAAkB,EAAE,OAAO,GAAE,kBAA6B,GAAG,IAAI;IAkB1G;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAsB5D;;;;OAIG;IACH,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAU7C;;;;OAIG;IACH,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAUvC;;;;OAIG;IACH,IAAI,aAAa,IAAI,aAAa,CAEjC;IAEM,qBAAqB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,IAAI;IAItE,sBAAsB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,IAAI;IAI9E,SAAS,CAAC,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;CAS/D"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VpsBackgroundScanStatus } from '@wemap/providers';
|
|
2
|
-
import {
|
|
2
|
+
import { WallSegment } from '@wemap/geo';
|
|
3
|
+
import { LocationSourceOptions, LocationState } from '../types';
|
|
3
4
|
import { LocationSource } from './LocationSource';
|
|
4
5
|
/**
|
|
5
6
|
* Configuration options for VPSLocationSource
|
|
@@ -26,11 +27,42 @@ export interface VPSLocationSourceConfig extends LocationSourceOptions {
|
|
|
26
27
|
backgroundScan?: boolean;
|
|
27
28
|
/** Interval in ms before triggering a background scan when no scan was triggered (default: 30000) */
|
|
28
29
|
backgroundScanIntervalMs?: number;
|
|
30
|
+
/**
|
|
31
|
+
* How long background scanning keeps running on its own before it stops and
|
|
32
|
+
* waits for the user to scan again (default: 30 minutes, `0` to never stop).
|
|
33
|
+
*
|
|
34
|
+
* Without it a page left open keeps scanning — and requesting — for as long
|
|
35
|
+
* as the tab lives. A manual {@link VPSLocationSource.startScan} re-arms it.
|
|
36
|
+
*/
|
|
37
|
+
backgroundScanMaxDurationMs?: number;
|
|
38
|
+
/**
|
|
39
|
+
* How long a single scan may keep requesting before giving up, in ms
|
|
40
|
+
* (default: 120000, `0` to never give up).
|
|
41
|
+
*/
|
|
42
|
+
maxScanDurationMs?: number;
|
|
29
43
|
/** Threshold for degraded location state (default: 50m) */
|
|
30
44
|
degradedLocationStateThreshold?: number;
|
|
31
45
|
/** Threshold for no positioning location state (default: 100m) */
|
|
32
46
|
noPositioningLocationStateThreshold?: number;
|
|
33
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* How walking through a wall affects the location state. Left out, walls are never
|
|
50
|
+
* tested and none are fetched.
|
|
51
|
+
*/
|
|
52
|
+
wallCrossing?: {
|
|
53
|
+
/** Whether to test walks against walls (if not provided, will use CoreConfig). */
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Walls to test the walk against, per level. Left empty, the walls of the venue the
|
|
57
|
+
* first fix lands in are fetched from the API instead.
|
|
58
|
+
*/
|
|
59
|
+
walls?: Map<number, WallSegment[]>;
|
|
60
|
+
/**
|
|
61
|
+
* State a crossing settles on until the next successful scan (if not provided, will
|
|
62
|
+
* use CoreConfig, which defaults to `degraded`).
|
|
63
|
+
*/
|
|
64
|
+
locationImpact?: Extract<LocationState, 'degraded' | 'no_positioning'>;
|
|
65
|
+
};
|
|
34
66
|
}
|
|
35
67
|
export type ScanStatus = 'scanning' | 'stopped';
|
|
36
68
|
export type BackgroundScanStatus = VpsBackgroundScanStatus;
|
|
@@ -56,6 +88,11 @@ export declare class VPSLocationSource extends LocationSource {
|
|
|
56
88
|
private readonly ACCURACY_BACKGROUND_SCAN_THRESHOLD;
|
|
57
89
|
private degradedLocationStateThreshold;
|
|
58
90
|
private noPositioningLocationStateThreshold;
|
|
91
|
+
private readonly wallCrossingEnabled;
|
|
92
|
+
private readonly walls;
|
|
93
|
+
private readonly wallCrossingImpact;
|
|
94
|
+
private wallsRequested;
|
|
95
|
+
private wallCrossed;
|
|
59
96
|
constructor(config?: VPSLocationSourceConfig);
|
|
60
97
|
/**
|
|
61
98
|
* Current scan status (manual or background).
|
|
@@ -142,5 +179,12 @@ export declare class VPSLocationSource extends LocationSource {
|
|
|
142
179
|
private handleBackgroundVpsEvent;
|
|
143
180
|
private registerScanSuccess;
|
|
144
181
|
private updateDistanceAndLocationState;
|
|
182
|
+
private crossedWall;
|
|
183
|
+
private wallsOf;
|
|
184
|
+
/**
|
|
185
|
+
* Fill {@link walls} with those of the venue the first fix landed in. Called once, off
|
|
186
|
+
* the position path: until it resolves, crossings simply are not detected.
|
|
187
|
+
*/
|
|
188
|
+
private loadWalls;
|
|
145
189
|
}
|
|
146
190
|
//# sourceMappingURL=VPSLocationSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VPSLocationSource.d.ts","sourceRoot":"","sources":["../../../src/location-sources/VPSLocationSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAe,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"VPSLocationSource.d.ts","sourceRoot":"","sources":["../../../src/location-sources/VPSLocationSource.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wemap/positioning",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.8.0-beta.1",
|
|
4
4
|
"description": "Indoor/outdoor positioning for the Wemap SDK.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Wemap SAS",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@wemap/core": "14.
|
|
41
|
-
"@wemap/geo": "14.
|
|
42
|
-
"@wemap/providers": "14.
|
|
43
|
-
"@wemap/routers": "14.
|
|
44
|
-
"@wemap/utils": "14.
|
|
40
|
+
"@wemap/core": "14.8.0-beta.1",
|
|
41
|
+
"@wemap/geo": "14.8.0-beta.1",
|
|
42
|
+
"@wemap/providers": "14.8.0-beta.1",
|
|
43
|
+
"@wemap/routers": "14.8.0-beta.1",
|
|
44
|
+
"@wemap/utils": "14.8.0-beta.1"
|
|
45
45
|
}
|
|
46
46
|
}
|