这不是一个卫星收购计划,但它可能让你开始。我使用Python包(Skyfield) (https://rhodesmill.org/skyfield/)的子卫星SMAP基于最近的点(两个线元素集)(https://en.wikipedia.org/wiki/Two-line_element_set)从(Celestrak) (https://celestrak.org/NORAD/elements/)。*请随时留言问题如果需要调整!*我不是专家日期和时间在Python中,“倍”的对象有几个转换和格式化方法如果你想让一个表。[!(地图SMAP的子卫星地球上点24 - 2月- 2020)(https://i.stack.imgur.com/NWC8t.png)) (https://i.stack.imgur.com/NWC8t.png) # !/usr/bin/env python # - * -编码:utf - 8 - *——从skyfield。api导入主题,负载进口numpy np matplotlib进口。pyplot plt #主要来自https://rhodesmill.org/skyfield/earth-satellites.html resource_satellites_url = ' https://celestrak.org/NORAD/elements/resource.txt ' resource_satellites = load.tle (resource_satellites_url) SMAP = resource_satellites (SMAP的)打印(SMAP)打印(“框架SMAP发现的时代:”,SMAP.epoch.utc_jpl ()) ts = load.timescale = ts.now()天()——SMAP。时代印刷(' {:。3 f}天远离时代的.format(天))#仍然从这个例子:布拉夫顿=主题(40.8939 N, 83.8917 W) t0 = ts.utc (2020、2、23) t1 = ts.utc (2020、2、24) t = SMAP的事件。find_events(布拉夫顿t0, t1, altitude_degrees = 30.0) ti,事件在zip (t,事件):name =(超过30°,“高潮”,小于30°)(事件)打印(ti.utc_jpl(),名字)#警告我在这里硬编码的一个日期,如果你运行这个框架后,检索#将会更新的,所以不太准确。 You'd like the TLE you use to be within # a few weeks (if not a few days) of your date for best accuracy. minutes = range(24*60+1) times = ts.utc(2020, 2, 24, 0, minutes, 0) # Example; every minute for 24-feb-2020 subsat_pts = SMAP.at(times).subpoint() lat, lon = subsat_pts.latitude.degrees, subsat_pts.longitude.degrees subsat_pts_now = SMAP.at(ts.now()).subpoint() lat_now, lon_now = subsat_pts_now.latitude.degrees, subsat_pts_now.longitude.degrees # fudging around to keep the plot from wrapping arond the Earth breakpoints = lon[1:] - lon[:-1] > 10. # for SMAP this means that longitude has wrapped lat, lon = lat[:-1], lon[:-1] lon[breakpoints] = np.nan if True: plt.figure() plt.plot(lon, lat) plt.title('SMAP map every minute for 24-feb-2020, dot is for ts.now()') plt.xlabel('longitude (degs)') plt.ylabel('latitude (degs)') plt.plot([lon_now], [lat_now], 'ok') # put a dot for right now plt.show()
Baidu
map