-
Notifications
You must be signed in to change notification settings - Fork 252
traffic
In BlueSky, the traffic object contains all of the data related to the actual simulation of the traffic. This data can be aircraft-related (e.g., aircraft positions, velocities, etc.), but also other simulated aspects affecting the aircraft such as weather (a wind model, turbulence). In BlueSky, the traffic as whole is an object, but the properties are represented by numpy vectors to allow vectorizing. To find out more about this, look here.
There are traf.ntraf aircraft. For given aircraft id, the index can be found with the function: traf.id2idx(txt).
Part of this traffic object are also system simulations like the airborne separation assurance system (ASAS, in traf.asas), the autopilot (in traf.ap) and the flight management system (FMS, in traf.ap.route and traf.actwp for the active waypoint data).
The traffic object is accessible as a top-level import from bluesky:
from bluesky import traf
# Do stuff with traf
i = traf.id2idx("KL204")
print(traf.lat[i])
...
The following data are available in the traffic object:
Basic aircraft information
Name | Unit | Description |
---|---|---|
id | string | Aircraft callsign |
type | string | Aircaft type |
Aircraft location and orientation
Name | Unit | Description |
---|---|---|
lat | deg | Aircraft latitude |
lon | deg | Aircraft longitude |
alt | m | Aircraft altitude |
hdg | deg | Aircraft heading |
trk | deg | Aircraft track angle |
Aircraft velocities
Name | Unit | Description |
---|---|---|
tas | m/s | Aircraft true airspeed |
gs | m/s | Aircraft ground speed |
gsnorth | m/s | Aircraft ground speed |
gseast | m/s | Aircraft ground speed |
cas | m/s | Aircraft calibrated airspeed |
M | - | Aircraft mach number |
vs | m/s | Aircraft vertical speed |
Atmospheric properties per aircraft
Name | Unit | Description |
---|---|---|
p | N/m2 | Air pressure |
rho | kg/m3 | Air density |
Temp | K | Air temperature |
dtemp | K | Delta-t for non-ISA conditions |
Aircraft autopilot settings
Name | Unit | Description |
---|---|---|
aspd | m/s | Aircraft selected speed (CAS) |
ama | - | Aircraft selected speed above crossover altitude (Mach) |
apalt | m | Aircraft selected altitude |
avs | m/s | Aircraft selected vertical speed |