SimulatedLocation class
A simulated GPS fix.
The first ten fields mirror LocationDto of
advanced_background_locator; toMap produces the same
keys, so LocationDto.fromJson(location.toMap()) works without this package depending on it.
- Available extensions
Constructors
- SimulatedLocation({required double latitude, required double longitude, required double accuracy, required double altitude, required double speed, required double speedAccuracy, required double heading, required DateTime time, bool isMocked = true, String provider = 'route_simulator', required Duration elapsed, required double distance, required int lap, bool isStopped = false, bool isJump = false})
-
const
Properties
- accuracy → double
-
Estimated horizontal accuracy (68% radius) in metres.
final
- altitude → double
-
Altitude in metres.
final
- distance → double
-
Noise-free distance along the route in metres, within the current lap.
final
- elapsed → Duration
-
Simulated time since the start of the simulation (all laps).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heading → double
-
Direction of travel in degrees, clockwise from north.
final
- isJump → bool
-
Whether this fix is a simulated multipath jump.
final
- isMocked → bool
-
Always
trueunless overridden: this fix did not come from a real receiver.final - isStopped → bool
-
Whether the device is waiting at a stop.
final
- lap → int
-
Zero-based lap number (always 0 without looping).
final
- latitude → double
-
Latitude in degrees.
final
- longitude → double
-
Longitude in degrees.
final
- point → GeoPoint
-
Available on SimulatedLocation, provided by the SimulatedLocationPoint extension
The fix as a GeoPoint including altitude.no setter - provider → String
-
Provider name,
route_simulatorby default.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speed → double
-
Speed in m/s.
final
- speedAccuracy → double
-
Estimated speed accuracy in m/s.
final
- time → DateTime
-
Timestamp of the fix.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
The fix as a map with the keys of advanced_background_locator's
LocationDto. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited