gpt4 book ai didi

python - 通过OpenSky API或其他API从icao24接收飞机资料信息,例如飞机型号和制造商?

转载 作者:行者123 更新时间:2023-12-01 07:15:29 33 4
gpt4 key购买 nike

我正在尝试通过OpenSky api接收飞机信息,同时尝试了python api和其他api。问题在于我们无法获得所需的所有信息。这是我们向其余api请求的示例。

def request(icao):
"""
@Param icao type string
"""
contents = urllib.request.urlopen(
"https://opensky-network.org/api/states/all?extended=true&icao24="+icao).read()
print(contents)

"""
The received data is a json with the following fields:
# icao24 - ICAO24 address of the transmitter in hex string representation.
# callsign - callsign of the vehicle. Can be None if no callsign has been received.
# origin_country - inferred through the ICAO24 address
# time_position - seconds since epoch of last position report. Can be None if there was no position report received by OpenSky within 15s before.
# last_contact - seconds since epoch of last received message from this transponder
# longitude - in ellipsoidal coordinates (WGS-84) and degrees. Can be None
# latitude - in ellipsoidal coordinates (WGS-84) and degrees. Can be None
# geo_altitude - geometric altitude in meters. Can be None
# on_ground - true if aircraft is on ground (sends ADS-B surface position reports).
# velocity - over ground in m/s. Can be None if information not present
# heading - in decimal degrees (0 is north). Can be None if information not present.
# vertical_rate - in m/s, incline is positive, decline negative. Can be None if information not present.
# sensors - serial numbers of sensors which received messages from the vehicle within the validity period of this state vector. Can be None if no filtering for sensor has been requested.
# baro_altitude - barometric altitude in meters. Can be None
# squawk - transponder code aka Squawk. Can be None
# spi - special purpose indicator
# position_source - origin of this state’s position: 0 = ADS-B, 1 = ASTERIX, 2 = MLAT, 3 = FLARM
Read more here:
https://opensky-network.org/apidoc/rest.html
"""


我收到了如上所述的所有数据,但是飞机模型和制造商对此也很感兴趣。 OpenSky数据库当前在网站(例如icao24飞机)上共享以下信息: https://opensky-network.org/aircraft-profile?icao24=000001。因此,一个明显的解决方案是使用(我们从第一个请求中收到的icao24)从网站抓取,但这很慢。我一直在尝试跟踪网站从何处获取数据,但没有成功。

如果还有其他/更好的免费方式接收飞机相关数据,请告知我。

任何帮助表示赞赏!

最佳答案

可用的飞机数据库可以在那里以CSV格式下载:https://opensky-network.org/datasets/metadata/

关于python - 通过OpenSky API或其他API从icao24接收飞机资料信息,例如飞机型号和制造商?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57994164/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com