Five layers.
No controller.
Skein is not a drone. It's the software layer between an airframe and a mission — flight control, deconfliction, task allocation, perception, and multi-aircraft physical action, built so that removing any one aircraft degrades coverage and nothing else.
Written in C++ inside Unreal Engine 5.4.4, with the perception service in Python. Every subsystem below is implemented and running, not specified.
Layer 01 · Flight control
Six independent PID axes
Each aircraft runs six separate proportional-integral-derivative controllers — roll, pitch, yaw for orientation; altitude, forward, right for translation. Each holds its own gains, integral accumulator, and previous error, so a lateral correction never destabilises the altitude hold.
u(t) = Kp·e(t) + Ki∫e(τ)dτ + Kd·de(t)/dt
- Anti-windup clamping bounds the integral term between IntegralMin and IntegralMax, so a sustained error under actuator saturation can't accumulate into an overshoot.
- Output clamping keeps the control signal inside physical limits — no commanded thrust the motors can't deliver.
- Reset on arrival zeroes every controller once the aircraft is inside tolerance of its target, so it settles instead of hunting.
Layer 02 · Deconfliction
Potential-field collision avoidance
Every aircraft continuously sums repulsion vectors from the neighbours and obstacles inside its avoidance radius. Force follows an inverse-square law, so a distant aircraft barely registers and a close one dominates the trajectory.
Frep = Σ (Q · n̂) / D² · n̂ = (Pself − Pother) / ‖Pself − Pother‖
- Obstacles are found by sphere trace against world geometry each tick — no prior map required.
- A MinDistance floor prevents the force exploding as separation approaches zero.
- The resulting vector is clamped and summed with the PID movement force, so avoidance bends the path rather than overriding it.
Layer 03 · Task allocation
Self-claimed search cells
The search area is divided into a grid. Each aircraft independently requests an unsearched cell, checks it isn't already claimed, and takes it. There is no assigner — coverage is an emergent property of every aircraft claiming the nearest free ground.
// each aircraft, independently, every tick
FVector Proposed = FindUnsearchedCell();
if (!IsCellOccupied(Proposed)) {
FScopeLock Lock(&GridLock); // no double-claims
TargetPosition = Proposed;
bIsSearching = true;
}
- A scoped lock on the shared grid prevents two aircraft racing for the same cell.
- Losing an aircraft mid-mission releases its cell back to the pool. The swarm reallocates without being told.
Layer 04 · Perception
Onboard detection at 30 FPS
Each aircraft renders its camera to a texture, compresses to JPEG, and streams frames over UDP to a detection service running a custom-trained YOLOv8 model on CUDA. Detections above 0.90 confidence return the bounding-box centre, which is deprojected from screen space to a world coordinate and range-checked with a line trace.
- Frames captured every 0.033 s — roughly 30 FPS per aircraft.
- Inference isolated in a separate process, so a perception fault can't take down flight control.
- Tensors converted HWC → CHW and normalised on-device; the model is swappable per mission.
Layer 05 · Coordinated physical action
Consensus formation and net extraction
This is the layer almost no swarm platform has. When an aircraft detects the subject it becomes the leader — not by election overhead, but because it is the one that found the target. The remaining aircraft converge on formation slots defined relative to the leader and hold that geometry while a rescue net is deployed and carried to a safe drop-off point.
vi = Kp(Pi − xi) + Kc Σj∈Ni(xj − xi − dij)
- Each aircraft holds position using only its own slot error and its neighbours' relative positions — no global state.
- Velocity is smoothed through interpolation, so the formation converges without oscillation.
- Only the leader needs the drop-off coordinate. Followers need nothing but the leader's relative position — the smallest possible message on a degraded link.
- If an aircraft drops out of formation, a waiting aircraft takes its slot. The geometry survives the loss.