GARMIN CONFIDENTIAL v1.05.00


com.garmin.android.fleet.api
Class Breadcrumb

java.lang.Object
  extended by com.garmin.android.fleet.api.Breadcrumb

public final class Breadcrumb
extends Object

The Breadcrumb class encapsulates the GPS position data associated with a point in a track log. The data in a breadcrumb object includes: latitude, longitude, speed and heading. Breadcrumbs are constant, the value of their data fields cannot be changed after they have been created. As such, the Breadcrumb class contains only getter functions and not setters.

Each breadcrumb includes the following data fields:

Name Type Description
location SemicirclePoint The location includes latitude and longitude in degrees.
heading int The heading in degrees from North.
  • North: 0 degrees
  • South: 180 degrees
  • East: 90 degrees
  • West: -90 degrees
speed float The speed in units of meters per second.
timeStamp long The time in ms, Unix epoc time. This is the time when the corresponding breadcrumb data was recorded.

Since:
Garmin Fleet API 1.00

Field Summary
static float SPEED_MPS_TO_KPH
          Convert from meters per second (MPS) to kilometers per hour (KPH).
static float SPEED_MPS_TO_MPH
          Convert from meters per second (MPS) to miles per hour (MPH).
 
Constructor Summary
Breadcrumb()
          Construct a breadcrumb and set all fields to their default value.
Breadcrumb(SemicirclePoint location, float speed, int heading, long timeStamp)
          Construct a new Breadcrumb and set its fields to the provided values.
Breadcrumb(SemicirclePoint location, float speed, int heading, long timeStamp, LocationFixType fixType, float positionError)
          Construct a new Breadcrumb and set its fields to the provided values.
 
Method Summary
 LocationFixType getFixType()
          Returns the fix type
 int getHeading()
          Returns the heading in degrees ranging from -180 to +180 where 0 is North, 180 is South, 90 is East and -90 is West.
 SemicirclePoint getLocation()
          Returns the location in degrees.
 float getPositionError()
          Returns a relative measure of accuracy of the GPS fix, where zero is the most accurate.
 float getSpeed()
          Returns the speed in meters per second.
 long getTimeStamp()
          Returns the time stamp in ms Unix epoc time.
 String toString()
          Returns a string representation of this breadcrumb object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SPEED_MPS_TO_MPH

public static final float SPEED_MPS_TO_MPH
Convert from meters per second (MPS) to miles per hour (MPH).

Since:
Garmin Fleet API 1.00
See Also:
Constant Field Values

SPEED_MPS_TO_KPH

public static final float SPEED_MPS_TO_KPH
Convert from meters per second (MPS) to kilometers per hour (KPH).

Since:
Garmin Fleet API 1.00
See Also:
Constant Field Values
Constructor Detail

Breadcrumb

public Breadcrumb()
Construct a breadcrumb and set all fields to their default value.

Since:
Garmin Fleet API 1.00

Breadcrumb

public Breadcrumb(SemicirclePoint location,
                  float speed,
                  int heading,
                  long timeStamp)
Construct a new Breadcrumb and set its fields to the provided values.

Parameters:
location - the location (see SemicirclePoint for details).
speed - the speed in meters per second (see Breadcrumb for details).
heading - the heading (see Breadcrumb for details).
timeStamp - the timestamp when the Breadcrumb was queried.
Since:
Garmin Fleet API 1.00

Breadcrumb

public Breadcrumb(SemicirclePoint location,
                  float speed,
                  int heading,
                  long timeStamp,
                  LocationFixType fixType,
                  float positionError)
Construct a new Breadcrumb and set its fields to the provided values.

Parameters:
location - the location (see SemicirclePoint for details).
speed - the speed in meters per second (see Breadcrumb for details).
heading - the heading (see Breadcrumb for details).
timeStamp - the timestamp when the Breadcrumb was queried.
fixType - the fix type for the Breadcrumb
positionError - the quality of the fix
Since:
Garmin Fleet API 1.04
Method Detail

getHeading

public int getHeading()
Returns the heading in degrees ranging from -180 to +180 where 0 is North, 180 is South, 90 is East and -90 is West.

Returns:
the heading
Since:
Garmin Fleet API 1.00
See Also:
Breadcrumb

getLocation

public SemicirclePoint getLocation()
Returns the location in degrees.

Returns:
the location
Since:
Garmin Fleet API 1.00

getSpeed

public float getSpeed()
Returns the speed in meters per second.

Returns:
the speed
Since:
Garmin Fleet API 1.00
See Also:
Breadcrumb

getTimeStamp

public long getTimeStamp()
Returns the time stamp in ms Unix epoc time. This is the time when the corresponding breadcrumb data was recorded.

Returns:
the timeStamp
Since:
Garmin Fleet API 1.00
See Also:
Breadcrumb

getFixType

public LocationFixType getFixType()
Returns the fix type

Returns:
the fix type
Since:
Garmin Fleet API 1.04

getPositionError

public float getPositionError()
Returns a relative measure of accuracy of the GPS fix, where zero is the most accurate. A value of 45 or greater is considered to have poor accuracy.

Returns:
the position error
Since:
Garmin Fleet API 1.04

toString

public String toString()
Returns a string representation of this breadcrumb object.

Overrides:
toString in class Object
Returns:
a string representation of the object.
Since:
Garmin Fleet API 1.00

GARMIN CONFIDENTIAL v1.05.00


Copyright (c) 2014-2016 by Garmin Ltd. or its subsidiaries