Skip to content

Add RC-aircraft & autonomous drone implementation guidelines with multi-language firmware skeletons#24

Merged
smaruf merged 14 commits intomainfrom
copilot/create-guideline-for-rc-aircraft
Mar 18, 2026
Merged

Add RC-aircraft & autonomous drone implementation guidelines with multi-language firmware skeletons#24
smaruf merged 14 commits intomainfrom
copilot/create-guideline-for-rc-aircraft

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

Adds a structured reference under remote-aircraft/ covering the full implementation spectrum for RC-aircraft and fully autonomous drones — from structural design through production-grade deployment across four languages.

Guidelines (remote-aircraft/guidelines/)

Six markdown documents covering each requirement dimension:

File Covers
01-structural-implementation.md Airframe taxonomy, materials, load-path formulae, spar/rib sizing, structural checklists
02-active-passive-components.md BLDC motors, ESCs, servos, battery chemistry, IMU/GPS/LiDAR sensors, FC selection; BOMs for all 3 tiers
03-firmware-guide.md Bare-metal C → MicroPython → ArduPilot/PX4 → proprietary; OTA signing, SITL/HITL
04-complexity-levels.md Simple (hobby) / Medium (prosumer mapping) / Production (supply logistics, ISR, loitering munition architecture); decision matrix
05-multilang-guide.md Python, TinyGo, Zig, basic-C — comparison matrix, code patterns, toolchain setup, cross-language FFI
06-autonomous-drone-guide.md EKF3 sensor fusion, Dubins/RRT* path planning, DAA (RTCA DO-365), MAVLink signing, C2 redundancy, ROS2/PX4

Firmware skeletons (remote-aircraft/firmware/)

12 runnable skeletons — 4 languages × 3 complexity tiers:

Tier What it demonstrates
simple/rc_basic.* PWM pass-through, interrupt-driven input, no RTOS
medium/autopilot_medium.* PID attitude stabilisation, MAVLink telemetry, arming state machine
production/autonomous_drone.* Mission manager, triple-IMU voting, safety monitor, hex-X mixer, MAVLink heartbeat

Example — Zig comptime PID (zero-allocation, production tier):

const PidGains = struct { kp: f32, ki: f32, kd: f32 };

const PidState = struct {
    integral: f32 = 0.0,
    prev_error: f32 = 0.0,

    pub fn update(self: *PidState, g: PidGains,
                  setpoint: f32, measured: f32, dt: f32) f32 {
        const err = setpoint - measured;
        self.integral = std.math.clamp(self.integral + err * dt, -400.0, 400.0);
        const deriv: f32 = if (dt > 0) (err - self.prev_error) / dt else 0.0;
        self.prev_error = err;
        return g.kp * err + g.ki * self.integral + g.kd * deriv;
    }
};

Example — Python MAVSDK mission runner (production tier):

async def run_mission(connection_url: str, waypoints: List[Waypoint]) -> None:
    drone = System()
    await drone.connect(system_address=connection_url)
    await preflight_health_check(drone)          # GPS, IMU, battery check
    await drone.mission.upload_mission(build_mission_plan(waypoints))
    await drone.action.arm()
    await drone.action.takeoff()
    await drone.mission.start_mission()
    # safety_watchdog runs concurrently: RTL on low battery or link loss

Notes

  • All busy-wait delay stubs in Zig/C are clearly annotated with warnings to replace with SysTick/hardware timer before use on real hardware.
  • .gitignore updated to exclude root/ Go module cache artifacts.

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copy link
Copy Markdown
Owner

@smaruf smaruf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, add gasoline-based engines for drones

@smaruf smaruf marked this pull request as ready for review March 18, 2026 07:17
Copilot AI changed the title [WIP] Add guidelines for implementing RC aircraft and autonomous drones Add RC-aircraft & autonomous drone implementation guidelines with multi-language firmware skeletons Mar 18, 2026
Copilot AI requested a review from smaruf March 18, 2026 07:19
@smaruf smaruf merged commit c413ccc into main Mar 18, 2026
1 check failed
Copilot AI requested a review from smaruf March 18, 2026 07:20
Copilot stopped work on behalf of smaruf due to an error March 18, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants