Here is a beginner's tutorial.
command:set-value:depth-limit
- Now set on the LCD screen menu.command:set-value:skip-depth
- Now set on the LCD screen menu.command:set-role
- Now determined by the script. (Separate scripts for agent and dispatcher.)command:set-value:max-generations
- Now set on the LCD screen menu.command:static-dock
- Has been removed along with the Lone
role.command:static-dock-gps
- Has been removed along with the Lone
role.command:set-value:getAbove-altitude
(Agent) - Value now controlled centrally by the dispatcher, and distributed to the agents automatically.command:set-value:getAbove-altitude
(Dispatcher) - Now set on the LCD screen menu.command:set-value:echelon-offset
- Now set on the LCD screen menu.A task is a collection of jobs (shafts), and is usually processed by a dispatcher.
A job is shaft, processed by an individual agent. The dispatcher will usually assign a job to the individual agents.
An agent will drill down in three phases:
skip-depth
, without taking on stone/ore/ice. (*)least-depth
, picking up stone/ore/ice. depth-limit
, but only if there is ore or ice.(*) The agent actually takes on a some stone/ore/ice, but only into the inventory of the drills. These are disconnected from the conveyor system.
Note that depth-limit
is stronger than least-depth
, e.g. when the latter is greater than the former, the agent will stop at depth-limit
.
The following subsections contain parameter sets for typical mining tasks.
Mine ore that is on the surface. This is typical for asteroid deposits, or surface ice on planets.
skip-depth
to 0.least-depth
to 0.depth-limit
to a high value, e.g. 50 m. The agent will finish the shaft when there is no more ore/ice being picked up by the drills.Mine ore that is below the surface, under a layer of dirt or rock.
First, drill a pilot shaft:
skip-depth
to 0 to a high value, depending on whether you want to pick up material from the pilot shaft.least-depth
to the expected depth of the ore plus 5 m. The expected depth can be detected with an ore detector.depth-limit
to least-depth
plus 30 m.Observe at which depth the agent picks up useful ore. The value is displayed on the LCD GUI. Then:
skip-depth
to a 5 m above the start of the ore.least-depth
to the start of the ore, or slightly deeper (round to full 5m).depth-limit
to the end of the ore, or slightly deeper.Typically, there is ore below ice, sometimes with a layer of rock in between.
Proceed as with subsurface ore, but make sure that least-depth
and depth-limit
values are sufficiently high. So that the agent will drill through the deepest ore layer.
Sometimes you just want the mining drones to excavate a site.
Set skip-depth
, least-depth
and depth-limit
to the same value.
TBD
On the dispatcher, there are two groups of dispatching parameters:
Task Parameters are used when creating a new task. Parameters of the existing task cannot be changed.
Job Parameters are used whenever the dispatcher sends a new job to an agent. When the parameters are changed while a task is being processed, all planned jobs of that task are changed. This allows drilling a pilot shaft first, then adjusting the parameters for the remaining shafts.
Both types of parameters can be managed on the GUI LCD. (since v0.10.0)
1.0
, or there will be collisions.0
, then only the center shaft will be drilled. Usual values are between 3
and 8
.depth-limit
. See section Job processing for explanation.skip-depth
. See section Job processing for explanation.adjust-entry-by-elevation
. When the terrain is not perpendicular to the mining plane, some shafts begin a few meters lower. The agent can try to skip these, for faster processing.1
, two adjacent shafts may not be processed at the same time.An agent can be called back to base with the force-finish
command. The agent will return to base, unload, and assume the Disabled
state.
The recall command can be issued in four different ways:
command:force-finish
on the agent's PB.command:global:command:force-finish
on the dispatcher's PB. This will recall all agents.A recall flag R
will show up on the GUI screen for the recalled agent.
TBD: Do agents abandon the current job (if they have one)?
The dispatcher logs events to an LCD panel. The LCD panel should be a wide LCD, if possible. In order to connect an LCD screen to the dispatcher, execute the command command:add-logger:my_lcd_name
, where my_lcd_name
is the name of the LCD.
The verbosity of the log can be controlled by changing the logLevel
variable at the beginning of the dispatcher script.
TBD
Agents will broadcast a message on miners.handshake
on startup. Any dispatcher in range can respond with a miners.handshake.reply
message, and take the agent into its service. //TODO: Agents must confirm this with another message to avoid becoming the servant to multiple masters.
An agent will initiate a handshake when its PB is recompiled.
A dispatcher will broadcast miners
/dispatcher-change
when its PB is recompiled. All agents picking up that broadcast will forget about their master and start handshaking again!
The handshake will fail, if agent and dispatcher run different software versions. The version can be found in the info box of the programmable block, or at the beginning of the code in variable Ver
.
command:create-task
Starts a mining task:
command:create-task
.circular-pattern-shaft-radius
, the normal vector and the center point of the mining task to the dispatcher in a create-task
message. This is only at task proposal at this point.miners.command
/ command:clear-storage-state
broadcast.miners.normal
message.command
/ mine
message to all same-group agents.A task can only be created when all agents are either Disabled
or Idle
.
command:init-airspace
Forcibly re-initialises the airspace geometry. This usually leads to undefined agent flight behaviour, including possible collisions.
This command exists for rare situations, and should only be called by experts. The airspace is automatically initialised when a new task is created.
ATC pevents collisions in mid-air. It grants permissions to the agents when it is safe for them to proceed into protected areas of the airspace.
Generally, agents move along horizontal planes, so called flight levels. Each agent has its own flight level. Flight levels are assigned when an agent requests any airspace lock.
Agents can also move vertically, accross the flight levels of other agents. This happens at the mining site, or near the base. Agents must aquire a local airspace lock for that:
mining-site
base
Base and mining site must not overlap, or there will be undefined behaviour.
The position and orientation of the flight levels w.r.t. world coordinates is fixed when a new task is created. This is because a task can only be created, when all agents are either docked or under manual control. (state Disabled
or Idle
) This step is called airspace initialization.
How exacly the airspace is initialized depends on the situation:
Setup | Flight Level Orientation | Flight Level Position |
---|---|---|
Planetary Base | orthogonal to gravity | getAbove-altitude above the highest docking port |
Rover | orthogonal to gravity | getAbove-altitude above the highest docking port |
Space (Carrier) | orthogonal to docking port axis | getAbove-altitude away from the most protuding docking port |
A re-initialization of the airspace can be forced by executing command:init-airspace
on the dispatcher. Doing this while agents are on the air may yield undefined behaviour!
It is important that mobile dispatchers are not moving during mining operations. However, a small deviation can be compensated.
Airspace locks can be monitored on the LCD GUI on the agent list.
For flight levels, there is a separate page on the GUI. (since v0.11.0)
getAbove-altitude
) It can be changed while the task is running, but already granted flight levels cannot be revoked.Another specific task of ATC is the assignment of docking ports. Agents will request a docking port, and the dispatcher will assign a free port for landing.
TBD: What happens whan all docking ports are busy? TBD: Naming of ports
apck.depart.approach
(ATC)apck.depart.complete
(ATC)apck.depart.request
(ATC)MinerState.WaitingForDocking
)apck.docking.approach
(ATC)apck.docking.request
(ATC)apck.docking.approach
(ATC)apck.depart.approach
(ATC)apck.ntv.update
(ATC/ILS)miners
(ATC)common-airspace-ask-for-lock
broadcast, granting an airspace lock.miners.handshake.reply
(Dispatching)miners.handshake
.miners.normal
(Dispatching)command
/mine
.miners.resume
(Dispatching)command
mine
is sent when starting a new task. TODO: Will agents ask for a shaft assignment? report.request
(Dispatching)miners.command
is used by the dispatcher to issue commands to the agents.miners.handshake
is used by the agents to announce their availability to potential dispatchers.miners
is used for air traffic control (ATC).miners.report
is used by the agents to transmit status reports.common-airspace-ask-for-lock
(ATC)miners
.miners
message with a common-airspace-lock-granted
payload.common-airspace-lock-released
(ATC)miners
.command:halt
miners.command
.command:clear-storage-state
miners.command
.command:dispatch
(Dispatching)miners.command
.command:force-finish
(Dispatching)miners.command
.miners.handshake
(Dispatching)miners.handshake
.miners.handshake.reply
to accept the agent into its service.