2026-06-29 20:47:53 -05:00
2026-06-25 04:06:21 -05:00
2026-06-29 20:47:53 -05:00
2026-06-25 04:47:19 -05:00

CC:Tweaked, Create: Aeronautics & Create: Avionics | Multi-Thruster Attitude Control Script

This script is mainly designed for large-scale vessels that need attitude stabilisation and (OPTIONAL) automatic control.

This script stabilizes pitch and roll by default, and attempts to gain altitude until the set desired altitude is reached, where it will remain.

The autopilot will always control heading, and will optionally control fore speed until it reaches a set point.

Items like speed, altitude, etc. will be shown on the instrument panel monitor (at least a 1x3 monitor).

Autopilot controls will be shown on the Autopilot Control monitor (at least a 2x2 monitor)

Monitor Information/Controls

Controls

Autopilot Controls

  • Autopilot Master Enable
  • Autopilot Auto Throttle Enable
  • Autopilot Set Heading Enable
    • Note: this will get ignored when the Navigation Table has a valid target
  • Autopilot Heading Hold Value
  • Autopilot Speed Hold Value
  • Altitude Set Enable
  • Altitude Hold Value
  • Master Fly-By-Wire Enable (this will disable all stabilisation features)

Readouts

Instrument Panel Readouts

  • Global Speed (Magnitude of the sum of all speed vectors)
  • Lateral speeds (fore/aft speed, up/down speed, port/starboard speed)
  • Global Acceleration
  • Up/Down Acceleration
  • Altitude
  • Heading
  • Pitch/Yaw/Roll angles

Mods Required

  • Create: Aeronautics
  • Create: Avionics
  • ComputerCraft: Tweaked (CC:Tweaked or CC:T)
  • Create Propulsion: Simulated

You will need

  • As many thrusters as needed to have sufficient thrust for your environment
    • Support for:
      • Create: Aeronautics
        • Gyroscopic Propeller Bearing
        • Propeller Bearing
        • All single-block Propellers
        • TODO: Support for gas_provider type.
      • Create Propulsion: Simulated
        • Fuel, Chemical, and Ion Thrusters
        • Vector & Liquid Vector Thrusters (the script will not take advantage of the thrust vectoring, so it is not reccommended to use them)
  • One (1) Altitude Sensor
  • One (1) Navigation Table
  • One (1) Gimbal Sensor
  • Three (3) Velocity Sensors (Each facing a different cardinal direction)
  • One (1) Advanced Computer
  • At least two (2) Advanced Monitor arrays, one at least 2x2 and one at least 1x3
    • Note: the 2x2 is for autopilot controls and the 1x3 is for flight readouts
    • It is reccommended for the 2x2 to be a convienient place, while the 1x3 should be within your field of view when taking manual control
  • Three (3) analog levers (reccomended: Throttle Levers)
    • Note that these levers will be for forward, reverse, and downards thrust respectively
  • Three (3) Redstone Relays, place these where they will be powered by your analog levers
  • As many wired modems and cable you need to connect all peripherals
    • This includes all explicitly named peripherals, all thrusters/propellers, and for each propeller, every speed-changer block that controls the speed for the propeller's network

Short Instructions

When building your vessel, while connecting each thruster to the network, make sure to note down the thruster's peripheral name when you activate the modem, along with what cardinal directions it will affect when powered (fore, aft, port, starboard, up, and down).

When you are finished, create a lua file at /caero-attitude-control/config/thrusters.txt according to the thrusters.txt.example file. Also, if you have any perisistent config changes, please set them in the /caero-attitude-control/config/config.txt file. Make sure this file exists and contains the thruster.txt file path.

You can change the path of the thruster file (and config file by changing the main lua file) if you need to.

Make sure you trust the code in config.txt and thruster.txt. It will run arbitrarily within the main lua file.

Once you are done, simply run the program and follow the directions that show up on the monitor.

Description
No description provided
Readme 1.1 MiB
Languages
Lua 100%