Package org.opensky.model
Class StateVector
- java.lang.Object
-
- org.opensky.model.StateVector
-
- All Implemented Interfaces:
Serializable
public class StateVector extends Object implements 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StateVector.PositionSource
-
Constructor Summary
Constructors Constructor Description StateVector(String icao24)
-
Method Summary
-
-
-
Constructor Detail
-
StateVector
public StateVector(String icao24)
-
-
Method Detail
-
getGeoAltitude
public Double getGeoAltitude()
- Returns:
- geometric altitude in meters. Can be
null
.
-
setGeoAltitude
public void setGeoAltitude(Double geoAltitude)
-
getLongitude
public Double getLongitude()
- Returns:
- longitude in ellipsoidal coordinates (WGS-84) and degrees. Can be
null
-
setLongitude
public void setLongitude(Double longitude)
-
getLatitude
public Double getLatitude()
- Returns:
- latitude in ellipsoidal coordinates (WGS-84) and degrees. Can be
null
-
setLatitude
public void setLatitude(Double latitude)
-
getVelocity
public Double getVelocity()
- Returns:
- over ground in m/s. Can be
null
if information not present
-
setVelocity
public void setVelocity(Double velocity)
-
getHeading
public Double getHeading()
- Returns:
- in decimal degrees (0 is north). Can be
null
if information not present
-
setHeading
public void setHeading(Double heading)
-
getVerticalRate
public Double getVerticalRate()
- Returns:
- in m/s, incline is positive, decline negative. Can be
null
if information not present.
-
setVerticalRate
public void setVerticalRate(Double verticalRate)
-
getIcao24
public String getIcao24()
- Returns:
- ICAO24 address of the transmitter in hex string representation.
-
setIcao24
public void setIcao24(String icao24)
-
getCallsign
public String getCallsign()
- Returns:
- callsign of the vehicle. Can be
null
if no callsign has been received.
-
setCallsign
public void setCallsign(String callsign)
-
isOnGround
public boolean isOnGround()
- Returns:
- true if aircraft is on ground (sends ADS-B surface position reports).
-
setOnGround
public void setOnGround(boolean onGround)
-
getLastContact
public Double getLastContact()
- Returns:
- seconds since epoch of last message overall received by this transponder.
-
setLastContact
public void setLastContact(Double lastContact)
-
getLastPositionUpdate
public Double 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
public void setLastPositionUpdate(Double lastPositionUpdate)
-
addSerial
public void addSerial(int serial)
-
getSerials
public Set<Integer> 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
public String getOriginCountry()
- Returns:
- the country inferred through the ICAO24 address
-
setOriginCountry
public void setOriginCountry(String originCountry)
-
getSquawk
public String getSquawk()
- Returns:
- transponder code aka squawk. Can be
null
-
setSquawk
public void setSquawk(String squawk)
-
isSpi
public boolean isSpi()
- Returns:
- whether flight status indicates special purpose indicator.
-
setSpi
public void setSpi(boolean spi)
-
getBaroAltitude
public Double getBaroAltitude()
- Returns:
- barometric altitude in meters. Can be
null
.
-
setBaroAltitude
public void setBaroAltitude(Double baroAltitude)
-
getPositionSource
public StateVector.PositionSource getPositionSource()
- Returns:
- origin of this state's position
-
setPositionSource
public void setPositionSource(StateVector.PositionSource positionSource)
-
-