Loading...
Searching...
No Matches
Position Class Reference

Class describing user's position. More...

Public Member Functions

 Position (this.point, this.accuracy, this.heading, this.headingAccuracy, this.locationPoint, this.locationHeading)
 Default constructor.
 

Public Attributes

GlobalPoint point
 position in WGS84 coordinates.
 
double accuracy
 
double 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].
 
double headingAccuracy
 Heading accuracy in radians.
 
LocationPoint locationPoint
 position in metrics coordinates at calculated location and sublocation LocationPoint
 
double locationHeading
 Similar 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 23 of file position.dart.

Constructor & Destructor Documentation

◆ Position()

Position.Position ( this. point,
this. accuracy,
this. heading,
this. headingAccuracy,
this. locationPoint,
this. locationHeading )

Default constructor.

Member Data Documentation

◆ accuracy

double Position.accuracy

Position accuracy in meters

Dart code snippet:

// Get position accuracy
double accuracy = position.accuracy;
print("Position accuracy: $accuracy meters");

Definition at line 47 of file position.dart.

◆ heading

double Position.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].

Dart code snippet:

// Get heading (angle of rotation about the -Z axis in radians)
double? heading = position.heading;
if (heading != null) {
print("Heading: $heading radians");
}

Definition at line 64 of file position.dart.

◆ headingAccuracy

double Position.headingAccuracy

Heading accuracy in radians.

Dart code snippet:

// Get heading accuracy
double? headingAccuracy = position.headingAccuracy;
if (headingAccuracy != null) {
print("Heading accuracy: $headingAccuracy radians");
}

Definition at line 75 of file position.dart.

◆ locationHeading

double Position.locationHeading

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

Dart code snippet:

// Get location heading (with respect to sublocation north)
double? locationHeading = position.locationHeading;
if (locationHeading != null) {
print("Location heading: $locationHeading radians");
}

Definition at line 97 of file position.dart.

◆ locationPoint

LocationPoint Position.locationPoint

position in metrics coordinates at calculated location and sublocation LocationPoint

Dart code snippet:

// Get location point (metrics coordinates)
LocationPoint? locationPoint = position.locationPoint;
if (locationPoint != null) {
_demonstrateLocationPointUsage(locationPoint);
}

Definition at line 86 of file position.dart.

◆ point

GlobalPoint Position.point

position in WGS84 coordinates.

Dart code snippet:

// Get global point (WGS84 coordinates)
GlobalPoint? globalPoint = position.point;
if (globalPoint != null) {
_demonstrateGlobalPointUsage(globalPoint);
}

Definition at line 36 of file position.dart.


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