feat: 初始化提交
This commit is contained in:
15
测试文件/采集当前坐标.py
Normal file
15
测试文件/采集当前坐标.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import krpc
|
||||
|
||||
|
||||
conn = krpc.connect(name='Hover Guidance V5')
|
||||
if not conn.space_center:
|
||||
print("No active vessel found.")
|
||||
exit()
|
||||
vessel = conn.space_center.active_vessel
|
||||
|
||||
flight = vessel.flight(vessel.surface_reference_frame)
|
||||
|
||||
lat = flight.latitude
|
||||
lon = flight.longitude
|
||||
|
||||
print(f"当前位置:纬度 {lat},经度 {lon}")
|
||||
Reference in New Issue
Block a user