public class AisPosition extends Object implements Serializable
Convert raw unsigned AIS position to signed 1/10000 degree position and provide helper methods for other formats
| Constructor and Description |
|---|
AisPosition()
Instantiates a new Ais position.
|
AisPosition(long rawLatitude,
long rawLongitude)
Constructor given raw latitude and raw longitude as received in AIS message
|
AisPosition(dk.dma.enav.model.geometry.Position location)
Constructor given a GeoLocation
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
dk.dma.enav.model.geometry.Position |
getGeoLocation()
Get position as
Position object |
long |
getLatitude()
Get signed latitude
|
double |
getLatitudeDouble()
Gets latitude double.
|
long |
getLongitude()
Get signed longitude
|
double |
getLongitudeDouble()
Gets longitude double.
|
long |
getRawLatitude()
Gets raw latitude.
|
long |
getRawLongitude()
Gets raw longitude.
|
int |
hashCode() |
void |
set1817()
Set the resolution to be 18 and 17 bits for longitude and latitude respectively
|
void |
set2524()
Set the resolution to be 25 and 24 bits for longitude and latitude respectively
|
void |
setLatitude(long latitude)
Set signed latitude
|
void |
setLongitude(long longitude)
Set signed longitude
|
void |
setRawLatitude(long rawLatitude)
Set the raw latitude as received from AIS
|
void |
setRawLongitude(long rawLongitude)
Set the raw longitude as received from AIS
|
String |
toString() |
public AisPosition()
public AisPosition(long rawLatitude,
long rawLongitude)
rawLatitude - the raw latituderawLongitude - the raw longitudepublic AisPosition(dk.dma.enav.model.geometry.Position location)
location - the locationpublic dk.dma.enav.model.geometry.Position getGeoLocation()
Position objectpublic long getLatitude()
public double getLatitudeDouble()
public double getLongitudeDouble()
public long getLongitude()
public long getRawLatitude()
public long getRawLongitude()
public void set2524()
public void set1817()
public void setLatitude(long latitude)
latitude - the latitudepublic void setLongitude(long longitude)
longitude - the longitudepublic void setRawLatitude(long rawLatitude)
rawLatitude - the raw latitudepublic void setRawLongitude(long rawLongitude)
rawLongitude - the raw longitudeCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.