Weather instruments

Five instruments read the air around them. Each is a block with a dial and a peripheral; on a ship, the avionics controller bridges them like any other peripheral.

Block Type Reads Unit
Thermometer thermometer air temperature C
Hygrometer hygrometer relative humidity, 0..1 rh
Barometer barometer static pressure hPa
Rain gauge rain_gauge precipitation rate, plus the total collected mm/h
Almanac almanac progress through the year, or the moon's cycle year or moon

Every instrument has getValue, getUnit and read; see instrument. The rain gauge and almanac add methods of their own.

Readings are taken once a second and cached on the block, so polling is cheap. An instrument measures at its position in the world: on an airship, it reads the air the airship is flying through, not the air of the plot the ship's blocks are kept in.

Where the readings come from

Instruments don't talk to climate mods directly. The source field of read says where a value came from.