diff --git a/docs.md b/docs.md index 150014d..38eb2b1 100644 --- a/docs.md +++ b/docs.md @@ -194,6 +194,12 @@ Every cycle: - Velocity Sensor `getAxis()`, `getVelocity` - Poll input signal strengths for global downwards thrust, and fore and aft thrust +### Math + +#### Calculate Counteractive Thrust + +TODO: fill in + ### Data Structures #### Config @@ -241,6 +247,8 @@ Config = { } ``` +#### SensorData + The member variables of the sensor table is as follows: ```lua @@ -284,11 +292,21 @@ SensorData = { } ``` +#### Thrusters + The member variables of the Thruster table are as follows (using some example thrusters): ```lua Thrusters = { gyroscopic_propeller_bearing_0 = { + -- primary attitude thruster? + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + -- primary lateral thruster? + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_0", thruster = nil, @@ -308,6 +326,14 @@ Thrusters = { power = nil }, gyroscopic_propeller_bearing_1 = { + -- primary attitude thruster? + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + -- primary lateral thruster? + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_1", thruster = nil, @@ -327,6 +353,14 @@ Thrusters = { power = nil }, gyroscopic_propeller_bearing_2 = { + -- primary attitude thruster? + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + -- primary lateral thruster? + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_2", thruster = nil, @@ -346,6 +380,14 @@ Thrusters = { power = nil }, gyroscopic_propeller_bearing_3 = { + -- primary attitude thruster? + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + -- primary lateral thruster? + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_3", thruster = nil, diff --git a/thrusters.txt.example b/thrusters.txt.example index 4cf82c4..78ca4f0 100644 --- a/thrusters.txt.example +++ b/thrusters.txt.example @@ -1,53 +1,101 @@ return { gyroscopic_propeller_bearing_0 = { + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_0", thruster = nil, transmission = nil, affectVectors = { - yaw = nil, - pitch = "up", - roll = "star", - lateral = nil + angular = { + yaw = nil, + pitch = "up", + roll = "star", + }, + lateral = { + x = nil, + y = "up", + z = nil + } }, power = nil }, gyroscopic_propeller_bearing_1 = { + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_1", thruster = nil, transmission = nil, affectVectors = { - yaw = nil, - pitch = "up", - roll = "port", - lateral = nil + angular = { + yaw = nil, + pitch = "up", + roll = "port", + }, + lateral = { + x = nil, + y = "up", + z = nil + } }, power = nil }, gyroscopic_propeller_bearing_2 = { + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_2", thruster = nil, transmission = nil, affectVectors = { - yaw = nil, - pitch = "down", - roll = "port", - lateral = nil + angular = { + yaw = nil, + pitch = "down", + roll = "port", + }, + lateral = { + x = nil, + y = "up", + z = nil + } }, power = nil }, gyroscopic_propeller_bearing_3 = { + primary_pitch_thruster = true, + primary_roll_thruster = true, + primary_yaw_thruster = false, + primary_altitude_thruster = true, + primary_fore_thruster = false, + primary_aft_thruster = false, type = "rotator", name = "gyroscopic_propeller_bearing_3", thruster = nil, transmission = nil, affectVectors = { - yaw = nil, - pitch = "down", - roll = "star", - lateral = nil + angular = { + yaw = nil, + pitch = "down", + roll = "star", + }, + lateral = { + x = nil, + y = "up", + z = nil + } }, power = nil }