UPosition class
A GPS fix: latitude, longitude, accuracy, altitude, speed, heading, time. p.latitude
- Annotations
Constructors
- UPosition({required double latitude, required double longitude, required DateTime time, double? accuracy, double? altitude, double? altitudeAccuracy, double? heading, double? headingAccuracy, double? speed, double? speedAccuracy, int? floor, bool isMocked = false, String? source})
-
const
-
UPosition.fromMap(Map<
Object?, Object?> m) -
Reads it from the native map.
factory
Properties
- accuracy → double?
-
Horizontal accuracy radius in metres.
final
- altitude → double?
-
Metres above sea level.
final
- altitudeAccuracy → double?
-
Altitude accuracy in metres.
final
- floor → int?
-
Building floor (iOS indoor positioning).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heading → double?
-
Direction of travel in degrees from north.
final
- headingAccuracy → double?
-
Heading accuracy in degrees.
final
- isMocked → bool
-
Produced by a fake-GPS app or the simulator.
final
- latitude → double
-
Latitude in degrees.
final
- longitude → double
-
Longitude in degrees.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String?
-
gps, network, fused, wifi, cellular, ip, … when the platform tells.
final
- speed → double?
-
Metres per second.
final
- speedAccuracy → double?
-
Speed accuracy in m/s.
final
- time → DateTime
-
When it was measured.
final
Methods
-
bearingTo(
double latitude, double longitude) → double - Initial bearing to another point in degrees from north.
-
distanceTo(
double latitude, double longitude) → double - Great-circle distance to another point in metres.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> - As a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited