public class PositionTime extends Position
| Modifier and Type | Field and Description |
|---|---|
static MessageSerializer<PositionTime> |
SERIALIZER
A parser of PositionTime messages.
|
| Modifier and Type | Method and Description |
|---|---|
static PositionTime |
create(double latitude,
double longitude) |
static PositionTime |
create(double latitude,
double longitude,
long time)
Creates a new position from the specified latitude and longitude.
|
static PositionTime |
create(Position position,
long time) |
static PositionTime |
create(String pos) |
boolean |
equals(Object other)
Equals method
|
boolean |
equals(Position other) |
boolean |
equals(PositionTime other) |
PositionTime |
extrapolatePosition(float cog,
float sog,
long time)
Calculate - using linear extrapolation (or dead reckoning) - a position based on known speed and course from this
position.
|
static PositionTime |
fromBinary(Binary b) |
long |
getTime() |
int |
hashCode()
Hash code for the location
|
PositionTime |
interpolatedPosition(PositionTime laterPosition,
long time)
Calculate - using linear interpolation - a position between this position and a specified.
|
boolean |
positionEquals(Position other) |
static PositionTime |
readFrom(MessageReader r) |
Timestamp |
timestamp() |
Binary |
toBinary()
Returns a 64 bit representation of this position.
|
String |
toString() |
fromPackedLong, geodesicDistanceTo, geodesicFinalBearingTo, geodesicInitialBearingTo, getCell, getCellInt, getLatitude, getLatitudeAsString, getLongitude, getLongitudeAsString, immutable, isValid, random, random, rhumbLineBearingTo, rhumbLineDistanceTo, toJSON, toPackedLong, toStringDegrees, verifyLatitude, verifyLongitude, withLatitude, withLongitude, withTimepublic static final MessageSerializer<PositionTime> SERIALIZER
public static PositionTime fromBinary(Binary b)
public Binary toBinary()
Positionpublic boolean equals(PositionTime other)
public PositionTime extrapolatePosition(float cog, float sog, long time)
cog - is the course over ground.sog - is the speed over ground in knots.time - the absolute time (in millis since Epoch) to extrapolate to.public long getTime()
public PositionTime interpolatedPosition(PositionTime laterPosition, long time)
laterPosition - the later position to use in the interpolation.time - the time at which the interpolated position should be calculated.public boolean positionEquals(Position other)
public Timestamp timestamp()
public static PositionTime create(double latitude, double longitude)
public static PositionTime create(double latitude, double longitude, long time)
latitude - the latitudelongitude - the longitudetime - the epoch timeIllegalArgumentException - if thepublic static PositionTime create(Position position, long time)
public static PositionTime create(String pos)
public static PositionTime readFrom(MessageReader r) throws IOException
IOExceptionCopyright © 2012–2015 Danish Maritime Authority. All rights reserved.