What you learn today
- Avionics and rocket circuit housing
- Important LogicTypes
- What the game supports
A rocket is a small network of its own that flies into the sky with you. Its chip sits in a rocket circuit housing, and the most important device on board is the avionics. It sums up the whole rocket in numbers: mass, thrust, altitude, destination. This week you read these numbers and build displays and safety rules from them.
The devices on board
| Device | Prefab | Job for the chip |
|---|---|---|
| avionics | StructureRocketAvionics | flight data, destination, landing automation |
| rocket circuit housing | StructureRocketCircuitHousing | holds the chip, like an IC housing |
| engines | StructureRocketEngine… | On, Setting, exhaust values |
| gas capsule tanks | StructureMediumRocketGasFuelTank and others | pressure, moles and gas ratios of the fuel |
| cargo storage | StructureCargoStorageSmall, …Medium | Quantity of the cargo |
| rocket miner | StructureRocketMiner | On, DrillCondition |
The most important LogicTypes of the avionics
| LogicType | read/write | meaning according to the game |
|---|---|---|
Altitude | read | altitude above the surface, −1 in space |
Mass | read | total mass in kg including fuel and cargo |
DryMass | read | mass in kg without fuel |
Thrust | read | thrust of all engines in newtons |
Weight | read | weight in newtons, depends on gravity |
ThrustToWeight | read | thrust divided by weight |
BurnTimeRemaining | read | estimated seconds until the fuel runs out at the current usage |
CurrentCode | read | address of the current place on the space map |
DestinationCode | read and write | address of the destination |
AutoLand | write only | engages the landing automation |
AutoShutOff | read and write | switches off all devices of the rocket at the destination |
On top of that come values like Apex, ReEntryAltitude, TimeToDestination and Progress, which you will need in the next days.
What the chip can do
It may read everything in the table. It may only write what the game allows: the destination, the landing automation, the shut-off at the destination, plus On, Open and Mode. AutoLand cannot be read back – that is why the chip remembers itself whether the automation is running.
define AVIONIK HASH("StructureRocketAvionics") # rocket avionics
lbn alt AVIONIK HASH("Avionik") Altitude Average
sltz inSpace alt # -1 means: in space
lbn twr AVIONIK HASH("Avionik") ThrustToWeight Average
Altitude is −1 in space. A rule like “below 100 altitude, landing light on” would trigger there immediately. So first check whether the altitude applies at all, and treat −1 as a state of its own.
Exercise
Task
Build the rocket's status panel. The avionics is called “Avionik”. The display “Hoehe” shows Altitude, the display “TWR” the thrust-to-weight ratio with two decimals. The light “ImAll” is lit while the rocket is in space. If the avionics is missing, “Avionik_Fehler” flashes and both displays show -999.
Hints
Hint 1
In space Altitude is −1: sltz detects that. NaN gives 0 there, the light stays off.
Hint 2
Two decimals: mul by 100, round, div by 100.
Hint 3
Fault value with select … ok … FEHLWERT, where ok = snanz alt.
Quiz
4 questions. You pass from 60 % – the server does the grading.
Complete the day
- Passed the simulator exercise
- Passed the quiz with at least 60 %
Without an account progress is saved in this browser only.
Report a mistake in this lesson
Please sign in to report. Sign in