Docking Camera#
Provides functionality to interact with the Docking Camera (KURS) mod. Tested with Docking Camera (KURS) 1.3.9.
Example#
The following example saves the image from an onboard camera of the active vessel to a file. The camera must be switched on:
local krpc = require 'krpc'
local conn = krpc.connect('Docking Camera Example')
local parts = conn.space_center.active_vessel.parts
local part = parts:with_name('OnboardCamera')[1]
local camera = conn.docking_camera.camera(part)
local file = io.open('camera.png', 'wb')
file:write(camera:image())
file:close()