@wemap/positioning 14.8.0-beta.1 → 14.8.0-beta.2

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,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});
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});
package/dist/index.js CHANGED
@@ -95,20 +95,22 @@ var g = 30, _ = 30 * Math.PI / 180, v = class {
95
95
  wallsRequested = !1;
96
96
  wallCrossed = !1;
97
97
  constructor(e = {}) {
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) => {
98
+ super(), this.backgroundScanEnabled = e.vps?.backgroundScan ?? x;
99
+ let t = c.getConfig()?.arNavigationData?.providers;
100
+ this.degradedLocationStateThreshold = e.vps?.degradedLocationStateThreshold ?? t?.degradedWalkingDistanceMeters ?? S, this.noPositioningLocationStateThreshold = e.vps?.noPositioningLocationStateThreshold ?? t?.noPositioningWalkingDistanceMeters ?? C;
101
+ let n = c.getConfig()?.arNavigationData?.wallCrossing;
102
+ this.wallCrossingEnabled = e.wallCrossing?.enabled ?? n?.enabled ?? !1, this.walls = e.wallCrossing?.walls ?? /* @__PURE__ */ new Map(), this.wallCrossingImpact = e.wallCrossing?.locationImpact ?? (n?.locationImpact === "lost" ? "no_positioning" : "degraded"), this.configureVpsProvider(e.vps), this.configureMapMatching(e, "indoor"), e.usePositionSmoother !== !1 && (this.positionSmoother = new i((e) => {
101
103
  this.mergeAndEmitUpdate({
102
104
  position: e,
103
105
  time: "time" in e ? e.time : Date.now(),
104
106
  accuracy: "accuracy" in e ? e.accuracy : void 0
105
107
  });
106
108
  })), a.ignoreProviders = ["GnssWifi"];
107
- let n = e.vps?.backgroundScanIntervalMs ?? y, r = e.vps?.backgroundScanMaxDurationMs ?? b;
109
+ let r = e.vps?.backgroundScanIntervalMs ?? y, s = e.vps?.backgroundScanMaxDurationMs ?? b;
108
110
  this.backgroundScanner = new o({
109
111
  enabled: this.backgroundScanEnabled,
110
- intervalMs: n,
111
- maxDurationMs: r
112
+ intervalMs: r,
113
+ maxDurationMs: s
112
114
  }, (e) => this.handleBackgroundVpsEvent(e), (e) => {
113
115
  this.emitError(e);
114
116
  }), this._backgroundScanStatus = this.backgroundScanEnabled ? "idle" : "disabled", this.backgroundScanner && (this.backgroundScanStatusUnsubscribe = this.backgroundScanner.onStatusChange((e) => {
@@ -261,7 +263,7 @@ var g = 30, _ = 30 * Math.PI / 180, v = class {
261
263
  return;
262
264
  }
263
265
  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"));
266
+ 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"));
265
267
  }
266
268
  crossedWall(e, t) {
267
269
  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;
@@ -40,9 +40,9 @@ export interface VPSLocationSourceConfig extends LocationSourceOptions {
40
40
  * (default: 120000, `0` to never give up).
41
41
  */
42
42
  maxScanDurationMs?: number;
43
- /** Threshold for degraded location state (default: 50m) */
43
+ /** Threshold for degraded location state (default: snippet `providers.degradedWalkingDistanceMeters`, else 50m) */
44
44
  degradedLocationStateThreshold?: number;
45
- /** Threshold for no positioning location state (default: 100m) */
45
+ /** Threshold for no positioning location state (default: snippet `providers.noPositioningWalkingDistanceMeters`, else 100m) */
46
46
  noPositioningLocationStateThreshold?: number;
47
47
  };
48
48
  /**
@@ -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,EAAoE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAChH,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAe,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IACpE,yCAAyC;IACzC,GAAG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AE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,GAAG,IAAI;IAI5F,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,oBAAoB;IA+CtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAetB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA8BrB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAY9B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACG,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;YAOrB,iBAAiB;IAkD/B;;;;;;;;;OASG;IACH;;OAEG;IACG,QAAQ,CAAC,SAAS,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;YAgBlC,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.1",
3
+ "version": "14.8.0-beta.2",
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.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"
40
+ "@wemap/core": "14.8.0-beta.2",
41
+ "@wemap/geo": "14.8.0-beta.2",
42
+ "@wemap/providers": "14.8.0-beta.2",
43
+ "@wemap/routers": "14.8.0-beta.2",
44
+ "@wemap/utils": "14.8.0-beta.2"
45
45
  }
46
46
  }