1. Podcasts
  2. Software Engineering Radio - the podcast for professional software developers
  3. SE Radio 745: Andrew Tridgell on Flight Control Software
Software Engineering Radio - the podcast for professional software developers

4 Nov 2026 · 58m · 25 chapters

Episode artwork

SE Radio 745: Andrew Tridgell on Flight Control Software

In short

Flight control software for unmanned vehicles, focusing on ArduPilot’s architecture, sensors/actuators, control loops (cascaded PID), state estimation (multi-lane EKF), and testing/release practices.

Guests

Dr. Andrew Tridgell, associate professor at Australian National University; open-source contributor (co-developed original rsync; Samba file sharing); involved since 2011 with ArduPilot; systems lead for ArduPilot; occasional consulting via Aerial Robotics Australia.

Key claims

ArduPilot supports many vehicle classes (multi-rotors, VTOL fixed wing, rovers, boats, submarines) and many hardware platforms (STM32 H7 variants, Linux boards, Qualcomm/Zephyr/other ports). Flight control uses a thread-per-bus model; state estimation uses multiple EKFs per IMU (“lanes”) with innovation-based lane switching. Control is cascaded PID: rate PID (gyro), then attitude, velocity, position, and navigation; fast rate loops can run 2–4 kHz. Robustness comes from EKF fusion and careful handling of estimator “jumps.”

Notable examples

VTOL back-transition overshoot/oscillation diagnosed in SITL; quadcopter “selfie” scenario where a sudden 50 cm estimator jump could be dangerous; GPS/GNSS terminology and typical U-blox F9P receivers; Renode microcontroller emulation for deeper testing.

Written by AI. May contain mistakes.

Chapters

0:45

Meet Andrew Tridgell

Dr. Andrew Tridgell discusses his background and work in flight control software.

“ArduPilot is a key open source project providing firmware for radio-controlled aircraft and other vehicles.”
3:00

Types of UAVs and Their Uses

Overview of various unmanned aerial vehicles and their applications.

“There's an amazing range of configurations, including ones where the configuration changes while you're flying, sort of wings rotating to become supports for VTOL motors.”
4:50

Innovative Aircraft Configurations

Discussion on the different configurations of drones and aircraft.

“And apart from that, we do anything that moves and quite a few things that don't move as well.”
8:00

Terminology in UAVs

Clarifying definitions of UAV, UAS, and other terms related to drones.

“So GPS is the American constellation of satellites.”
9:10

Hardware Components of UAVs

Exploration of the primary hardware components found in UAVs.

“And we support lots of different flight controllers, something like 300 odd different flight controller types and boards and peripherals.”
12:20

Actuators and Power Systems

Understanding the outputs and power systems used in drones.

“And of course, there's the underwater thrusters for submarines, which have a different design because hydrodynamics is a bit different from aerodynamics.”
14:00

Hydraulic Motors in Flight

Learn about the surprising applications of hydraulic motors in aviation.

“So hydraulic motors, absolutely marvellous.”
15:00

Understanding Flight Controllers

Discover the role and functionality of flight controllers in RGPilot.

“it going in a simulator and see how the control systems are going to work and to make it go.”
17:00

Layers of Flight Control Firmware

Explore the different layers of abstraction in flight control systems.

“So that's nice, brings up a whole range of new possibilities.”
19:40

State Estimation and EKF

Learn how state estimation is achieved using Extended Kalman Filter (EKF).

“And so a huge amount of work goes into the state estimation.”
Show all 25 chapters
21:40

Robustness through Multiple EKFs

Understand how multiple EKFs enhance robustness in flight control.

“So the robustness is at several different levels.”
23:40

Handling EKF Lane Switching

Learn about the challenges and solutions related to EKF lane switching.

“So we've got lots of remediations to try to prevent it causing an issue, but I can give you an example before we put in some of these remediations.”
25:50

Introduction to PID Control Systems

Gain insights into PID control systems and their applications in drones.

“So one other term that you mentioned is a PID cascade, I believe you called it.”
28:00

Understanding PID Control in Drones

Learn about the different levels of PID control used in drone flight dynamics.

“So ACRO drone, FPV drone is just a single level, not cascaded PID.”
29:20

Cascading Control Architecture Explained

Explore how cascading PID levels affect drone navigation and stability.

“So to make sure I've understood that, let's imagine that our pilot wants their quadcopter drone to fly forwards.”
31:30

Control Bandwidth and Rate Requirements

Understand the importance of control bandwidth and rate settings for drone stability.

“with impacts on, you know, you might be using a barometer for height and the thrust, the change in the thrust angle impacts the barometer and actually changes the pressure.”
33:40

Archipilot's Code Structure and Libraries

Discover how Archipilot organizes its code base and manages subsystems.

“And then you're running the attitude loop at say 400 hertz or 600 hertz.”
36:40

Testing Procedures in Archipilot Development

Learn about Archipilot's lifecycle for testing new features and subsystems.

“So this is firmware for DPSs or airspeed sensors or whatever, which run their own microcontrollers, typically on drone cam.”
39:20

Firmware Storage and Custom Builds

Explore the challenges of firmware storage and the custom build system in Archipilot.

“They get told in their ground station software, hey, there's a new release out.”
42:01

Transition from 8-bit to 32-bit Microcontrollers

Learn about the evolution from 8-bit to more powerful 32-bit microcontrollers in flight control software.

“And so, you know, we ran out of space on those and ceased supporting those many years ago to move to the 32-bit platform.”
43:25

Understanding SITL Testing

Explore the structure and benefits of Software In The Loop testing in flight software.

“Just to clarify for our listeners, can you explain architecturally what that looks like and what exactly is happening there?”
48:28

Using Renode for Microcontroller Emulation

Learn how Renode allows for deep emulation of microcontrollers and facilitates debugging.

“And you've got these observability problems.”
51:04

Community Contributions and Experiences

Discuss the importance of community contributions and user feedback in open source projects.

“interesting or you're particularly glad to have finally squashed?”
55:28

Resources and Community Engagement

Find out how to engage with the iGPilot community and access resources for users and contributors.

“It really, you know, enhances your life.”
56:00

Annual Meetup and Development Surge

Learn about the annual meetup for RG Pilot developers and the surge in development leading up to it.

“And we have a discord server where, which is very active, a lot of people on that.”
A man walking through an airport, asking his phone a question

Ask about this episode

Get the gist, explore an idea or ask about something said.

Claude

On Software Engineering Radio - the podcast for professional software developers, what are the key points of this episode?

Searching your listening

Transcript

Automatic transcript. May contain errors.

0:00Andrew Tridgell: This is Software Engineering Radio, the podcast for professional developers on the web at se-radio.net. SE Radio is brought to you by the IEEE Computer Society and by IEEE Software Magazine. Online at computer.org slash software.

0:18Jason Davey: Welcome to Software Engineering Radio. I'm your host Jason Davey and we're joined today by Dr. Andrew Tridgell, who will be introducing us to the world of flight control software for unmanned aerial vehicles. Andrew is an associate professor at the Australian National University and a prolific open source contributor whose notable past work includes co-developing the original R-Sync utility, as well as the Samba software which enables file sharing between Linux and Windows systems. In 2011, Andrew became involved in the development of ArduPilot. ArduPilot is a key open source project providing firmware for radio-controlled aircraft and other vehicles.

0:54Jason Davey: Andrew is currently the systems lead for ArduPilot. He also occasionally provides consulting services to clients through his company, Aerial Robotics Australia. Hi, Andrew. It's great to have you on the show. Before we get into it, is there anything we didn't cover in your bio?

1:07Andrew Tridgell: No, that's great. Great to be here, Jason. Awesome.

1:10Jason Davey: If listeners would like to dive into the SE Radio archives, we have a few related shows, including episode 65 on an introduction to embedded systems, episode 73 on real-time Systems with Bruce Powell Douglas and episode 152 on MISRA. So Andrew, before we get into the software stack, we should first understand the kinds of aircraft and vehicles we're even talking about. So can you walk us through the main classes of vehicles, quadcopters, helicopters, fixed wing that people may or may not have heard of?

1:39Andrew Tridgell: Sure. So RG Pilot runs on a pretty wide range of vehicles from things that would fit in the palm of your hand to vehicles that weigh multiple tons, boats, submarines. There's one satellite. I'm not sure it's still up there. It was a bit of a fun project to try and set up receivers to receive the ping from this sole satellite. We do all sorts of different flying vehicles. We do even, there's a walking robot project that's just sort of getting started. But the bulk of users are multi-rotors or fixed wing, mostly VTOL fixed wing. So they're basically planes, fixed wing planes with wings, but with a motor arrangement, lots of different types of motor arrangements that allow them to take off and land vertically.

2:24Andrew Tridgell: That's probably the bulk of it. And lots of multi-rotors, typically higher end multi-rotors. They're not your DJI little copters. I think RG Pilot runs on the biggest multi-rotor in the world, which can lift well over half a ton. So it's rather large. It wouldn't fit in this room, not by a long shot, sort of the size of a truck, but it's a cord copter. So there's some serious vehicles that RG Pilot runs on.

2:49Jason Davey: Amazing. So there's all kinds of different arrangements. When people think of a drone, I imagine they think of a quadcopter where you sort of have four propellers in a kind of X shape. I understand that there are very many different ways to arrange those.

3:02Andrew Tridgell: There's an amazing range of configurations, including ones where the configuration changes while you're flying, sort of wings rotating to become supports for VTOL motors. That's a particularly, I love the Petrodynamics one. The trans wing is a lovely aircraft, a good example of a very innovative design. Tilt rotors, aircraft, tail sitters. I mean, lots of rovers are also fairly popular, little ground rovers. So quite a few vehicles doing things like going around your local park, putting the lines on ovals. They might be RG pilot based. Large boats. So some of the patrol boats, like the patrol boats patrolling around the north of Australia, they're quite large ones and they stay out for like six months at a time.

3:45Andrew Tridgell: they're all RG Pilot based. So lots of vehicles that you might not expect. So RG Pilot's rather widely used, but you don't always see an RG Pilot sticker on the website. It's been a bit of a sport actually among the developers of RG Pilot when you go along to an expo to sort of spot the RG Pilot based vehicle. And it tends to be a fairly large percentage of the vehicles at these expos that are actually RG Pilot underneath.

4:10Jason Davey: I see. So you noticed something in the user interface or some telltale giveaway that this is RGPilot.

4:14Andrew Tridgell: Yes, that's right. If you know the code, you can sometimes notice it. And sometimes the vendors are very happy to say, yes, we're happily using RGPilot and others are a bit more sheepish about it. And sometimes their marketing people say, oh no, we developed all this ourselves. So why does it have the RGPilot banner on startup? That sort of thing. But it's good fun. And it's great seeing people making really good use of RGPilot. We stay clear of vehicles carrying people. The particular phraseology we use is vehicles that are in control of human life. So we stay clear of those and we stay clear of vehicles that are carrying weapons, weaponized vehicles.

4:51Andrew Tridgell: And apart from that, we do anything that moves and quite a few things that don't move as well.

4:56Jason Davey: Amazing. And I think a little later into the show, we'll have a chance to get into how the software is architected to enable this degree of flexibility, not just in terms of motor configurations, but entirely different types of vehicles from submarines and rovers all the way up to fixed wing and quadcopters. So there are some acronyms in the space that our listeners may well have heard, but may not know the meaning of. So can you maybe walk us through what is a UAV? What's a UAS? What is a drone? Do those have defined meanings or are they used loosely?

5:27Andrew Tridgell: Right. So UAV, historically unmanned aerial vehicle, although sometimes the acronym is made a little more trying to avoid the sexism inherent in that. So you might say unpiloted aerial vehicle, often known as RPAS, remotely piloted aerial system. So there's all sorts of different variants of these things. And of course, if it's a submarine, you don't tend to call it a UAV. So you might call it like a ROV, remotely operated vehicle, or just call it a sub. So there's lots of different terminology. And our own terminology is also confused from the history of RG pilot. it. So we call VTOL fixed wing quad planes, even though they might not be quads at all and may not look anything like a plane.

6:12Andrew Tridgell: But just historically, we started the VTOL fixed wing as a quad plane and the name has stuck. So yeah, terminology is often a bit of a mess in a project like this. And we sometimes have regrets on some of those. But yeah, we occasionally try to clean things up a bit and use some better terminology.

6:30Jason Davey: Yeah, I guess once terminology is established, it becomes hard to prescribe a change to that. So maybe zooming in on the more typical flying unmanned vehicles, can you talk about the primary hardware components we might find on those? So what are the sensors or inputs? What are the main outputs or actuators? How are they powered? What does a typical craft look like and what components physically make it up?

6:53Andrew Tridgell: So there's a huge range, but the most common would be the microcontroller would be an STM32 variant. Most widely used these days would be an STM32 H7. So we have an H743 or an H757. Some of them have two of them. Some have multiple of these in a vehicle, but the common one would be something like an H743. And then the sensors. So the ICM series from TDK would be common IMUs, which gives you three-axis gyro, three-axis accelerometer. And then you typically have a barometer and a compass is common. You don't have to have a compass, but they're quite common. GPS or better called GNSS receivers are extremely common in vehicles.

7:37Andrew Tridgell: Almost everyone running Archipilot would have one except perhaps the submarines. So you might have two of those. And the most common of those would be something like a U-Blox F9P, which is a dual band GPS receiver. We commonly call it GPS, even though it's actually a GNSS, but that's just habit, really. So yeah, lots of different types of sensors.

7:58Jason Davey: Out of interest, what is the distinction between GPS and GNSS, if that's not too large a rabbit hole?

8:04Andrew Tridgell: So GPS is the American constellation of satellites. So it's specifically a particular constellation of satellites, but it was the first. And so people generally know things as a GPS. GNSS is the more generic term, Global Network Navigation System. I think I've got the acronym right there. And that's the more generic term, which includes not just GPS, but also things like Beidou and others from other countries that run their own constellations. And there's one, India's got a few satellites, Japan's got some. Some of these satellites are specialized to correction systems, so they may not be actually providing direct positioning.

8:45Andrew Tridgell: But these days, it's all the rage to get positioning from all sorts of things. People use Starlink to get positioning or use, there's all sorts of different schemes to get a position. Then there's things like airspeed sensors and there's range finders, so LIDARs and cameras, of course. And so there might be a radar on for obstacle detection, sonars if you're in the water, or even short range sonars in the air as well. So a whole lot of sensors that we support and many hundreds of sensor drivers are in Archie Pilot. And we support lots of different flight controllers, something like 300 odd different flight controller types and boards and peripherals.

9:25Andrew Tridgell: A lot of stuff on CAN bus, on iSquid C, on SPI, on UARTs, Ethernet, lots of different things. Yeah.

9:33Jason Davey: So you mentioned CAN bus, iSquid C and so on. And as I understand it, those are the means of wiring and the protocols at the low level by which these sensors can talk to the flight controller. Is that correct?

9:43Andrew Tridgell: Yeah, that's right. So I2C is used or more correctly abused a lot in this space. So I2C really was designed, it's an integrated circuit connection system designed for going a centimetre or so between ICs on a board. And in the UAV world, we tend to ignore such electrical considerations and run long cables across the length of two meter wings, which is electrically quite horrible, but we try to cope with it. That's very convenient. These days, most people, if they've got a serious vehicle, they'd be using drone can, which is just a transport layer or a software layer on top of typically BX can, one megabit BX can, but more and more people are using can FD, which has a variable bit rate system where the head is at one megabit and then the body can be different rates.

10:34Andrew Tridgell: So yeah, drone can came out of the RG pilot project and there's all sorts of little tricks you can play with these protocols. You can tunnel serial over drone can, you can tunnel drone can over serial, you can tunnel drone can over serial over drone can if you feel like it. Why do you want to do that? I don't know. But yeah, we've got lots of different connectivity options for vehicles of all different scales. And complexities. I mean, some people have serious vehicles that where there's a lovely company in Sweden, Everdrone, that makes drones that carry defibrillators. And that's a serious vehicle that's trying to save someone's life.

11:11Andrew Tridgell: And so when they put serious effort into making sure the engineering is really, really good. And then we have people just with a hobby drone, a little piece of foam that they throw off in the park, and they want to get it to do a bit of aerobatics or something in the park and then come back and land itself. And in that case, the flight controller might be held in with a rubber band and sticky tape. And the whole thing is a hundred dollars worth of electronics. So very different levels of vehicle that people have. We have vehicles that are worth like a million dollars. So we have vehicles that are worth one or 200.

11:45Jason Davey: Amazing. Are you a tech savvy developer with an inquisitive mind?

11:49Andrew Tridgell: SE Radio has an opening for a new volunteer host to join the team and produce five episodes per year. To apply, please follow the instructions on our website at se-radio.net contact.

12:02Jason Davey: So that covers a lot of the inputs and sensors. In terms of outputs, we think of drones having propellers, jet engines. What does the spectrum look like on the other side of things?

12:13Andrew Tridgell: All the way from little tiny, tiny motors, sort of the size of your pinky. and they can be brushed or brushless motors and then up to jet turbines, huge propellers. I mean, I've seen quadcopters with propellers that are be perfectly at home in a canoe for paddling and several metre long propellers on some vehicles and other ones, the propellers are maybe two or three centimetres long. So quite a variety. And of course, there's the underwater thrusters for submarines, which have a different design because hydrodynamics is a bit different from aerodynamics. Lots of actuators for controlling control surfaces.

12:50Andrew Tridgell: So your run-of-the-mill servos that you might find in a radio control plane, but at the higher end, you have drone can servos that provide feedback on position and force and that sort of thing. So you know the health of actuators. So it tends to be at the, there's more instrumentation on all of your pieces of vehicle towards the higher end. So you know exactly what you tell something to do to go to positioned or to do something and you get feedback at high rate from that device saying, okay, what I actually did was this. And that's really helpful when you want a very reliable vehicle. And then at the lower end, it's just a matter of open loop where I'm commanding that earlier on to go up.

13:32Andrew Tridgell: Did it go up? Let's hope so. And you keep flying and that's at the lower end of vehicle. So RG's Pilot supports the whole range. Petrol motors are also pretty common. So EFI engines, carburetor engines, and RPM feedback ranging from all sorts of different schemes. For that, there's really interesting ones. I mean, the one, if people are interested in harbour engineering, I'd highly recommend having a look at Flowcopter out of Edinburgh in Scotland. Amazing piece of things where they're huge propellers driven by hydraulics of all things. So hydraulic motors, absolutely marvellous. Came from the mining industry, but are now actually flying these huge vehicles.

14:12Andrew Tridgell: And it reminds me of sort of a steampunk. It looks like the sort of thing you might see in a steampunk movie, but it's these incredible vehicles. And it's just, the project is such fun when people come up with these ideas and say, hey, we've got these hydraulic motors. I wonder if we can make them fly. And there's all these advantages to them over electric or internal combustion type motors. and they do it and they get it to go. And it's just incredible experience seeing what people do with RG Pilot.

14:41Jason Davey: Yeah, it's really perhaps counterintuitive that people imagine that creating a flying vehicle is something very challenging and it is, but it seems like almost any design is workable if you're able to control the motors or the flaps and control services enough to stabilize the thing. A lot of things are flyable.

14:58Andrew Tridgell: Yes, that's right. And I've approached all the time when people have crazy ideas about making new designs of vehicles and I try to get it going in a simulator and see how the control systems are going to work and to make it go. And it's never boring working on those types of things. So it's people come up with some amazing ideas.

15:17Jason Davey: Awesome. So at the center of this all is the flight controller, which runs on some kind of microprocessor. And as you say, there are very many different vendors or homemade options here that people can use hardware-wise. RGPilot supports a whole range of them. At a very high level, what is the flight controller responsible for?

15:35Andrew Tridgell: So the flight control runs the main RGPilot firmware. So it runs all of our control algorithms and communications protocols, most important of which would be Mavlink and DroneCan. So Mavlink is this protocol that encapsulates all the telemetry data coming from the vehicle. But RGPilot, there's a lot of subsystems. It's about three quarters of a million lines of code, the core of the RG Pilot firmware, roughly C++. And then it's divided up into a whole lot of HALs, hardware abstraction layers. So the most widely used of those is HAL Shibios, which is we run the Shibios RTOS and mostly on STM32.

16:13Andrew Tridgell: But we also do HAL Linux. So there's quite a few vehicles out there running on Raspberry Pis, NVIDIA boards, et cetera. So those long range boats doing patrol of various coastlines are running Raspberry Pis and with just various hats and things on those to be able to control the various bits of networking and actuators and stuff to make that possible. So we also support, there's some Qualcomm chipsets that a thing called Quirt, which is an RTOS that Qualcomm does for their interesting little DSP chips that we can fly on. And just working at the moment as a guy, David Buzz, I'm just so privileged in RGPilot to work with such a great range of engineers.

16:55Andrew Tridgell: And so David Buzz in Queensland is doing the Zephyr port at the moment. And I booted Zephyr on a flight controller called a Cube Orange for the first time yesterday, which was really interesting. So that's nice, brings up a whole range of new possibilities. And we've got people in the dev team who look after the Linux port or the various ports to different, the ESP32 or other ports. So, yeah, a very broad range of hardware and software and ecosystem that we support. I see.

17:23Jason Davey: And within flight controller firmware, I think we can conceive of this as operating at almost several different layers or levels of abstraction at the very low level that may be the sensor or hardware drivers talking directly using those protocols you mentioned earlier. Then we have, I suppose, stabilization or attitude control algorithms, position control, navigation, and even autonomy layered on top of that. Can you perhaps walk us through those layers? What are the inputs and outputs to each of them?

17:50Andrew Tridgell: Sure. So there's a bunch of threads that we run and the thread architecture is fairly similar across the different halves, but not identical. But the basic one is there's about a dozen threads. We chose quite some time ago, a thread per bus philosophy. So if you've got a dozen different buses, there might be two or three I squared C buses, three SPI buses, two CAN buses, I don't know, five UARTs, each of those has a thread associated with it. And the philosophy behind that is that buses block. You're waiting on a bus transaction. And so the thread deals with that. And then there's a supervisor thread, like a main thread, as we call it, which is the high level coordination of all of the other ones that are going on.

18:35Andrew Tridgell: And our state estimation using EKF, so extended columnar filter, it runs on the main thread, along with the main rate control, PID control, attitude control, velocity and position control and navigation type algorithms. Fundamentally, we're a cascaded PID architecture, but we do support other architectures. So there are some RG pilot vehicles out there using things like LQR type systems. There's some even running neural networks, but both of those are fairly unusual, pretty rare actually. So almost everyone uses cascaded PID and we have developers, some really talented people like Leonard Hall, who's the control lead for VTOL.

19:16Andrew Tridgell: And so he looks after our cascaded pit architecture all the way down from the rate control up to the high level navigation using a system called S-curves, which is a really innovative type of navigation system for VTOL. And then we have Paul Risborough, who's the head for state estimation, looks after our EKF architecture, which is state estimation, working out where you are, which way up you are and where you're going is really important. into this type of vehicle. And so a huge amount of work goes into the state estimation. That's all Paul's area.

19:50Jason Davey: So state estimation is taking the input from all of these sensors and fusing them together to determine where in the world I am, which way up I am, which way my nose is facing, and so on.

20:01Andrew Tridgell: That's right. And the fundamentals of these types of vehicles is RGPilot can support very high-end sensors. I mean, you can put$100 ,000 IMU on, and some people do on RGPilot vehicles, but very rarely. Usually people put the cheap and cheerful IMUs, which basically means that all of your sensors are lying to you. And the EKF's job is to sort out all the lies to create the truth because every sensor has errors, right? And the types of errors vary with flight phase. We've got vibration effects. You've got just drift, temperature drift, atmospheric drift, all sorts of things. And the EKF has to take all of that erroneous input and produce as accurate it a possible an estimate of all of the different states.

20:45Andrew Tridgell: So roughly speaking, it's sort of a 21 state EKF. So they're all the different things we look at. And those states include things like attitude as a quaternion and position velocity and all sorts of bias states, gyro biases, accelerometer biases, magnetometer biases, wind estimation, lots of different things that we're estimating there. And we don't just run one EKF, we run several. So we actually switch between EKFs live while we're flying based on internal estimation of the error of the EKF, the sensor consistency essentially.

21:19Jason Davey: So you essentially run several instances of this algorithm or perhaps different algorithms to try and estimate the state of the vehicle. And there's some system of, is it based on voting or quorum or there's some other heuristics used to determine this sensor telling us we're at this altitude, perhaps this other sensor is telling us we're somewhere else entirely and to somehow decide which of those you're going to trust? Yeah.

21:42Andrew Tridgell: So the robustness is at several different levels. So the most common type of vehicle, I mean, some vehicles only have one IMU, but most commonly three IMUs. And by default, we arrange things. So you run one EKF per, we call them lanes. It's basically one EKF per IMU. And then you have options for a thing called sensor affinity, where you can either use the best sensor for each estimate and just the different IMU for each one, or you can tie, you might have two airspeed sensors. And so you use different airspeed sensors for each EKF lane and different compasses and different GPSs for each one. So you can set things up to have like independent estimation where you have a completely separate sensor set for each of your lanes.

22:28Andrew Tridgell: If you set your vehicle up that way and you've got sufficient numbers of sensors for that to be doable. And that increases robustness. So the voting, we don't actually have a direct voting system. We've got like a supervisor that looks at error states and then does lane switching. So it prefers to stay with the current one. You don't want to be flopping backwards and forwards between your EKF lanes. And so it has a measure looking at what's called the innovation, which is really just the core of an EKF is a prediction correction step where the EKF predicts what it's going to get from a sensor at each point in time.

23:05Andrew Tridgell: And then it looks at what it actually gets from the sensor. And that's your innovation. So the innovation can be in meters for a wholesale position, or it might be in something like meters per second for an airspeed sensor. It then combines all of those into an overall error estimate for a lane. And when that error estimate gets above a threshold and an alternative lane has a lower error estimate, then it reluctantly switches to a different lane. Again, we don't want to switch too rapidly. That causes perturbations in the flight control. And that's how it works.

23:39Jason Davey: So to make that a little bit more concrete for the listeners, can you recall any examples where this EKF switching or the vehicle essentially flip-flopping between different opinions it has about where it is or which way it's facing, how does that manifest in flight and cause a real issue?

23:54Andrew Tridgell: So we've got lots of remediations to try to prevent it causing an issue, but I can give you an example before we put in some of these remediations. You've got a quadcopter sitting there and I quite often see videos of people with a, they're so impressed at how well this little quadcopter is flying and it doesn't matter whether it's DGI or Archipilot or whatever, and it's sitting there and it's staying within centimetres or millimetres of its position and gosh, isn't it flying well. So they get out their phone and do a little selfie video where they're smiling and their head is like six inches from the drone.

24:26Andrew Tridgell: And I just recoil in horror because I know that you see that it's flying absolutely beautiful at the moment. But if something went wrong, it could suddenly decide that the correct position is 50 centimeters that way. That's where your head is. So we have remediations where when it does lane switching based on the flight mode, it notifies the higher level control algorithms that it has repositioned. And if it's in a mode where it's trying to do a position hold, as opposed to a mode where it's trying to get to a position. So the difference there is if you're trying to get to a particular latitude-longitude, then you should be trying to get to that latitude-longitude.

25:04Andrew Tridgell: But if you're trying to hold position in space and not a specific latitude-longitude, then if the state estimator jumped in its position estimate, then the high-level supervisor should correct the position it's trying to hold so that there's no jump. So we have communication coming up from the Kullman filter to the high level supervisor code. That supervisor code says, aha, there's been a position reset, there's been a velocity reset and cope with that. And so we've got a whole lot of tests around that. And some really great work done principally by people like Leonard and Randy McKay, who's our copter lead in Japan, Leonard Hall, who's our VTOL lead out who's based in Adelaide, Paul out of Melbourne, and they coordinate to try to make this stuff very reliable.

25:50Jason Davey: I see. So one other term that you mentioned is a PID cascade, I believe you called it. Could you give us a 101 level introduction to what a PID controller is? Maybe give an example of a quadcopter trying to maintain a level attitude or something like that, and how that plays out according to these systems.

26:07Andrew Tridgell: Yeah, a PID, incredibly widely used in control systems, right? Everyone uses a PID, and there's lots of little diagrams and things of PIDs. So you've got proportional integrator derivative control. So you have three gains basically, and you can apply PIDs to lots of different types of things. And so we apply PIDs in RGPilot to all sorts of different layers. We're not quite the classic PIDs from the textbook. Our PIDs are a bit more complex to try to deal with some of the sharp edges around PIDs. But your classic thing is at the lowest level, you have what's called a rate PID. Now a rate PID is looking at gyroscope data.

26:44Andrew Tridgell: And so it's filtered gyroscope data. So that gyroscope data might've gone through various harmonic notch filters to remove frequencies that came, for example, from vibration from motors. So it's looking at the RPM feedback from the motors and then applying various types of notch filtering to those to remove particular frequencies of vibration. So you might have, I don't know, six to 12 different notch filters running across your data. So that gives you your basic gyro data, right? Which gives you a rotational rate in radians per second in three axes. And then the rate PID, it's got a target rate.

27:22Andrew Tridgell: So it's trying to achieve a pitch rate and a roll rate and a yaw rate. So it's got a PID for each of those and PID gains for each of those axes.

27:30Jason Davey: So if the pilot, But for example, once the craft has stayed level, then that rate might be zero. We should be staying where we are. Whereas if they're putting some input into their control sticks, that may correspond to a desired rate of turn in a particular axis.

27:43Andrew Tridgell: In the simplest flight modes, what you're describing there would be something that would typically be called an acro flight mode, where the pilot is directly putting in a rate. And that's if you see people flying an FPV drone, right, you see them doing amazing tricks with that, where the pilot is demanding rates with their sticks, then that's what they're doing. That's just one level of PID, right? So ACRO drone, FPV drone is just a single level, not cascaded PID. The next level up is the attitude level. So you have an attitude PID that is trying to achieve a particular attitude, roll pitch in your, or really quaternian attitude, and it then commands the rate PID.

28:23Andrew Tridgell: So that's where the cascading comes in. The output of the attitude PID is the input, the target of the rate PID. And then the level above that, above the attitude PID, you have a velocity PID. And so the velocity PID is trying to achieve a particular velocity in 3D space. And so we have a XY velocity PID and we have a vertical velocity PID and those PIDs are commanding the attitude PIDs. And then above that, you have a position PID, which is trying to achieve a particular velocity in order to hold position. And so they've got your cascades from position PID, velocity PID, attitude PID to rate PID.

29:01Andrew Tridgell: And then above that, you've got the navigation level where you're trying to achieve a particular set of weight points or fly in a circle or do a loop the loop or whatever. And so that's the high level navigation, which might involve PIDs or might involve some other quite different algorithms. So these cascaded control architecture. And so you tune it by adjusting the gains of each of the levels of this cascade.

29:24Jason Davey: So to make sure I've understood that, let's imagine that our pilot wants their quadcopter drone to fly forwards. That may create a desired velocity moving forwards. And in order to fly forwards in a quadcopter, you basically tilt your nose down and then your propellers crudely drag you forwards. Yeah. So that results in a desired pitch, a desired attitude where the nose is down somewhat. And then in order to put our nose down, that creates a desired rotational rate that will smoothly transition ourselves into that orientation. That's right. And then presumably there's another layer where that has to be translated to, okay, what commands at a very low level do we send to the motors, the four different motors, for example, to achieve that particular rate?

30:07Andrew Tridgell: Yeah. Yeah. And so we go, the motors typically go via what's called a mixer. So the mixer is a purely algorithmic thing that takes notional roll rate, pitch rate, yaw rate, climb rate, and turns them into motor outputs based on what the geometry and number of motors and all sorts of properties. It goes through a whole lot of thrust linearization to compensate for things like battery voltage and the non-linearity of motor control because, you know, it's not a linear curve going from throttle to thrust. So we have a whole bunch of, you know, thrust linearization algorithms in there that try to linearize things to be friendly towards our pit architecture so they don't have to deal with nonlinear systems.

30:51Andrew Tridgell: And then that's the sort of the architecture to get things out. And lots of things like when you put the nose down to move forward, you've got to increase your thrust because, you know, you're no longer got as much thrust going up. So you need a bit more up to compensate for the fact that you're putting a bit of the power forward. So, you know, typically you get a bit more power going to your motors, but you also get things like translational lift. So as you start moving forward, quadcopters can actually get lift from translational lift from the way the blades form a disc in the air. And so, you know, the PID copes with that and holds level.

31:27Andrew Tridgell: And then lots of other factors that go on there with impacts on, you know, you might be using a barometer for height and the thrust, the change in the thrust angle impacts the barometer and actually changes the pressure. So you get sort of feedback systems where sensors are altered by the way you're trying to fly. So all sorts of little bits and things to keep us entertained in trying to make it fly correctly.

31:50Jason Davey: And what are the typical rates or latency requirements to keep something in the air and keep it stabilised? What sort of rates are we talking about?

31:59Andrew Tridgell: I've been looking at that actually, sort of there's control bandwidths and rates. There's a lot of people who try to push rates up really, really high. So, and there can be some benefit for that. But the default, you know, copter, multi-copter set up for RG pilot is the main loop. So the PIDs run at 400 hertz. Whereas if you look at something like Betaflight, they default to multiple kilohertz. But we do a lot more per loop than they do, right? On the same, you know, class of CPUs or microcontrollers. But the rates that you send signals out, you know, so if we're a classic quadcopter with PWM output might be running, telling the commanding the ESCs at 400 hertz, a default fixed wing, a simple little foamy fixed wing defaults to 50 hertz, which is really quite low.

32:43Andrew Tridgell: As far as the sort of the control bandwidth, I've been doing a bunch of measurements lately with chirp signals going through real motors and ESCs and propellers to look at how much actual control bandwidth and the 3 dB, you know, roll off is typically, even for little five, seven inch quads, is typically around sort of 10 to 12 hertz or so, which is, was lower than I was expecting. But even though it's down around those sort of frequencies, there still is benefit in running the loops much, much faster than that. And there's been a huge effort put in by one of our lead developers, Andy Piper in the UK, around what he calls the fast rate support in Archipilot, where you run the rate loop at sort of two kilohertz or even higher.

33:29Andrew Tridgell: and then you run, you still run the other PIDs of this cascaded PID architecture. The classic cascaded PID, you're running each of the PID layers at the same rate, but in this one, you're running the rate loop, the lowest level PID at maybe two to four kilohertz. And then you're running the attitude loop at say 400 hertz or 600 hertz. And then you, you know, other higher level ones, it might even be at lower frequencies. So those are the sort of numbers that say, but if you're talking about a really big vehicle, you might be talking about much lower frequencies. If you've got a one ton vehicle, there's no real point in running the control at multi kilohertz.

34:08Andrew Tridgell: You're just wasting cycles. So one of the ironies is that the bigger and more expensive a vehicle is, the cheaper and slower CPU you can get away with. And you can run them on really low end ones because they don't really need to move very fast.

34:22Jason Davey: Yeah, that's definitely counterintuitive. So this sounds like a lot of complexity. Broadly speaking, how is Archipilot's code base structured to manage that? Is it a single monolithic thing? Is it modularized in some way?

34:35Andrew Tridgell: It's all Git, of course, up on GitHub with lots of submodules. How many submodules we've got now? But lots of different submodules for different communication protocols and things like, you know, Mavlink and DroneCAN and various compilers and things. We have drone count compilers, mavlink compilers, those types of things which take protocol specifications in various specification languages and convert them into Python or C++ or whatever language is needed for the particular task. The core code is organized around libraries. So we have what's called AP Compass, which is our compass library that deals with all the compass drivers.

35:11Andrew Tridgell: And that's split up into something we call the front-end-back-end split, where there's the front end of the AP compass library, which deals with coordination of all of your compasses, and then the back ends, which are, you know, loaded, enabled dynamically, loaded dynamically for individual compasses. Same with the AP inertial sensor library, which deals with IMUs, AP GPS that deals with GNSS receivers, AP Barrow for barometers, et cetera. So there's all these little libraries. They each have their own little tests and simulators and things. And then we have all the various, you know, PID libraries, you know, the ACPID library.

35:50Andrew Tridgell: We have various, you know, high level control, attitude control libraries, navigation libraries, et cetera. And then we have subsystem maintainers. So individuals who maintain a particular subsystem, you know, George has recently been taking on a lot of the management of the text library, which is our total energy control system for fixed wing height and speed, originally written by Paul Risborough. We have people who look after, you know, things like proximity library, that dealing with proximity sensors like radars or scanning LIDARs. So Reshab does a lot of the work on that. So all different, yeah, basically it's a library plus main code base, and then there's vehicle directories.

36:32Andrew Tridgell: So we build a separate firmware for each vehicle. So there's the copter vehicle, the plane vehicle, rover, antenna tracker, submarine, blimp, you know, all sorts of different vehicle directories. And then AP-PRIF, which is peripherals. So this is firmware for DPSs or airspeed sensors or whatever, which run their own microcontrollers, typically on drone cam. And so they get their own directory with, you know, their own firmwares.

36:58Jason Davey: I see. So I imagine that rebuilding the firmware, uploading it to a flight controller and taking an aircraft out into the field, every time you want to test a change to this software would be time consuming, expensive, and potentially even dangerous. So how do you approach testing within RGPOL? Can you maybe walk us through the lifecycle of a new feature or subsystem being introduced and how that's tested?

37:20Andrew Tridgell: We do a lot of SIDL testing software in the loop. So we have both software in the loop and sort of hardware in the loop type testing. We have a whole lot of different physics engines for doing the automated testing. So we do, there's a lot of CI testing. So the life cycle is, you know, somebody proposes a change, they develop the feature themselves, they test it typically in SITL and hopefully on some real hardware as well. They open a pull request on GitHub. We have two development calls a week. So in Canberra, in the Australian time zone, we have them on Tuesday morning and Wednesday evening.

37:53Andrew Tridgell: So I got one in a few hours this evening. And those development calls, the developers get together and look at the latest pull requests that are being proposed. And we critique them and review them. We have an AI review system that also does review using both Claude and Codex that reviews all the PRs and run tests and things, and then human review of all of the code that goes in. And then it depends on the complexity of the feature. If it's a very easy feature, it might get in very, very easily. And other ones might take six months or more to get past all of the review and to get in. We have our master release and then stable releases.

38:31Andrew Tridgell: We're just working on the 472. So we're about to release 4.7.2 beta one. And that's going through review process at the moment before going out as a beta release to our users. The build process itself, we've got a build server that builds all the firmwares just to build on a fairly fast machine with quite a lot of CPU and memory and fast disk. It takes a couple of days to build all of the firmwares because there's many, many hundreds of firmwares that come out of a build and each of those gets built. And we extensively use CCache, which is a project I wrote ages ago for trying to speed that up.

39:08Andrew Tridgell: But even with all of those sort of techniques for speeding things up, it still takes a very long time to build all these firmwares. And then they go out to users and users beta test it and give feedback. and then finally it goes out as a new stable release and people upgrade. They get told in their ground station software, hey, there's a new release out. Would you like to upgrade? And they say, yes. And it reflashes their vehicle with a new release and they fly it. So it's not nearly as painful a system as you might think. We've got also a system called custom.rgpilot.org for building custom firmware because RGPilot has hundreds and hundreds of features that aren't necessarily built into review firmware, aren't enabled by default because we can't fit all our features in the flash space of these flight controllers.

39:53Andrew Tridgell: So you go to custom.itpilot.org and you've got a menu system of choosing from the many hundreds of features you might want in your firmware and you choose what flight controller you want that on and you press build and our build server builds it for you and then gives you the firmware ready to go. So that's really handy. So we try and pick and choose what features come in our default firmware. And most people run the default firmware, but anyone running some sort of really obscure feature, they go to custom.rgpilot.org and get their custom firmware. So we've got a really talented developer who looks after our custom build server.

40:29Andrew Tridgell: Came in as a GSOC student. We've got a lot of our developers actually came through the Google Summer of Code process. We've had a very good relationship with GSOC over the years. And a lot of our core developers started off as GSOC students and then ended up working on Archipolet full-time. I see.

40:44Jason Davey: So the reason this high number of builds or the custom build system is necessary is because first off, different microcontrollers and boards need to be compiled with some kind of different settings and may not be compatible, but also they have a limited amount of storage. What's the typical amount of storage space for the firmware, compiled firmware that one of these flight controllers might have?

41:05Andrew Tridgell: So an H743 STM32 has two megs of flash in two banks of one meg. We also carve out one sector, which is 128k for the bootloader. And then if it's for parameter storage, if it's got an external storage thing, persistent storage device, like an FRAM, also known as a Ramtron, then that would be used for storage and parameters and waypoints and that sort of thing. But otherwise, if it doesn't have that, if the vendor decided they didn't want to pay the cost of that device, then we would carve out two more sectors for a log-based storage system, which stores all your parameters and waypoints, et cetera.

41:46Andrew Tridgell: So, you know, you end up with somewhere between one and a half and, you know, 1.8 to 1.9 megabytes of flash available. we recently switched from using minus o2 on those boards compilation optimization to minus os just because we were running close but where your typical board might have you know two or three hundred kilobytes of free flash space in the default build and we like to keep a bit of space there we don't want to get down to our last bytes like that that happened to us in the early days of ijpilot because ijpilot started on you know avr microcontrollers 8-bit you know so just like 128k of flash and 8k of RAM.

42:26Andrew Tridgell: That's where we came from. And so, you know, we ran out of space on those and ceased supporting those many years ago to move to the 32-bit platform. Yeah, but some boards are much smaller. F405, so STM32, F405 are very popular. So they've got a lot less RAM. So instead of the one meg of RAM and two megs of flash on the H7, so, you know, they've got a mega flash and a lot less RAM there to play with. So they have less features. I see. Maximize the value of your team with our new software professional certifications. The program offers an objective framework to evaluate your contributors on core software engineering principles from initial requirements down to engineering economics.

43:10Andrew Tridgell: Discover how IEEE Computer Society can help you build more successful teams at computer.org slash certification.

43:21Jason Davey: Rolling back slightly, you mentioned SITL or software in the loop testing. Just to clarify for our listeners, can you explain architecturally what that looks like and what exactly is happening there?

43:31Andrew Tridgell: Yeah, so SITL is a fairly broad term in RGPilot. So it basically means we have a physics model, which is simulating all of the sensors and the environment, you know, the world around it. And that hooks into RGPilot compiled for your local desktop CPU, you know, x86, 64, you know, I don't know, Apple Silicon, Mac or whatever, Windows, SigWin binary, whatever it is. And because the RGPilot code is very portable, and so it can run on 64-bit, you know, desktops, or it can run on, you know, 32-bit micros. We use, by default, use a lockstep scheduling system for SITL, which means the physics and the flight control.

44:12Andrew Tridgell: The simulation time is separated off from world clock time. There's a pacing algorithm that, by default, will try to pace the world clock time to match the world, real world. But you can set a speed up, like sim speed up, you know, 100 times and run 100 times faster or 0.1 times to run it slower if you want to. So the lockstep, basically, there's a step of physics and then there's a step in the scheduling of the main RG pilot firmware, then another step of physics. And they hand backwards and forwards between each other to ensure that the results you get in SITL do not depend upon the speed of your CPU.

44:52Andrew Tridgell: So, you know, when you've got a busy desktop of doing some browsing, playing a game or whatever, you'll get the same results in your simulation that you would have got. You get the same results running it on an old Raspberry Pi or running it on the latest desktop CPU. And the actual physics backends, we've got a lot of different physics backends. The built-in physics engine is fairly rudimentary, but we support connecting to much more sophisticated physics engines, things like X-Plane or RealFlight or lots and lots of others. And so people often pick the simulation environment that RG Pilot connects to based on what they're trying to do.

45:31Andrew Tridgell: You know, what is the priority of what sort of fidelity do you need? And then you pick the simulation, the physics backend that matches your needs for the particular task.

45:43Jason Davey: So can you maybe share an example of a time where you used SITL or a form of simulation to diagnose some unexpected behavior of an aircraft or of the firmware?

45:51Andrew Tridgell: So SITLs, I mean, we think people might report there's a problem with back transitions of a VTOL plane where it's going from fixed wing to being a VTOL vehicle to land vertically at a particular spot. And they're getting overshoot or they're getting oscillation during those back transitions. It's a very difficult control regime, that sort of back transition. And so you can set up scenarios in SITL where there's wind coming from a particular direction or your airspeed sensor has got a particular type of error. you've got this type of vibration or the tilt on a motors you might have a tilt rotor where the motors that are going so a motor that's a forward motor is actually tilting to become a vertical motor as you're transitioning back for landing that doesn't quite tilt at the rate that you want to tilt and that causes control issues so we look at the log that comes from a user we have a really detailed logging system that allows us to analyze what happened on a real flight and then we set up the parameters in SITL to reproduce that scenario and to try to produce the particular symptoms that the user got in the log.

46:58Andrew Tridgell: And once we've got that, then we can run it under a debugger. We can single step, because it's lockstep scheduled, we can actually single step the simulation and look at exactly what's happening, reproduce the error. Typically, we then create an auto test that we've got a whole auto test subsystem, which is what runs in our continuous integration. And we would, you know, add an auto test that reproduces the particular user error. So that's our red test that generates the failure. And then we do a patch that fixes the error and then it goes green. And so we then commit both the test and the fix into our firmware.

47:34Andrew Tridgell: And that ensures that we don't regress that particular issue in the future. So that's a typical life cycle, but it all depends on the scenario, you know, coping with particular sensor errors, You can get weird things where, you know, sensors are too accurate. You know, we had issues where people had GPSs that were giving like millimeter accuracy when the vehicle was sitting still for hours and hours and hours. And the EKF can get starved of input. EKFs like having some change, right? Because they really need change in order to be able to observe the state of the vehicle. And you can get problems where an EKF can diverge if it's got no change.

48:12Andrew Tridgell: And so we might set up in SITL an accelerated test where it goes through 12 hours of just sitting on a runway waiting for takeoff with no vibration, nothing happening, and make sure that the EKF doesn't diverge when it's starved of input. And you've got these observability problems. And that sort of thing is great for testing in SITL, where you can run with very, very long runs in just a minute or two. Very handy.

48:38Jason Davey: So these simulations really require not just running the firmware or simulating the physics affecting the vehicle, but also to some extent simulating the sensors and peripherals and hardware devices and even the way those may fail or be inaccurate. I believe you're currently looking into a system which allows even more in-depth simulation of multiple microcontrollers and these hardware devices, emulating those and combining all that for testing. A system called Renode. Can you talk a little about that?

49:07Andrew Tridgell: Renode's a wonderful open source project that does microcontroller emulation. So we've just merged the Renode support of RGPilot and AM32 as well, the ESC. And so that allows us to boot any of the RGPilot flight controllers and peripherals within an emulated microcontroller. And it has emulated sensors for all of our iSquid C and UART and SPI sensors. and it emulates, you know, really quite deeply the microcontroller, you know, all the clock tree, RCC registers, UARTs, SPI peripherals, you know, all those bits and pieces are emulated to the point that we run just unmodified firmware. Then you can actually fly these vehicles.

49:48Andrew Tridgell: So we can hook in our SITL engine into these emulated flight controllers. So you've got a little launch GUI where you say, pick one of the many hundreds of flight controllers and you pick a set of sensors you attach with this little configuration tool to attach this GPS to that UART and this barometer to that I2C and this compass, et cetera, and then click go. And then you can connect to it with a ground station. It creates USB devices on your computer, which you can connect to, you know, or of course UARTs you can connect to remotely. And then you can fly it with your ground station and fly this emulated microcontroller attached with a debugger.

50:26Andrew Tridgell: We've even got SIGROC support. So you can actually attach SIGROC, which is a logic analyzer, open source logic analyzer system using a thing called PulseView. So you can actually look at the signals at the logic analyzer level inside this emulated microcontroller. So you can look on the SPI bus or UARTs or iSquid C and get captures of what the signals look like, which is really quite mind-blowing as far as, you know, debugging microcontroller issues. And it's already found quite a number of bugs or resolve some longstanding issues that we hadn't been able to crack through standard techniques. And it's a very powerful technique.

51:03Andrew Tridgell: Great project.

51:03Jason Davey: Can you talk about perhaps one of those bugs that you found particularly interesting or you're particularly glad to have finally squashed?

51:10Andrew Tridgell: Yes. In fact, the inspiration for doing the lottery, you know, there was a bug in our DSHOT support where somebody, we have a crash dump system, which is a system that catches catastrophic errors inside the STM32 microcontroller at runtime. And so it catches things like bus errors or lockups or other things. And then it's able to write out the registers and memory state to either flash or SD card, giving us what we call a crash dump that we can post-mortem attach a debugger to, to get backtraces of all the threads and things. So we had a user that had had a reproducible case where modifying a certain parameters related to the DSHOT protocol, caused a crash dump and he sent us the crash dump and it looked like it was an issue inside the core dshot code in the Shibios hell but under re-node we were able to reproduce this error and it turns out the error was actually a sort of a locking error inside our what's called the BL-Heli layer in Ardupilot because once we had it reproducible in re-node then it's it becomes a trivial problem to fix.

52:16Andrew Tridgell: So very quickly, we found the issue inside the BL heli layer and we've got a pull request to fix that. We're also glad to find that once we were able to reproduce it, we could determine that this wasn't something that was going to affect a flying vehicle. It was unique to the type of the user was doing on the ground with fiddling parameters while the D-shot was active on the ground, essentially reconfiguring what channels were going to what outputs while it was live at outputting those that, you know, signal. So once we knew that, then it was, you know, we don't need to do a rushed out release to fix this issue.

52:52Andrew Tridgell: It's not going to cause somebody to fall out of the sky. And so, you know, it was deferred for a later release.

52:58Jason Davey: Seems like this is already paying dividends in getting to the bottom of some of these bugs, which are probably incredibly hard or perhaps even impossible to reproduce.

53:06Andrew Tridgell: Yeah, that can be, you know, bootloader stuff, the transition between the bootloader and the main firmware, signal initialization errors. We're using Renate at the moment to look at a longstanding issue where a soft reboot of the microcontroller can cause servos like an aileron to go to their extremes. So the aileron, you know, goes to its most extreme position and can actually damage a servo if it pushes too hard against an extreme position. And that's based on, you know, the reinitialization of those peripherals and the behavior of the servos, That type of reboot behavior and reset behavior can be very, very difficult to catch in a normal debug environment.

53:45Andrew Tridgell: But within Renode, that's much, much easier. So, yeah, we're hot on the trail of that issue at the moment. And we've reproduced it. And I'm expecting Peter Barker. Peter Barker is our most prolific developer in RGPilot, also based here in Canberra, Australia. He's using Renode to track down that particular issue at the moment. And he's having a lot of fun doing it. It's really fun being able to get at this sort of level. And we're looking forward to enabling the reverse debugging in Renode, where you can actually debug backwards in time. So you catch a particular error and you want to know how you got to that state in the micro controller.

54:18Andrew Tridgell: Renode supports unwinding time backwards. And that's something that we're trying to get working properly at the moment. It's not quite working now, but we're getting close. That will be another fun thing to be able to do.

54:31Jason Davey: Fingers crossed that tool's in your toolbox sooner rather than later. So, Andrew, it's been a lot of fun discussing flight control software with you. I feel like there are lifetimes worth of rabbit holes we could descend into. But are there any major areas that we've missed and we should cover as we wrap up here?

54:46Andrew Tridgell: I'd just like to say thank you to all of the people who've contributed to Archipilot, all our users, the people like Henry who writes our documentation. It's such a pleasure being part of a community like we've got and our user community. fantastic. Our users who take the latest firmware, you know, never been tested before and put it on some very complex vehicle and go fly it and give us logs and videos and things and feedback. That's the pleasure of these types of projects. The connection into the user community, to the developer community, the camaraderie within the developer community. It's an incredible experience.

55:22Andrew Tridgell: So if you haven't been part of an open source project like this, I'd highly recommend you you become part of one. It really, you know, enhances your life. It's a great engineering experience. So thank you to everyone who's used iGPilot. Thank you to all our partners who contribute to the project financially. And thank you to all the developers who've made the project possible.

55:42Jason Davey: That's a really great way to sign off. So if our listeners are interested in getting their hands dirty with iGPilot, either as a user or perhaps even as a contributor, are there any resources that we can point them to?

55:53Andrew Tridgell: Oh, well, the obvious one is iGPilot.org, which is our main website. And from that, you'll see links off to like discussed at argpilot.org, which is our discourse server, like a bulletin board type system. And we have a discord server where, which is very active, a lot of people on that. So you can find, so that's, if you go to argpilot.org forward slash discord, that's a link into our discord server and join the very active community there. We have an annual meetup, which is next month in Canada. It's in a different place each year. Last year, it was in an amazing town called Richmond in the north of England.

56:28Andrew Tridgell: Fantastic conference there. And we're really looking forward to the one in Ottawa and the second half of October, where all the developers get together and do hacking on RG Pilot and flying of weird and wonderful vehicles. So we're in the rapid development phase of RG Pilot because it tends to be in the month or two before our annual conferences that all the people who are planning to give talks are trying to, you know, plump up their talk a bit with some interesting bits and pieces and the latest developments and unexpected features. A lot of the core developers are working very, very hard on those features.

56:59Andrew Tridgell: So you see a surge in development happening at the moment as the core devs work towards getting their talks ready for Ottawa.

57:07Jason Davey: Yep, it's all happening. Thanks again, Andrew, for the discussion. We'll be sure to include those links and other resources in the show notes available at se-radio.net. Thank you all for listening. This is Jason Davey for Software Engineering Radio, signing off. Thanks, Jason.

57:22Andrew Tridgell: Thanks for listening to SE Radio, an educational program brought to you by IEEE Software Magazine. For more about the podcast, including other episodes, visit our website at se-radio.net. To provide feedback, you can comment on each episode on the website or reach us on LinkedIn, Facebook, Twitter, or through our Slack channel at seradio.slack.com. You can also email us at team at sc-radio.net. This and all other episodes of SC Radio is licensed under Creative Commons License 2.5. Thanks for listening.

From the publisher

Dr Andrew Tridgell of the Ardupilot project discusses flight control software for autonomous and remote controlled aircraft. This field has advanced considerably in recent years, and autonomous vehicles are playing an increasingly important role in many industries -- from package delivery to scientific surveying and film-making -- as well as in the consumer market.

Host Jason Davey speaks with Tridgell about the fundamental concepts required to keep a drone in the air, the hardware and software architecture behind these vehicles, and how development and testing are handled in Ardupilot, one of the leading open source flight control software stacks.

More from Software Engineering Radio - the podcast for professional software developers

All episodes