klren0312 / daliy_knowledge

知识积累,正确使用方式是watch
21 stars 4 forks source link

tle转czml #723

Open klren0312 opened 1 year ago

klren0312 commented 1 year ago

方法

使用python, 第二个限制库的版本是为了防止报错 1688638066526(1)

pip install tle2czml -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install pygeoif==0.7 -i https://pypi.tuna.tsinghua.edu.cn/simple
import tle2czml
from datetime import datetime

# You can specify the time range you would like to visualise
start_time = datetime(2020, 10, 1, 17, 30)
end_time = datetime(2020, 10, 2, 19, 30)
tle2czml.create_czml("tle.txt", start_time=start_time, end_time=end_time)

txt文件内容

ISS (ZARYA)             
1 25544U 98067A   20293.22611972  .00000497  00000-0  17003-4 0  9991
2 25544  51.6436  94.7185 0001350  46.8729 126.5595 15.49312821251249
KESTREL EYE IIM (KE2M)  
1 42982U 98067NE  20293.11355452  .00022129  00000-0  15728-3 0  9999
2 42982  51.6336   8.5058 0001619 215.9884 144.1006 15.73808685170523
DELLINGR (RBLE)         
1 43021U 98067NJ  20292.66572402  .00020201  00000-0  13900-3 0  9998
2 43021  51.6343   8.5926 0000331  53.4398 306.6632 15.74631224166254
UBAKUSAT
1 43467U 98067NQ  20293.19063114  .00070844  00000-0  29473-3 0  9996
2 43467  51.6335   1.3662 0002867   6.9343 353.1700 15.85064344139669
CUBERRT
1 43546U 98067NU  20292.65915576  .00130902  00000-0  58528-3 0  9997
2 43546  51.6326   6.1225 0002465  18.8688 341.2406 15.83306046129681

参考资料

https://blog.csdn.net/qq_15028721/article/details/130593533