Hi,
I'm trying out the wind field example here and cannot get it to work, as presumably I'm missing a step.
Here's what I do:
from datetime import datetime, timedelta, timezone
from traffic.core import Traffic
from traffic.data import opensky
st_time = datetime(2019, 2, 23, 14, 0, 0).replace(tzinfo=timezone.utc)
en_time = datetime(2019, 2, 23, 16, 30, 0).replace(tzinfo=timezone.utc)
bounds = [0., 40., 5., 45.]
flights = opensky.history(start=st_time,
stop=en_time,
bounds=bounds,
other_params=" and baroaltitude>6000 ")
ehs_flights = flights.query_ehs().resample("1s").eval()
wind = ehs_flights.compute_wind.eval()
The query_ehs() line returns lots of warnings like this:
WARNING:root:No data on Impala for flight RAM950X.
The compute_wind line then gives this error:
RuntimeError: No wind data in trajectory. Consider Flight.query_ehs()
I have also tried:
flights = opensky.history(start=st_time,
stop=en_time,
bounds=bounds,
other_params=" and baroaltitude>6000 ")
df = opensky.extended(st_time, en_time, icao24=flights.icao24)
ehs_flights = flights.query_ehs(df).resample("1s").eval()
ehs_flights = compute_wind.eval()
But in this case df is NoneType.
Any ideas what is wrong here?
(edit) To add, I have emptied my cache directory and the problem persists. This is with the latest version of traffic from github master.
(second edit) The example for extended() also doesn't work for me:
df = opensky.extended(
belevingsvlucht.start,
belevingsvlucht.stop,
icao24=belevingsvlucht.icao24
)
print(type(df))
Results in: <class 'NoneType'>
Hi,
I'm trying out the wind field example here and cannot get it to work, as presumably I'm missing a step.
Here's what I do:
The
query_ehs()line returns lots of warnings like this:WARNING:root:No data on Impala for flight RAM950X.The
compute_windline then gives this error:RuntimeError: No wind data in trajectory. Consider Flight.query_ehs()I have also tried:
But in this case df is
NoneType.Any ideas what is wrong here?
(edit) To add, I have emptied my cache directory and the problem persists. This is with the latest version of traffic from github master.
(second edit) The example for
extended()also doesn't work for me:Results in:
<class 'NoneType'>