public class LocationData extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LocationData.Location
The data object holding current location information
|
| Modifier | Constructor and Description |
|---|---|
protected |
LocationData()
Constructor
|
protected |
LocationData(GPSMessageConsolidator.ConsolidatedGPSData gpsdata)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint()
Add the current location to the track
|
void |
addStartEndPoints()
Add the current track to the start and end point lists.
|
void |
clearStartPosition()
Clear the start position (of a track)
|
Altitude |
getAltitude()
Get the current altitude
|
Position |
getCurrentFromEnd()
Get the relative position of the current position relation to the end
point of the last recorded track.
|
Position |
getCurrentFromLastPoint()
Get the current position relation to the last position recorded on the
track.
|
Position |
getCurrentFromPoint(int i)
Get the current position relation to a selected position recorded on the
track.
|
Position |
getCurrentFromStart()
Get the relative position of the current position relative to the start
position of the current track.
|
String |
getDatedisplay()
Get the gps date
|
Depth |
getDepth()
Get the current depth
|
List<Position> |
getEndPoints()
Get a set of end points for recorded tracks.
|
Position |
getFirstStartEnd()
Get the position of the first end point relative to first start point.
|
HDOP |
getHDOP()
Get the current HDOP
|
double |
getHeading()
Get the current course.
|
String |
getIsodatedisplay()
Get the gps date
|
String |
getIsotimedisplay()
Get the gps time
|
double |
getKnots()
Get the current speed (in knots)
|
LocationData.Location |
getLocation()
Get the current location.
|
Position |
getPointFromPreviousPoint(int i)
Get the position of a point on the track relative to the previous point
on the track.
|
List<Position> |
getPoints()
Get the set of position which are recorded as the current track
|
int |
getPointsSize()
Get the size of the track
|
Position |
getPosition()
Get the current position
|
LocationData.Location |
getReferenceLocation()
Get the Reference location
|
double |
getSpeed()
Get the current speed.
|
int |
getStartEndPointsSize()
Get the number of tracks recorded.
|
List<Position> |
getStartPoints()
Get the set of start points for recorded tracks.
|
Position |
getStartPosition()
Get the start position (of a track)
|
String |
getTimedisplay()
Get the gps time
|
boolean |
hasNoPoints()
test if track has no points defined.
|
boolean |
hasNoStartEndPoints()
Test if any tracks have been recorded.
|
boolean |
isRecording()
Test if recording is in progress.
|
protected LocationData |
setLocation(GPSMessageConsolidator.ConsolidatedGPSData gpsdata)
Update the Location data with new gps data.
|
void |
setRecording(boolean recording)
Set recording state.
|
protected LocationData |
setReferenceLocation(LocationData.Location location)
Set the reference location
|
void |
setStartPosition()
Set the start position (of a track)
|
protected LocationData()
protected LocationData(GPSMessageConsolidator.ConsolidatedGPSData gpsdata)
gpsdata - the gps data to used to define the locationprotected final LocationData setLocation(GPSMessageConsolidator.ConsolidatedGPSData gpsdata)
gpsdata - the gps data to used to define the locationprotected final LocationData setReferenceLocation(LocationData.Location location)
location - the reference location.public final String getDatedisplay()
public final String getIsodatedisplay()
public final String getTimedisplay()
public final String getIsotimedisplay()
public final LocationData.Location getLocation()
public final double getHeading()
public final double getSpeed()
public final double getKnots()
public final Position getPosition()
public final HDOP getHDOP()
public final Altitude getAltitude()
public final Depth getDepth()
public final LocationData.Location getReferenceLocation()
public final Position getStartPosition()
public final void setStartPosition()
public final void clearStartPosition()
public final List<Position> getPoints()
public final Position getCurrentFromLastPoint()
public final Position getCurrentFromPoint(int i)
i - the index of the position on the track to be used as origin
positionpublic final Position getPointFromPreviousPoint(int i)
i - the index of the position on the track to be calculatedpublic final boolean hasNoPoints()
public final int getPointsSize()
public final void addPoint()
public final List<Position> getStartPoints()
public final List<Position> getEndPoints()
public final void addStartEndPoints()
public final Position getFirstStartEnd()
public final Position getCurrentFromStart()
public final Position getCurrentFromEnd()
public final boolean hasNoStartEndPoints()
public final int getStartEndPointsSize()
public final boolean isRecording()
public final void setRecording(boolean recording)
recording - true if recording to startCopyright © 2017. All rights reserved.