A Julia wrapper library for the KRPC remote procedure call system for Kerbal Space Program.
using KRPC
using KRPC.Interface.SpaceCenter.Helpers
KRPC.kerbal_connect("test", "127.0.0.1") do
# use the connection
end
spaceCenter = KRPC.Interface.SpaceCenter.RemoteTypes.SpaceCenter(conn)
vessel = ActiveVessel(spaceCenter)
body_rf = ReferenceFrame(Body(Orbit(vessel)))
println(Position(vessel, body_rf))
spaceCenter = KRPC.Interface.SpaceCenter.RemoteTypes.SpaceCenter(conn)
vessel = ActiveVessel(spaceCenter)
body_rf = ReferenceFrame(Body(Orbit(vessel)))
add_stream(conn, (KRPC.Interface.SpaceCenter.Vessel_Position(vessel, body_rf), )) do stream
for (position, ) in stream
println(position)
end
end