What you learn today
- Aim it
- Signal strength
- Recognise contacts
A trader is circling somewhere above the base, but the dish points in the wrong direction. According to the Stationpedia a satellite dish can contact nearby trade vessels – together with a computer with a communications motherboard, a landing pad and a vending machine. It can be aimed by hand or via logic. Today the chip takes care of that.
The values of the dish
| LogicType | read/write | meaning according to the game |
|---|---|---|
Horizontal, Vertical | read and write | alignment of the dish |
SignalStrength | read | angular offset to the strongest contact in degrees |
SignalID | read | ID of the strongest contact |
WattsReachingContact | read | power arriving at the contact – drops the further off the dish points |
MinimumWattsToContact | read | minimum power for the contact |
InterrogationProgress | read | progress of interrogating the current target, 0 to 1 |
ContactTypeId | read | type of the contact |
BestContactFilter | read and write | limits the automatic target choice to one ReferenceId |
The dish comes in small, medium and large (StructureSmallSatelliteDish, StructureSatelliteDish, StructureLargeSatelliteDish), all with the same values.
SignalStrength sounds like strength, but it is an offset: smaller is better. The actual strength is in WattsReachingContact.
Aiming
The dish does not tell you in which direction the contact lies, only how well it is hitting right now. A sweep helps: turn the angle one step further, measure, remember the best angle. That is the linear search from algorithm week:
add angle angle SCHRITT
mod angle angle 360
sbn SCHUESSEL HASH("Schuessel") Horizontal angle
sleep 2 # give the dish time to turn
lbn watt SCHUESSEL HASH("Schuessel") WattsReachingContact Average
sgt tmp watt best
select bestAngle tmp angle bestAngle
max best best watt
After a full round you set the dish to bestAngle and refine with smaller steps. Give it time after every step before you measure – it does not turn within the same tick.
Recognising contacts
Whether a contact can be reached is decided by the comparison WattsReachingContact ≥ MinimumWattsToContact. InterrogationProgress then shows how far the interrogation has got. A display with the progress in percent and a light “Kontakt” are enough for everyone in the base to see what the dish is doing right now.
Exercise
Task
Build the contact display for the dish “Schuessel”. The light “Kontakt” is lit when WattsReachingContact reaches at least MinimumWattsToContact. The flashing light “Ausrichten” flashes when the offset is above 5 degrees. The display “Fortschritt” shows InterrogationProgress in percent. If the dish is missing: contact off, realign on, display -1.
Hints
Hint 1
Contact: sge tmp watt minimum – NaN gives 0, the light goes off on its own.
Hint 2
Realign: sgt tmp offset MAX_ABW, forced with select tmp ok tmp 1 when the dish is missing.
Hint 3
Progress: mul by 100, round, fault value with select.
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