AR + GPS Location  3.0.0
All Classes Namespaces Functions Variables Properties Events Pages
ARLocation.AbstractLocationProvider Class Referenceabstract

Abstract location provider. All concrete location provider implementations should derive from this. More...

Inheritance diagram for ARLocation.AbstractLocationProvider:
ARLocation.ILocationProvider ARLocation.MockLocationProvider ARLocation.UnityLocationProvider

Public Member Functions

virtual IEnumerator Start (uint maxWaitTime=10000, uint delay=0)
 
void ForceLocationUpdate ()
 
virtual void Update ()
 
void Restart ()
 
void ResetStartPoint ()
 
void SetCompassLowPassFactor (double factor)
 
string GetStatusString ()
 
string GetInfoString ()
 
void OnEnabled (LocationEnabledDelegate del)
 
void OnFail (LocationFailedDelegate del)
 
void Pause ()
 Pauses location updates More...
 
void Resume ()
 Resumes location updates More...
 

Public Attributes

bool HasStarted => Status == LocationProviderStatus.Started
 

Protected Member Functions

abstract ? LocationReading ReadLocation ()
 Reads the location from the device; should be implemented by each provider. More...
 
abstract ? HeadingReading ReadHeading ()
 Reads the heading from the device; should be implemented by each provider. More...
 
abstract void RequestLocationAndCompassUpdates ()
 Requests the location and compass updates from the device; should be implemented by each provider. More...
 
abstract void UpdateLocationRequestStatus ()
 Updates the location service status from the device; should be implemented by each provider. More...
 
virtual void InnerOnEnabled ()
 
void EmitLocationUpdated ()
 
void EmitLocationUpdatedRaw ()
 
void EmitCompassUpdated ()
 
void UpdateLocation (LocationReading newLocation)
 
void UpdateHeading (HeadingReading newHeading)
 
bool ShouldUpdateHeading (HeadingReading newHeading)
 
bool ShouldUpdateLocation (LocationReading newLocation)
 

Protected Attributes

double LowPassFilterFactor
 

Properties

abstract string Name [get]
 The name of the location provider. More...
 
LocationProviderOptions Options [get, set]
 The options of the location provider. More...
 
LocationReading CurrentLocation [get, protected set]
 Gets or sets the current location. More...
 
LocationReading LastLocation [get, protected set]
 Gets or sets the previous location. More...
 
LocationReading LastLocationRaw [get, protected set]
 
LocationReading CurrentLocationRaw [get, protected set]
 Gets or sets the previous raw location reading. More...
 
HeadingReading CurrentHeading [get, protected set]
 The current heading reading. More...
 
HeadingReading LastHeading [get, protected set]
 The previous heading reading. More...
 
LocationReading FirstLocation [get, protected set]
 The start point, i.e., the first measured location. More...
 
LocationProviderStatus Status [get, protected set]
 Gets or sets the current status of the location provider. More...
 
bool IsEnabled [get, protected set]
 If true, the location provider is enablied and getting regular location updated from the device. More...
 
bool FirstReading [get, protected set]
 If true, the first reading has not occured yet. More...
 
abstract bool IsCompassEnabled [get]
 If true, the provider has a functioning magnetic compass sensor. More...
 
float StartTime [get, protected set]
 The start time of the location provider. More...
 
bool Paused [get, protected set]
 If true, location updates are paused. More...
 
int LocationUpdateCount [get, protected set]
 
bool ApplyCompassTiltCompensationOnAndroid = true [get, set]
 
double DistanceFromStartPoint [get]
 
- Properties inherited from ARLocation.ILocationProvider
string Name [get]
 
LocationProviderOptions Options [get, set]
 
LocationReading CurrentLocation [get]
 
LocationReading CurrentLocationRaw [get]
 
LocationReading LastLocation [get]
 
LocationReading LastLocationRaw [get]
 
LocationReading FirstLocation [get]
 
HeadingReading CurrentHeading [get]
 
HeadingReading LastHeading [get]
 
float StartTime [get]
 
bool IsCompassEnabled [get]
 
double DistanceFromStartPoint [get]
 
bool IsEnabled [get]
 
bool Paused [get]
 
int LocationUpdateCount [get]
 
bool HasStarted [get]
 
bool ApplyCompassTiltCompensationOnAndroid [get, set]
 

Events

LocationUpdatedDelegate LocationUpdated
 Event for when a new location data is received. More...
 
CompassUpdateDelegate CompassUpdated
 Event for when a new compass data is received. More...
 
LocationEnabledDelegate LocationEnabled
 
LocationFailedDelegate LocationFailed
 
LocationUpdatedDelegate LocationUpdatedRaw
 
- Events inherited from ARLocation.ILocationProvider
LocationUpdatedDelegate LocationUpdated
 
LocationUpdatedDelegate LocationUpdatedRaw
 
CompassUpdateDelegate CompassUpdated
 
LocationEnabledDelegate LocationEnabled
 
LocationFailedDelegate LocationFailed
 

Detailed Description

Abstract location provider. All concrete location provider implementations should derive from this.

Definition at line 14 of file AbstractLocationProvider.cs.

Member Function Documentation

◆ Pause()

void ARLocation.AbstractLocationProvider.Pause ( )

Pauses location updates

Implements ARLocation.ILocationProvider.

Definition at line 428 of file AbstractLocationProvider.cs.

◆ ReadHeading()

abstract ? HeadingReading ARLocation.AbstractLocationProvider.ReadHeading ( )
protectedpure virtual

Reads the heading from the device; should be implemented by each provider.

Returns
The heading.

Implemented in ARLocation.UnityLocationProvider, and ARLocation.MockLocationProvider.

◆ ReadLocation()

abstract ? LocationReading ARLocation.AbstractLocationProvider.ReadLocation ( )
protectedpure virtual

Reads the location from the device; should be implemented by each provider.

Returns
The location.

Implemented in ARLocation.UnityLocationProvider, and ARLocation.MockLocationProvider.

◆ RequestLocationAndCompassUpdates()

abstract void ARLocation.AbstractLocationProvider.RequestLocationAndCompassUpdates ( )
protectedpure virtual

Requests the location and compass updates from the device; should be implemented by each provider.

Implemented in ARLocation.UnityLocationProvider, and ARLocation.MockLocationProvider.

◆ Resume()

void ARLocation.AbstractLocationProvider.Resume ( )

Resumes location updates

Implements ARLocation.ILocationProvider.

Definition at line 436 of file AbstractLocationProvider.cs.

◆ UpdateLocationRequestStatus()

abstract void ARLocation.AbstractLocationProvider.UpdateLocationRequestStatus ( )
protectedpure virtual

Updates the location service status from the device; should be implemented by each provider.

Implemented in ARLocation.UnityLocationProvider, and ARLocation.MockLocationProvider.

Property Documentation

◆ CurrentHeading

HeadingReading ARLocation.AbstractLocationProvider.CurrentHeading
getprotected set

The current heading reading.

The current heading.

Definition at line 54 of file AbstractLocationProvider.cs.

◆ CurrentLocation

LocationReading ARLocation.AbstractLocationProvider.CurrentLocation
getprotected set

Gets or sets the current location.

The current location.

Definition at line 34 of file AbstractLocationProvider.cs.

◆ CurrentLocationRaw

LocationReading ARLocation.AbstractLocationProvider.CurrentLocationRaw
getprotected set

Gets or sets the previous raw location reading.

The raw location last.

Definition at line 48 of file AbstractLocationProvider.cs.

◆ FirstLocation

LocationReading ARLocation.AbstractLocationProvider.FirstLocation
getprotected set

The start point, i.e., the first measured location.

The start point.

Definition at line 66 of file AbstractLocationProvider.cs.

◆ FirstReading

bool ARLocation.AbstractLocationProvider.FirstReading
getprotected set

If true, the first reading has not occured yet.

true if first reading; otherwise, false.

Definition at line 85 of file AbstractLocationProvider.cs.

◆ IsCompassEnabled

abstract bool ARLocation.AbstractLocationProvider.IsCompassEnabled
get

If true, the provider has a functioning magnetic compass sensor.

true if is compass enabled; otherwise, false.

Definition at line 91 of file AbstractLocationProvider.cs.

◆ IsEnabled

bool ARLocation.AbstractLocationProvider.IsEnabled
getprotected set

If true, the location provider is enablied and getting regular location updated from the device.

true if is enabled; otherwise, false.

Definition at line 79 of file AbstractLocationProvider.cs.

◆ LastHeading

HeadingReading ARLocation.AbstractLocationProvider.LastHeading
getprotected set

The previous heading reading.

The last heading.

Definition at line 60 of file AbstractLocationProvider.cs.

◆ LastLocation

LocationReading ARLocation.AbstractLocationProvider.LastLocation
getprotected set

Gets or sets the previous location.

The last location.

Definition at line 40 of file AbstractLocationProvider.cs.

◆ Name

abstract string ARLocation.AbstractLocationProvider.Name
get

The name of the location provider.

The name.

Definition at line 22 of file AbstractLocationProvider.cs.

◆ Options

LocationProviderOptions ARLocation.AbstractLocationProvider.Options
getset

The options of the location provider.

The options.

Definition at line 28 of file AbstractLocationProvider.cs.

◆ Paused

bool ARLocation.AbstractLocationProvider.Paused
getprotected set

If true, location updates are paused.

Definition at line 102 of file AbstractLocationProvider.cs.

◆ StartTime

float ARLocation.AbstractLocationProvider.StartTime
getprotected set

The start time of the location provider.

The start time.

Definition at line 97 of file AbstractLocationProvider.cs.

◆ Status

LocationProviderStatus ARLocation.AbstractLocationProvider.Status
getprotected set

Gets or sets the current status of the location provider.

The status.

Definition at line 72 of file AbstractLocationProvider.cs.

Event Documentation

◆ CompassUpdated

CompassUpdateDelegate ARLocation.AbstractLocationProvider.CompassUpdated

Event for when a new compass data is received.

Definition at line 121 of file AbstractLocationProvider.cs.

◆ LocationUpdated

LocationUpdatedDelegate ARLocation.AbstractLocationProvider.LocationUpdated

Event for when a new location data is received.

Definition at line 116 of file AbstractLocationProvider.cs.


The documentation for this class was generated from the following file: