Inherits from NSObject
Conforms to CLLocationManagerDelegate
Declared in PARSensorManager.h
PARSensorManager.mm

Tasks

Other Methods

Private Methods

Properties

useCompassAsBaseline

use compass as baseline for gyroscope if NO: gyroscope does not adjust baseline drift –> use for VR applications

@property (nonatomic, assign) BOOL useCompassAsBaseline

Discussion

use compass as baseline for gyroscope if NO: gyroscope does not adjust baseline drift –> use for VR applications

Declared In

PARSensorManager.h

userHeadingFromMagnetometer

@property heading (retrieved from compass)

@property (nonatomic, readonly, assign) CLHeading *userHeadingFromMagnetometer

Discussion

@property heading (retrieved from compass)

Declared In

PARSensorManager.h

userLocation

@property user location (retrieved from CLLocationManager)

@property (nonatomic, readonly, retain) CLLocation *userLocation

Discussion

@property user location (retrieved from CLLocationManager)

Declared In

PARSensorManager.h

userLocationAccuracy

@property accuracy of the location signal, measured in meters

@property (nonatomic, readonly, assign) float userLocationAccuracy

Discussion

@property accuracy of the location signal, measured in meters

Declared In

PARSensorManager.h

userLocationAge

@property age of the location signal (time passed in seconds since last update of location)

@property (nonatomic, readonly, assign) float userLocationAge

Discussion

@property age of the location signal (time passed in seconds since last update of location)

Declared In

PARSensorManager.h

userLocationQuality

@property quality of the location signal (calculated based on accuracy and age)

@property (nonatomic, readonly, assign) float userLocationQuality

Discussion

@property quality of the location signal (calculated based on accuracy and age)

Declared In

PARSensorManager.h

userLocationValid

is the user’s location set? will return YES after the first location update

@property (nonatomic, readonly, assign, getter=isUserLocationValid) BOOL userLocationValid

Discussion

is the user’s location set? will return YES after the first location update

Declared In

PARSensorManager.h

userLocationX

@property user location x position in ECEF reference frame

@property (nonatomic, readonly, assign) double userLocationX

Discussion

@property user location x position in ECEF reference frame

Declared In

PARSensorManager.h

userLocationY

@property user location Y position in ECEF reference frame

@property (nonatomic, readonly, assign) double userLocationY

Discussion

@property user location Y position in ECEF reference frame

Declared In

PARSensorManager.h

userLocationZ

@property user location Z position in ECEF reference frame

@property (nonatomic, readonly, assign) double userLocationZ

Discussion

@property user location Z position in ECEF reference frame

Declared In

PARSensorManager.h

userSignalQuality

current average signal quality of all sensors (location and compass) ranges from -1 (not available), 0 (best) to 4 (worst)

@property (nonatomic, readonly, assign) int userSignalQuality

Discussion

current average signal quality of all sensors (location and compass) ranges from -1 (not available), 0 (best) to 4 (worst)

Declared In

PARSensorManager.h

Class Methods

bearingTowardsLocation:to:

@brief calculates the direction towards a location, heads-up line is the north pole at 0 degrees @remarks does not take into account the earth’s curve and therefore will grow more inaccurate the farther the locations are apart

+ (double)bearingTowardsLocation:(CLLocation *)fromLocation to:(CLLocation *)towardsLocation

Parameters

fromLocation

location of center point

towardsLocation

location of look-at point

Discussion

@brief calculates the direction towards a location, heads-up line is the north pole at 0 degrees @remarks does not take into account the earth’s curve and therefore will grow more inaccurate the farther the locations are apart

Declared In

PARSensorManager.h

locationServicesAvailable

@brief checks if location services are available/allowed for the device/user @remarks only checks if location services are turned on and the app is authorized to use them @remarks will not take into account if Airplane Mode is turned on @remarks use deviceSupportsAR to check if device supports camera and location services in general

+ (BOOL)locationServicesAvailable

Return Value

YES if location services are available to app

will always return YES if running iOS 3.x: @remarks PARController.locationServicesAvailable: cannot check for availability on iOS 3.x, check manually for locationManager locationServicesAvailable @deprecated use @ref deviceSupportsAR and @ref PARCapabilities instead

Discussion

@brief checks if location services are available/allowed for the device/user @remarks only checks if location services are turned on and the app is authorized to use them @remarks will not take into account if Airplane Mode is turned on @remarks use deviceSupportsAR to check if device supports camera and location services in general

Declared In

PARSensorManager.h

locationServicesAvailable:delayError:

@brief checks if location services are available/allowed for the device/user

+ (BOOL)locationServicesAvailable:(BOOL)raiseError delayError:(BOOL)delayError, ...

Parameters

raiseError

if YES a error will be dispatched to the delegate using arDidReceiveError

delayError

if YES a error will be dispatched to the delegate the next time the PARView becomes visible @remarks only checks if location services are turned on and the app is authorized to use them @remarks will not take into account if Airplane Mode is turned on @remarks use deviceSupportsAR to check if device supports camera and location services in general

Return Value

YES if location services are available to app @remarks will always return YES if running iOS 3.x: @remarks PARController.locationServicesAvailable: cannot check for availability on iOS 3.x, check manually for locationManager locationServicesAvailable @deprecated use @ref deviceSupportsAR and @ref PARCapabilities instead

Discussion

@brief checks if location services are available/allowed for the device/user

Declared In

PARSensorManager.h

showDefaultErrorMessage:

@brief show default error message dialogs

+ (void)showDefaultErrorMessage:(int)forErrorCode

Parameters

forErrorCode

the error code for which a message needs to be displayed @remarks localizable

Discussion

@brief show default error message dialogs

Declared In

PARSensorManager.h

Instance Methods

disableContinuousGPS

disable continuous gps

- (void)disableContinuousGPS

Discussion

disable continuous gps

Declared In

PARSensorManager.h

disableErrorMessages

do not show alert box for errors

- (void)disableErrorMessages

Discussion

do not show alert box for errors

Declared In

PARSensorManager.h

enableErrorMessages

show alert box for any error that occurs (lost GPS signal, etc)

- (void)enableErrorMessages

Discussion

show alert box for any error that occurs (lost GPS signal, etc)

Declared In

PARSensorManager.h

isContinuousGPSEnabled

YES if location manager is not stopped when exiting the PAR view

- (BOOL)isContinuousGPSEnabled

Return Value

YES if location manager is not stopped when exiting the PAR view

Declared In

PARSensorManager.h

start

starts the sensor update for the AR

- (void)start

Discussion

starts the sensor update for the AR

Declared In

PARSensorManager.h

startLocationOnly

starts location-only update

- (void)startLocationOnly

Discussion

starts location-only update

only use when you need to run location updates while the PARViewController is hidden

Declared In

PARSensorManager.h

startLocationServices

manually start location service update, only needed if stopped before, @ref stopLocationServices

- (void)startLocationServices

Discussion

manually start location service update, only needed if stopped before, @ref stopLocationServices

Declared In

PARSensorManager.mm

startMotionOnly

starts motion-only update

- (void)startMotionOnly

Discussion

starts motion-only update

only use when you want to update the device attitude to use outside PanicAR

Declared In

PARSensorManager.h

startMotionUpdate

stops the motion update

- (void)startMotionUpdate

Discussion

stops the motion update

Declared In

PARSensorManager.h

stop

stops the sensor update

- (void)stop

Discussion

stops the sensor update

Declared In

PARSensorManager.h

stopLocationServices:

manually stop location service update

- (void)stopLocationServices:(BOOL)forSuspendOrResume

Parameters

forSuspendOrResume

YES indicates that the method was called automatically on suspending the app

Discussion

manually stop location service update

Declared In

PARSensorManager.mm

stopMotionUpdate

stops the motion update

- (void)stopMotionUpdate

Discussion

stops the motion update

Declared In

PARSensorManager.h