Geometry Types¶
Vectors¶
3-dimensional vectors are represented as a 3-tuple. For example:
local krpc = require 'krpc'
local conn = krpc.connect()
local v = conn.space_center.active_vessel:flight().prograde
print(v[1], v[2], v[3])
Quaternions¶
Quaternions (rotations in 3-dimensional space) are encoded as a 4-tuple containing the x, y, z and w components. For example:
local krpc = require 'krpc'
local conn = krpc.connect()
local q = conn.space_center.active_vessel:flight().rotation
print(q[1], q[2], q[3], q[4])