feat: 初始化提交
This commit is contained in:
25
测试文件/参考系可视化.py
Normal file
25
测试文件/参考系可视化.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import time
|
||||
import krpc
|
||||
|
||||
conn = krpc.connect(name='Orbital speed')
|
||||
if not conn.space_center:
|
||||
print("No active vessel found.")
|
||||
exit()
|
||||
vessel = conn.space_center.active_vessel
|
||||
hybrid_ref = conn.space_center.ReferenceFrame.create_hybrid(
|
||||
position=vessel.orbit.body.reference_frame,
|
||||
rotation=vessel.surface_reference_frame
|
||||
) # type: ignore
|
||||
# 参考系为 (上, 北, 东)
|
||||
|
||||
flight_surface = vessel.flight(hybrid_ref)
|
||||
|
||||
drawing = conn.drawing
|
||||
if not drawing:
|
||||
print("Drawing service not available.")
|
||||
exit()
|
||||
drawing.add_direction_from_com((1, 0, 0), hybrid_ref, length=15)
|
||||
drawing.add_direction_from_com((0, 1, 0), hybrid_ref, length=30)
|
||||
drawing.add_direction_from_com((0, 0, 1), hybrid_ref, length=45)
|
||||
while True:
|
||||
pass
|
||||
Reference in New Issue
Block a user