Package org.opensky.model
Class StateVector
java.lang.Object
org.opensky.model.StateVector
- All Implemented Interfaces:
Serializable
Represents the State of a vehicle as seen by the network at a particular time.
- Author:
- Markus Fuchs, fuchs@opensky-network.org
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSerial
(int serial) boolean
int
hashCode()
boolean
boolean
isSpi()
void
setBaroAltitude
(Double baroAltitude) void
setCallsign
(String callsign) void
setGeoAltitude
(Double geoAltitude) void
setHeading
(Double heading) void
void
setLastContact
(Double lastContact) void
setLastPositionUpdate
(Double lastPositionUpdate) void
setLatitude
(Double latitude) void
setLongitude
(Double longitude) void
setOnGround
(boolean onGround) void
setOriginCountry
(String originCountry) void
setPositionSource
(StateVector.PositionSource positionSource) void
setSpi
(boolean spi) void
void
setVelocity
(Double velocity) void
setVerticalRate
(Double verticalRate) toString()
-
Constructor Details
-
StateVector
-
-
Method Details
-
getGeoAltitude
- Returns:
- geometric altitude in meters. Can be
null
.
-
setGeoAltitude
-
getLongitude
- Returns:
- longitude in ellipsoidal coordinates (WGS-84) and degrees. Can be
null
-
setLongitude
-
getLatitude
- Returns:
- latitude in ellipsoidal coordinates (WGS-84) and degrees. Can be
null
-
setLatitude
-
getVelocity
- Returns:
- over ground in m/s. Can be
null
if information not present
-
setVelocity
-
getHeading
- Returns:
- in decimal degrees (0 is north). Can be
null
if information not present
-
setHeading
-
getVerticalRate
- Returns:
- in m/s, incline is positive, decline negative. Can be
null
if information not present.
-
setVerticalRate
-
getIcao24
- Returns:
- ICAO24 address of the transmitter in hex string representation.
-
setIcao24
-
getCallsign
- Returns:
- callsign of the vehicle. Can be
null
if no callsign has been received.
-
setCallsign
-
isOnGround
public boolean isOnGround()- Returns:
- true if aircraft is on ground (sends ADS-B surface position reports).
-
setOnGround
public void setOnGround(boolean onGround) -
getLastContact
- Returns:
- seconds since epoch of last message overall received by this transponder.
-
setLastContact
-
getLastPositionUpdate
- Returns:
- seconds since epoch of last position report. Can be
null
if there was no position report received by OpenSky within 15s before.
-
setLastPositionUpdate
-
addSerial
public void addSerial(int serial) -
getSerials
- Returns:
- serial numbers of sensors which received messages from the vehicle within the validity period of this state vector.
null
if information is not present, i.e., there was no filter for a sensor in the request
-
getOriginCountry
- Returns:
- the country inferred through the ICAO24 address
-
setOriginCountry
-
getSquawk
- Returns:
- transponder code aka squawk. Can be
null
-
setSquawk
-
isSpi
public boolean isSpi()- Returns:
- whether flight status indicates special purpose indicator.
-
setSpi
public void setSpi(boolean spi) -
getBaroAltitude
- Returns:
- barometric altitude in meters. Can be
null
.
-
setBaroAltitude
-
getPositionSource
- Returns:
- origin of this state's position
-
setPositionSource
-
toString
-
equals
-
hashCode
public int hashCode()
-