Create: Computing AgesBrass Docs
Devices

Propellers

The propellers of Create Aeronautics read by a computer: how hard they push, how fast the air goes through them, whether they turn, and which way the small ones blow.

Needs Create Aeronautics

The Propeller Bearing, the Gyroscopic Propeller Bearing and the small propellers (Andesite, Wooden and Smart Propeller) are blocks of Create Aeronautics. Without that mod, there is no such block, and peripheral.find("propeller_bearing") returns nil.

A Propeller Bearing turns the sails glued in front of it into a propeller: that is what moves a Create Aeronautics ship forward, turns it, or lifts a helicopter. A computer connected to one reads the thrust of the propeller, the speed of the air it blows, and whether it turns: enough to check that every engine of a ship works, to compare them, or to know what a turn of the throttle really gives.

Both bearings, the plain one and the gyroscopic one, have the peripheral type propeller_bearing. Against the computer, a bearing is called by its side ("top"...); on a Data Cable (Minicomputer and newer) it gets a name such as propeller_bearing@3,70,-8. peripheral.list("propeller_bearing") gives the names of all of them.

Brass
local prop = peripheral.find("propeller_bearing")
print("thrust " .. prop.thrust() .. ", air " .. prop.airflow() .. " m/s")

The small propellers are propellers in a single block, with no sails to build: the Andesite Propeller, the Wooden Propeller and the Smart Propeller, of types andesite_propeller, wooden_propeller and smart_propeller. They have the same three readings as the bearings, and a program can reverse them (see "Small propellers" below).

Also a kinetic block. Every propeller is a Create machine that turns, so the wrapped propeller also has the methods of Create kinetic blocks, such as speed(), the speed of its shaft in RPM. The speed itself is set where the rotation comes from, often a Rotation Speed Controller (kinetic.set_speed()).

Every reading at once. Like the sensors, it has a read() (see sensor.read()) whose table holds thrust, airflow and active, plus reversed on a small propeller and tilt on a Smart Propeller.

When the propeller is gone, its methods stop the program with propeller bearing removed (andesite propeller removed... for a small one); when its chunk is not loaded, with peripheral is not loaded.

Methods
prop.thrust()How hard the propeller pushes now: sails ^ 1.5 × RPM × 0.2 with the default settings, from the propeller's own speed. 0 while the bearing has no propeller (not assembled) or does not turn.
prop.airflow()The speed of the air the propeller blows, in blocks per second (Engineer's Goggles write m/s: the same thing). It grows with the speed of the propeller and with the square root of its number of sails: sqrt(sails) × RPM × 0.05 with the default settings (server config propellerBearingAirflow).
prop.active()true while the bearing has a propeller (it is assembled) and that propeller turns, even slowly. false when the bearing stands still or has no propeller: then thrust() and airflow() are 0.
prop.thrust()How hard the propeller pushes now: its own speed in RPM times 1 with the default settings, with the sign of the direction. It follows the shaft with a short delay, and is 0 when the propeller stands still.
prop.airflow()The speed of the air the propeller blows, in blocks per second: a tenth of its speed in RPM with the default settings.
prop.active()true while the propeller turns, even slowly; false when it stands still, and then thrust() and airflow() are 0.
prop.reversed()true when the propeller is reversed (by a Wrench or by a program): the same rotation pushes the other way.
prop.set_reversed(reversed)Reverses the propeller (true) or puts it back (false), as a Wrench on its blades does, at the end of the tick. Returns nothing. Without touching the shaft, a program flips the push of a propeller, for example to back a ship away from a dock.
smart.tilt()How far the Smart Propeller tilts from its block to keep facing the sky, in degrees, from -45 to 45; the sign tells which way. It grows as its vehicle leans along that axis, and stays at the limit beyond 45 degrees. 0 on the ground. Only the Smart Propeller has it.

How a propeller pushes

Four things to know before reading the numbers:

1. Sails and speed. The thrust grows with the number of sails and with the speed of the propeller: sails ^ 1.5 × RPM × 0.2 with the default settings (server config propellerBearingThrust for the 0.2). Twice the speed gives twice the thrust; four times the sails, eight times the thrust. The sails are the blocks a windmill counts (Windmill Sails, Sail Frames, wool, Symmetric Sails).

Brass
local function thrust(sails, rpm)
  return sails ^ 1.5 * rpm * 0.2
end

print(thrust(4, 64))
print(thrust(16, 64))
print(thrust(16, 128))
Screen
102.4
819.2
1638.4

2. The propeller takes time to spin up. Its speed follows the speed of the shaft, but not at once: a small propeller catches up quickly, a big one (dozens of sails) takes a second or two. The thrust follows the propeller, so it lags behind speed(), which is the shaft.

3. The sign is the direction. Thrust and airflow are positive when the propeller blows the air out past its sails and pushes the ship towards the back of the bearing, negative the other way. Turning the shaft the other way flips the sign, and so does the thrust direction set on the bearing.

4. The ship gets less when it moves. thrust() is what the propeller gives with the ship at rest, at sea level. A ship already moving the way the propeller pushes it gets less (the air is already moving), and so does a ship high up, in thin air (see altitude_sensor.pressure()). Engineer's Goggles show that smaller push, so they can read less than thrust().

The Gyroscopic Propeller Bearing has the same methods. It tilts its propeller towards the sky, up to 12 degrees from its axis, to keep a helicopter upright; any redstone signal on it locks the propeller straight. The tilt changes where the thrust goes, not how much there is.

Readings

#

prop.thrust()

→ number

How hard the propeller pushes now: sails ^ 1.5 × RPM × 0.2 with the default settings, from the propeller's own speed. 0 while the bearing has no propeller (not assembled) or does not turn.

Returns
number
the thrust of the propeller now, with a sign; 0 when it has no propeller or stands still

Its sign gives the direction (see above): compare math.abs values to tell the strongest engine. A check of every propeller of a ship, the weakest first:

Brass
local props = {}
for _, name in ipairs(peripheral.list("propeller_bearing")) do
  table.insert(props, {name = name, thrust = math.abs(peripheral.wrap(name).thrust())})
end
table.sort(props, function(a, b) return a.thrust < b.thrust end)
for _, p in ipairs(props) do
  print(string.format("%-28s %8.1f", p.name, p.thrust))
end

See also propeller_bearing.airflow() propeller_bearing.active()

#

prop.airflow()

→ number

The speed of the air the propeller blows, in blocks per second (Engineer's Goggles write m/s: the same thing). It grows with the speed of the propeller and with the square root of its number of sails: sqrt(sails) × RPM × 0.05 with the default settings (server config propellerBearingAirflow).

Returns
number
the speed of the air through the propeller, in blocks per second, with the sign of the thrust

The airflow also says how fast the propeller can push the ship: once the ship moves through the air as fast as the propeller blows it, the push that reaches the ship falls to nothing.

Brass
local prop = peripheral.find("propeller_bearing")
print(string.format("air through the propeller: %.1f blocks/s", math.abs(prop.airflow())))

See also propeller_bearing.thrust()

#

prop.active()

→ boolean

true while the bearing has a propeller (it is assembled) and that propeller turns, even slowly. false when the bearing stands still or has no propeller: then thrust() and airflow() are 0.

Returns
boolean
true while the propeller is assembled and turning

An engine alarm: a lamp on top of the computer lights up when one of the ship's propellers stops.

Brass
while true do
  local stopped = false
  for _, name in ipairs(peripheral.list("propeller_bearing")) do
    if not peripheral.wrap(name).active() then
      stopped = true
    end
  end
  rs.set("top", stopped)
  sleep(1)
end

To steer a ship with a propeller, see the heading hold of vehicle.spin(); to lift it with balloons, Hot Air Burner.

See also propeller_bearing.thrust()

Small propellers

The Andesite Propeller, the Wooden Propeller and the Smart Propeller are turned by a shaft at their back, and have no sails to count. With the default settings, their thrust is their speed in RPM, and their airflow a tenth of it in blocks per second (server configs andesitePropellerThrust, woodenPropellerThrust, smartPropellerThrust and the matching ...Airflow). The Wooden Propeller has wider blades than the Andesite one. As with the bearings, the propeller spins up behind its shaft (in under a second), the sign of the readings gives the direction, and the ship gets less push while it moves or flies high.

A Wrench on the blades of a small propeller (its front, or the top of a Smart Propeller) reverses it: the same rotation then pushes the other way. A program does it with small_propeller.set_reversed().

The Smart Propeller stands on a shaft coming from below (or hangs under one, placed on a ceiling) and pushes along the vertical. On a vehicle that leans, it tilts on one axis, up to 45 degrees, to keep facing the sky.

These methods are on the three small propellers, except tilt, which only the Smart Propeller has.

#

prop.thrust()

→ number

How hard the propeller pushes now: its own speed in RPM times 1 with the default settings, with the sign of the direction. It follows the shaft with a short delay, and is 0 when the propeller stands still.

Returns
number
the thrust of the propeller now, with a sign; 0 when it stands still
Brass
local prop = peripheral.find("andesite_propeller")
print(prop.thrust(), prop.airflow())

See also small_propeller.airflow() small_propeller.reversed()

#

prop.airflow()

→ number

The speed of the air the propeller blows, in blocks per second: a tenth of its speed in RPM with the default settings.

Returns
number
the speed of the air through the propeller, in blocks per second, with the sign of the thrust
#

prop.active()

→ boolean

true while the propeller turns, even slowly; false when it stands still, and then thrust() and airflow() are 0.

Returns
boolean
true while the propeller turns
#

prop.reversed()

→ boolean

true when the propeller is reversed (by a Wrench or by a program): the same rotation pushes the other way.

Returns
boolean
true when the propeller is reversed

See also small_propeller.set_reversed()

#

prop.set_reversed(reversed)

Reverses the propeller (true) or puts it back (false), as a Wrench on its blades does, at the end of the tick. Returns nothing. Without touching the shaft, a program flips the push of a propeller, for example to back a ship away from a dock.

Parameters
reversed boolean
true to reverse the propeller, false for its normal way
Brass
local prop = peripheral.find("andesite_propeller")
prop.set_reversed(not prop.reversed())

See also small_propeller.reversed()

#

smart.tilt()

→ number

How far the Smart Propeller tilts from its block to keep facing the sky, in degrees, from -45 to 45; the sign tells which way. It grows as its vehicle leans along that axis, and stays at the limit beyond 45 degrees. 0 on the ground. Only the Smart Propeller has it.

Returns
number
how far the Smart Propeller tilts, from -45 to 45 degrees; 0 off a vehicle
Brass
local smart = peripheral.find("smart_propeller")
print(string.format("tilted %.1f degrees", smart.tilt()))

See also vehicle.rotation()