@wemap/positioning 14.8.0-beta.2 → 14.8.0-beta.3
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.
|
@@ -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=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;let r=n.CoreConfig.getConfig()?.arNavigationData?.providers;this.degradedLocationStateThreshold=e.vps?.degradedLocationStateThreshold??r?.degradedWalkingDistanceMeters??u,this.noPositioningLocationStateThreshold=e.vps?.noPositioningLocationStateThreshold??r?.noPositioningWalkingDistanceMeters??d;let i=n.CoreConfig.getConfig()?.arNavigationData?.wallCrossing;this.wallCrossingEnabled=e.wallCrossing?.enabled??i?.enabled??!1,this.walls=e.wallCrossing?.walls??new Map,this.wallCrossingImpact=e.wallCrossing?.locationImpact??(i?.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 a=e.vps?.backgroundScanIntervalMs??s,o=e.vps?.backgroundScanMaxDurationMs??c;this.backgroundScanner=new t.VpsBackgroundScanner({enabled:this.backgroundScanEnabled,intervalMs:a,maxDurationMs:o},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=Math.max(this.distanceSinceLastScan,this.degradedLocationStateThreshold)),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});
|
|
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;vpsScanTimeoutListenerId=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;let r=n.CoreConfig.getConfig()?.arNavigationData?.providers;this.degradedLocationStateThreshold=e.vps?.degradedLocationStateThreshold??r?.degradedWalkingDistanceMeters??u,this.noPositioningLocationStateThreshold=e.vps?.noPositioningLocationStateThreshold??r?.noPositioningWalkingDistanceMeters??d;let i=n.CoreConfig.getConfig()?.arNavigationData?.wallCrossing;this.wallCrossingEnabled=e.wallCrossing?.enabled??i?.enabled??!1,this.walls=e.wallCrossing?.walls??new Map,this.wallCrossingImpact=e.wallCrossing?.locationImpact??(i?.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 a=e.vps?.backgroundScanIntervalMs??s,o=e.vps?.backgroundScanMaxDurationMs??c;this.backgroundScanner=new t.VpsBackgroundScanner({enabled:this.backgroundScanEnabled,intervalMs:a,maxDurationMs:o},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.vpsScanTimeoutListenerId!==null&&(t.VpsProvider.removeScanTimeoutListener(this.vpsScanTimeoutListenerId),this.vpsScanTimeoutListenerId=null),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;let n=t=>{this.scanResolve=null,this.stopScan(),this.emitError(t),this.backgroundScanner?.schedule(),e(!1)};this.vpsScanTimeoutListenerId=t.VpsProvider.addScanTimeoutListener(n),this.vpsProviderListenerId=t.VpsProvider.addEventListener(t=>{this.scanResolve=null,this.stopScan(),this.handleVpsEvent(t),this.backgroundScanner?.schedule(),e(!0)},n)}),this.scanPromise}async stopScan(e=!1){e&&this.scanResolve&&(this.scanResolve(!1),this.scanResolve=null),this.vpsScanTimeoutListenerId!==null&&(t.VpsProvider.removeScanTimeoutListener(this.vpsScanTimeoutListenerId),this.vpsScanTimeoutListenerId=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=Math.max(this.distanceSinceLastScan,this.degradedLocationStateThreshold)),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.js
CHANGED
|
@@ -71,6 +71,7 @@ var g = 30, _ = 30 * Math.PI / 180, v = class {
|
|
|
71
71
|
absolutePositionProviderId = null;
|
|
72
72
|
absoluteAttitudeProviderId = null;
|
|
73
73
|
vpsProviderListenerId = null;
|
|
74
|
+
vpsScanTimeoutListenerId = null;
|
|
74
75
|
positionSmoother;
|
|
75
76
|
_scanStatus = "stopped";
|
|
76
77
|
scanPromise = null;
|
|
@@ -173,7 +174,7 @@ var g = 30, _ = 30 * Math.PI / 180, v = class {
|
|
|
173
174
|
this.isStarted || (this.setupListeners(), this.isStarted = !0, this.backgroundScanEnabled ? this.backgroundScanner?.schedule() : this.setBackgroundScanStatus("disabled"));
|
|
174
175
|
}
|
|
175
176
|
async stop() {
|
|
176
|
-
this.isStarted && (this.vpsProviderListenerId !== null && (s.removeEventListener(this.vpsProviderListenerId), this.vpsProviderListenerId = null, s.stop()), this.absolutePositionProviderId !== null && (t.removeEventListener(this.absolutePositionProviderId), this.absolutePositionProviderId = null), this.absoluteAttitudeProviderId !== null && (e.removeEventListener(this.absoluteAttitudeProviderId), this.absoluteAttitudeProviderId = null), this.backgroundScanner?.clear(), this.setBackgroundScanStatus(this.backgroundScanEnabled ? "idle" : "disabled"), this.isStarted = !1, this.setLocationState("no_positioning"));
|
|
177
|
+
this.isStarted && (this.vpsProviderListenerId !== null && (s.removeEventListener(this.vpsProviderListenerId), this.vpsProviderListenerId = null, s.stop()), this.vpsScanTimeoutListenerId !== null && (s.removeScanTimeoutListener(this.vpsScanTimeoutListenerId), this.vpsScanTimeoutListenerId = null), this.absolutePositionProviderId !== null && (t.removeEventListener(this.absolutePositionProviderId), this.absolutePositionProviderId = null), this.absoluteAttitudeProviderId !== null && (e.removeEventListener(this.absoluteAttitudeProviderId), this.absoluteAttitudeProviderId = null), this.backgroundScanner?.clear(), this.setBackgroundScanStatus(this.backgroundScanEnabled ? "idle" : "disabled"), this.isStarted = !1, this.setLocationState("no_positioning"));
|
|
177
178
|
}
|
|
178
179
|
async dispose() {
|
|
179
180
|
await super.dispose(), this.backgroundScanStatusUnsubscribe?.(), this.backgroundScanStatusUnsubscribe = null, this.backgroundScanner?.clear(), this.scanStatusCallbacks.clear(), this.backgroundScanStatusCallbacks.clear();
|
|
@@ -186,15 +187,17 @@ var g = 30, _ = 30 * Math.PI / 180, v = class {
|
|
|
186
187
|
let e = await s.getAvailability();
|
|
187
188
|
if (e instanceof Error) throw e;
|
|
188
189
|
return this.setScanStatus("scanning"), this.scanPromise = new Promise((e) => {
|
|
189
|
-
this.scanResolve = e
|
|
190
|
-
|
|
191
|
-
}, (t) => {
|
|
190
|
+
this.scanResolve = e;
|
|
191
|
+
let t = (t) => {
|
|
192
192
|
this.scanResolve = null, this.stopScan(), this.emitError(t), this.backgroundScanner?.schedule(), e(!1);
|
|
193
|
-
}
|
|
193
|
+
};
|
|
194
|
+
this.vpsScanTimeoutListenerId = s.addScanTimeoutListener(t), this.vpsProviderListenerId = s.addEventListener((t) => {
|
|
195
|
+
this.scanResolve = null, this.stopScan(), this.handleVpsEvent(t), this.backgroundScanner?.schedule(), e(!0);
|
|
196
|
+
}, t);
|
|
194
197
|
}), this.scanPromise;
|
|
195
198
|
}
|
|
196
199
|
async stopScan(e = !1) {
|
|
197
|
-
e && this.scanResolve && (this.scanResolve(!1), this.scanResolve = null), this.vpsProviderListenerId !== null && (s.removeEventListener(this.vpsProviderListenerId), this.vpsProviderListenerId = null, s.stop(), this.setScanStatus("stopped"));
|
|
200
|
+
e && this.scanResolve && (this.scanResolve(!1), this.scanResolve = null), this.vpsScanTimeoutListenerId !== null && (s.removeScanTimeoutListener(this.vpsScanTimeoutListenerId), this.vpsScanTimeoutListenerId = null), this.vpsProviderListenerId !== null && (s.removeEventListener(this.vpsProviderListenerId), this.vpsProviderListenerId = null, s.stop(), this.setScanStatus("stopped"));
|
|
198
201
|
}
|
|
199
202
|
async setupListeners() {
|
|
200
203
|
if (!this.absolutePositionProviderId && this.firstScan && (await t.getAvailability() instanceof Error || (this.absolutePositionProviderId = t.addEventListener((e) => {
|
|
@@ -70,6 +70,7 @@ export declare class VPSLocationSource extends LocationSource {
|
|
|
70
70
|
private absolutePositionProviderId;
|
|
71
71
|
private absoluteAttitudeProviderId;
|
|
72
72
|
private vpsProviderListenerId;
|
|
73
|
+
private vpsScanTimeoutListenerId;
|
|
73
74
|
private positionSmoother?;
|
|
74
75
|
private _scanStatus;
|
|
75
76
|
private scanPromise;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VPSLocationSource.d.ts","sourceRoot":"","sources":["../../../src/location-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;IA+CtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAetB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAkCrB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAY9B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACG,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;YAOrB,iBAAiB;IAoD/B;;;;;;;;;OASG;IACH;;OAEG;IACG,QAAQ,CAAC,SAAS,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;YAqBlC,cAAc;IAwC5B,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,0BAA0B;IAQlC;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;IAuDhC,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,8BAA8B;IAuCtC,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,OAAO;IAIf;;;OAGG;YACW,SAAS;CAexB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wemap/positioning",
|
|
3
|
-
"version": "14.8.0-beta.
|
|
3
|
+
"version": "14.8.0-beta.3",
|
|
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.8.0-beta.
|
|
41
|
-
"@wemap/geo": "14.8.0-beta.
|
|
42
|
-
"@wemap/providers": "14.8.0-beta.
|
|
43
|
-
"@wemap/routers": "14.8.0-beta.
|
|
44
|
-
"@wemap/utils": "14.8.0-beta.
|
|
40
|
+
"@wemap/core": "14.8.0-beta.3",
|
|
41
|
+
"@wemap/geo": "14.8.0-beta.3",
|
|
42
|
+
"@wemap/providers": "14.8.0-beta.3",
|
|
43
|
+
"@wemap/routers": "14.8.0-beta.3",
|
|
44
|
+
"@wemap/utils": "14.8.0-beta.3"
|
|
45
45
|
}
|
|
46
46
|
}
|