## My new school project: controlling a fighter jet with a handheld

Posted 06/07/2020 by Ludovic Duchenne, Maths and computer sciences teacher Lycée Touchard Washington, Le Mans

Wouldn’t it be a cool school project to write code to control a plane? And would it not be even cooler to do this for a military fighter jet like the French Rafale? I thought of developing this activity — while reliving the movie “Top Gun” in my head — as early as 2018. The coronavirus lockdown was a good opportunity for me to finally start working on the project. I was keen to get back to school after lockdown to surprise my computer science and technology students with a very different end-of-the-year activity.

When I was building the model airplane at home, my young son told me he thought the plane was awesome, but he did point out that it was missing its typical aircraft lights. So, I went to the store and bought four red LED lights. Installing these back home I realized that a plane has red and green lights, so it took another trip. My son’s intervention has proved a good move. The LEDs were a good addition because they help students become familiar with calculator programming. Turning on the aircraft’s signal lights at varying frequencies and duty cycles is a good exercise to start with.

The aim of the overall project is to turn my students into the plane’s software engineers. I provide them with all the components and challenge them to figure out how they can reach the goals. So far, they seem to be enjoying it. “Amazing! I did not know it was possible to control servomotors with a calculator. It is not just a calculator; it is a real computer,” one student told me. And another one seemed to think that we are no longer studying math at all. Of course we are, but just in a different way.

If we do the entire project, I plan to divide the class into two groups, where they will compete to find effective software and hardware solutions to control the model airplane I built. They will use their own TI graphing calculator (handheld), the TI-Innovator™ Hub with TI LaunchPad™ Board and the to control the mini Rafale, using TI-Basic or Python to create code to switch on the lights and control the three servomotors and other accessories.

The mathematics behind the Rafale
A large part of the project revolves around developing software code to control the plane, based on three types of movements. Students discover the direct trihedron , learn how a servomotor runs and how they can control it. At the same time, they are learning about the concept of force, lever arm and the reduction ratios between two pinions. When they have created commands to control the airplane, they can start with the first tests. The control of the rudder and fins will be a pretext to approach the notion of affine and/or linear functions with the conversion of a numerical value over a given interval to an angular displacement.

There is plenty of mathematics involved in this project, as well as programming. Although it has been set up for computer science classes, it is an interdisciplinary project that can easily be adapted to different subjects and be incorporated into math as well. I think it is important to teach math, but not just math. To get the students to really synthesize the subject, you need to combine math with several different disciplines such as physics, mechanics and digital sciences. A true STEM project will grab students’ attention and will motivate them to push themselves.

I’m proud of the way my students have picked up the start of this project. By working together, they are developing their autonomy, initiative and creativity. It was a good pilot project, and I would like to develop it further. Who knows, we might even get as far as flying a model fighter plane with the handheld!