Loading...
Searching...
No Matches

Class describing user's position. More...

#include <com/navigine/idl/objc/NCPosition.h>

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithPoint:accuracy:heading:headingAccuracy:locationPoint:locationHeading:
 Default constructor for class NCPosition.
 

Class Methods

(nonnull instancetype) + positionWithPoint:accuracy:heading:headingAccuracy:locationPoint:locationHeading:
 Factory method for class NCPosition.
 

Properties

NCGlobalPointpoint
 position in WGS84 coordinates.
 
double accuracy
 
NSNumber * heading
 Heading, angle of rotation about the -Z axis (in radians). This value represents the angle between the device's Y axis and the magnetic north pole. When facing north, this angle is 0, when facing south, this angle is pi. Likewise, when facing east, this angle is pi/2, and when facing west, this angle is -pi/2. The range of values is [-pi, pi].
 
NSNumber * headingAccuracy
 Heading accuracy in radians.
 
NCLocationPointlocationPoint
 position in metrics coordinates at calculated location and sublocation NCLocationPoint
 
NSNumber * locationHeading
 Similiar to heading but with respect to sublocation north (top of the image)
 

Detailed Description

Class describing user's position.

Referenced from: NavigationManager, PositionListener.

Definition at line 20 of file NCPosition.h.

Method Documentation

◆ initWithPoint:accuracy:heading:headingAccuracy:locationPoint:locationHeading:

- (nonnull instancetype) initWithPoint: (nonnull NCGlobalPoint *) point
accuracy: (double) accuracy
heading: (nullable NSNumber *) heading
headingAccuracy: (nullable NSNumber *) headingAccuracy
locationPoint: (nullable NCLocationPoint *) locationPoint
locationHeading: (nullable NSNumber *) locationHeading 

Default constructor for class NCPosition.

◆ positionWithPoint:accuracy:heading:headingAccuracy:locationPoint:locationHeading:

+ (nonnull instancetype) positionWithPoint: (nonnull NCGlobalPoint *) point
accuracy: (double) accuracy
heading: (nullable NSNumber *) heading
headingAccuracy: (nullable NSNumber *) headingAccuracy
locationPoint: (nullable NCLocationPoint *) locationPoint
locationHeading: (nullable NSNumber *) locationHeading 

Factory method for class NCPosition.

Property Documentation

◆ accuracy

- (double) accuracy
readnonatomicassign

Position accuracy in meters

Swift code snippet:

// Get position accuracy
let accuracy = position.getAccuracy()
print("Position accuracy: \‍(accuracy) meters")

Objective C code snippet:

// Get position accuracy
double accuracy = [position getAccuracy];
NSLog(@"Position accuracy: %f meters", accuracy);

Definition at line 68 of file NCPosition.h.

◆ heading

- (NSNumber*) heading
readnonatomicassign

Heading, angle of rotation about the -Z axis (in radians). This value represents the angle between the device's Y axis and the magnetic north pole. When facing north, this angle is 0, when facing south, this angle is pi. Likewise, when facing east, this angle is pi/2, and when facing west, this angle is -pi/2. The range of values is [-pi, pi].

Swift code snippet:

// Get heading (angle of rotation about the -Z axis in radians)
if let heading = position.getHeading() {
print("Heading: \‍(heading) radians")
}

Objective C code snippet:

// Get heading (angle of rotation about the -Z axis in radians)
NSNumber *heading = [position getHeading];
if (heading != nil) {
NSLog(@"Heading: %f radians", [heading doubleValue]);
}

Definition at line 88 of file NCPosition.h.

◆ headingAccuracy

- (NSNumber*) headingAccuracy
readnonatomicassign

Heading accuracy in radians.

Swift code snippet:

// Get heading accuracy
if let headingAccuracy = position.getHeadingAccuracy() {
print("Heading accuracy: \‍(headingAccuracy) radians")
}

Objective C code snippet:

// Get heading accuracy
NSNumber *headingAccuracy = [position getHeadingAccuracy];
if (headingAccuracy != nil) {
NSLog(@"Heading accuracy: %f radians", [headingAccuracy doubleValue]);
}

Definition at line 102 of file NCPosition.h.

◆ locationHeading

- (NSNumber*) locationHeading
readnonatomicassign

Similiar to heading but with respect to sublocation north (top of the image)

Swift code snippet:

// Get location heading (with respect to sublocation north)
if let locationHeading = position.getLocationHeading() {
print("Location heading: \‍(locationHeading) radians")
}

Objective C code snippet:

// Get location heading (with respect to sublocation north)
NSNumber *locationHeading = [position getLocationHeading];
if (locationHeading != nil) {
NSLog(@"Location heading: %f radians", [locationHeading doubleValue]);
}

Definition at line 130 of file NCPosition.h.

◆ locationPoint

- (NCLocationPoint*) locationPoint
readnonatomicassign

position in metrics coordinates at calculated location and sublocation NCLocationPoint

Swift code snippet:

// Get location point (metrics coordinates)
if let locationPoint = position.getLocationPoint() {
demonstrateLocationPointUsage(locationPoint)
}

Objective C code snippet:

// Get location point (metrics coordinates)
NCLocationPoint *locationPoint = [position getLocationPoint];
if (locationPoint != nil) {
[self demonstrateLocationPointUsage:locationPoint];
}

Definition at line 116 of file NCPosition.h.

◆ point

- (NCGlobalPoint*) point
readnonatomicassign

position in WGS84 coordinates.

Swift code snippet:

// Get global point (WGS84 coordinates)
if let globalPoint = position.getPoint() {
demonstrateGlobalPointUsage(globalPoint)
}

Objective C code snippet:

// Get global point (WGS84 coordinates)
NCGlobalPoint *globalPoint = [position getPoint];
if (globalPoint != nil) {
[self demonstrateGlobalPointUsage:globalPoint];
}

Definition at line 54 of file NCPosition.h.


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