Skip to content
UAVProg
Blocks

Blocks

Beyond the twelve

What the drone and the simulator can do past the starter set — and exactly where the line is today.

Twelve blocks fly an aircraft, and for a first course that is the right number. The machine underneath is a good deal more capable than twelve blocks, and the editor already contains blocks for most of that capability — written for a different aircraft, and not offered in your toolbox.

This page is about what exists. It is worth reading if you are planning a harder mission, deciding whether the platform can carry a topic, or simply curious about the ceiling.

What the twelve leave out

The APEX GD240 category covers movement, height, the camera shutter and the battery. It does not cover:

  • Position. Nothing reports where the aircraft is, and nothing flies to a coordinate — only in a direction, for a time.
  • The world around it. No range finder, no temperature, no light, no gas, no flame.
  • Attitude. No heading, no tilt, no rate of turn.
  • Signalling. No LED, no buzzer.
  • Shapes. No circle, square or triangle as a single instruction; you build those out of fly, rotate, wait and the two Stops, which is arguably the better lesson anyway.

The chain, and where it stops

Every block ends up as one line of Python, calling one method on an object the header created. Whether the block works is a question about the whole chain behind that method.

fly · rotate · throttle · battery

temperature · position · LED

a block from APEX GD240

one line of Python

ApexSimDrone, the session's adapter

Zenoh

no such method: stops here

the simulator

physics, the world, and the sensor suite

The simulator at the bottom is the capable part. The adapter in the middle is the narrow part, and it is narrow on purpose: it exists to make an APEX GD240 behave in the simulator the way an APEX GD240 behaves in a room.

What the simulator senses

The simulator has a real sensor suite with an environment model behind it — temperature and pressure that vary with altitude, a flame with a bearing and a distance, gas that disperses. Sensors are attached per configuration:

ConfigurationSensors
Standard (default)battery, range finder, IMU
Explorer (explorer)+ temperature, barometer, gas, CO₂, light
Rescue (rescue)+ temperature, flame, sound, gas
Surveyor (surveyor)+ barometer, light, temperature

Readings are published continuously — the full sensor set about twice a second, the range finder’s depth frames about fifteen times a second, and flight telemetry at thirty.

A lesson cannot pick one of these configurations today. A lesson’s session profile can name a craft — which changes mass, thrust and motor response, so a heavy airframe sinks where a 27-gram one climbs — but every craft resets the sensors to the standard set. The two id lists look interchangeable and are not.

What a fuller toolbox holds

The editor’s other aircraft, the PMini, has these categories. Every block below is defined and generates working Python; none of it is a sketch.

Drone Commandsgoto a coordinate, move distance in centimetres, turn, rotate by angle, yaw to heading, return home, set velocity, arm / disarm.

Flight Patternsfly circle with a radius, fly square and fly triangle with a side length, flip.

Sensors — the largest category by far:

GroupBlocks
Flight dataposition, velocity, attitude, angular velocity, acceleration, altitude, lidar range
Batteryremaining, voltage, current
Environmenttemperature, humidity, pressure, barometric altitude, gas, light, sound level, CO₂, magnetic field
Detectionflame detected, sound detected, knocked, touching ground

LED & Soundset LED to a named colour, set LED to an RGB triple, play buzzer at a note for a duration.

What the simulator does with each

Not everything that has a block is modelled, and the difference matters if you are planning a mission around one. Three tiers, from the simulator’s own command handling:

TierCommandsWhat happens
Modelledtake off, land, arm, disarm, goto, velocity, yaw to heading, emergency stopReal physics. The aircraft goes there.
Composedfly circle, fly square, fly triangle, move distance, rotate by angle, return homeNot single commands at all — the block writes a short loop of velocity commands and waits. They work anywhere movement works.
Acknowledgedset LED, play buzzer, flip, set speedThe simulator replies “success” and does nothing. These are real on hardware; in the simulator they are silent.

That third tier is not a defect — an LED has nothing to light in a 3D view — but a mission whose goal is “flash green when you find it” cannot be marked by the simulator, and a lesson should not be written as if it could.

Where the line is today

Two specific things stand between this page and a student dragging a temperature block:

  1. The blocks are not offered. The APEX category lists twelve block types; the extended ones belong to the other aircraft’s categories. Every block type is loaded either way — the toolbox simply does not show them.
  2. The adapter has no methods for them. Even offered, get temperature would call something the session’s APEX adapter does not implement. The sensor readings are arriving on the wire; nothing on the APEX side reads them.

Neither is a large change, and neither has been made. Until they are, the honest summary is: the aircraft can do more than twelve things, the simulator models most of it, and the toolbox offers the twelve.