VpsARCoreLocationSource

class VpsARCoreLocationSource : LocationSource, CameraCaptureProvider, ConveyingDetector, AttitudeSource, NavigationManagerInterceptor

A LocationSource providing indoor positioning based on Wemap's VPS (Visual Positioning System) and ARCore.

This is the @MainThread public facade. It owns the ARCore binding + GL frame plumbing and the VpsBrain thread, and delegates all positioning orchestration to a brain-confined VpsEngine (the Android counterpart of iOS's VPSEngine), re-exposing the engine's result flows. See § VPS brain — single-thread confinement.

Constructors

Link copied to clipboard
constructor(context: Context, session: CoreSession, vpsConfig: VpsConfig = VpsConfig())

Creates a VPS location source bound to the given session.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Describes why VPS positioning is currently degraded.

Link copied to clipboard

The reason why the system is not currently positioning the user.

Link copied to clipboard

Describes whether a VPS scan is currently in progress.

Link copied to clipboard
sealed class State

Describes the current quality of the VPS positioning.

Properties

Link copied to clipboard
open override val attitudes: Flow<Attitude>
Link copied to clipboard

The current background scan status.

Link copied to clipboard

Emits the background scan status whenever it changes.

Link copied to clipboard

Emits the ARCore camera tracking state each time it changes.

Link copied to clipboard
open override val coordinates: Flow<Coordinate>
Link copied to clipboard
open override val errors: Flow<Throwable>
Link copied to clipboard
open override var isStarted: Boolean
Link copied to clipboard

The navigation itinerary used by the location source.

Link copied to clipboard

The current foreground scan status.

Link copied to clipboard

Emits the foreground scan status whenever it changes.

Link copied to clipboard

The current positioning state.

Link copied to clipboard

Emits the positioning State whenever it changes (including its reason).

Link copied to clipboard
open override val supportsAttitude: Boolean = true
Link copied to clipboard

Emits a UserLocalizationUpdate each time the source successfully localizes the user.

Functions

Link copied to clipboard
open override fun bind(context: Context, surfaceView: SurfaceView)

Binds the camera preview to this location source.

Link copied to clipboard
open override fun deinit()
Link copied to clipboard
suspend fun distanceToVpsCoverageFrom(coordinate: Coordinate): Double

Calculates the distance to the nearest point of VPS coverage from the provided coordinate.

Link copied to clipboard
fun forceUpdatePosition(coordinate: Coordinate, attitude: Attitude? = null): Boolean

Forces a manual update of the geo-reference used by the pose estimator.

Link copied to clipboard
suspend fun isVpsAvailableAt(coordinate: Coordinate): Boolean

Checks if the provided coordinate is inside the VPS-covered area.

Link copied to clipboard
@RequiresPermission(value = "android.permission.CAMERA")
open override fun start()
Link copied to clipboard
fun startScan()

Starts a foreground VPS scan of the environment.

Link copied to clipboard
open override fun stop()
Link copied to clipboard
fun stopScan()

Stops the ongoing foreground VPS scan.

Link copied to clipboard
open override fun unbind()