Arizona STEM
Acceleration Project
Coding a Drone to Fly on Mars: Three More Complex Missions Day 2
Coding a Drone to Fly on Mars: Three More Complex Missions! (2 of 2)
Coding and Forces of Flight with no drones required! Grades 3- 8
Lesson 2 of 2
Robert Lynch
5/20/2024
Notes for Teachers
List of materials:
7.P3U1.4 Use non-algebraic mathematics and computational thinking to explain Newton’s laws of motion.
Crosscutting Concepts:
Patterns; Cause and Effect; Scale, Proportion and Quantity; Systems and System Models; Energy and Matter; Structure and Function; Stability and Change4
Background Information:
For any pair of interacting objects, the force exerted by the first object on the second object is equal in strength to the force that the second object exerts on the first but in the opposite direction. The motion of an object is determined by the sum of the forces acting on it; if the total force on the object is not zero, its motion will change. The greater the mass of the object, the greater the force needed to achieve the same change in motion. For any given object, a larger force causes a larger change in motion. Forces on an object can also change its shape or orientation. All positions of objects and the directions of forces and motions must be described in an arbitrarily chosen reference frame and arbitrarily chosen units of size. In order to share information with other people, these choices must also be shared. 4 (pp. 115-116)
7.P3U1.3 Plan and carry out an investigation that can support an evidence-based explanation of how objects on Earth are affected by gravitational force.
U1: Scientists explain phenomena using evidence obtained from observations and or scientific investigations. Evidence may lead to developing models and or theories to make sense of phenomena. As new evidence is discovered, models and theories can be revised.
Objectives:
Today we will experiment with controlling a simulated drone flying in a simulated area on Mars
Today we will continue to use code to direct a drone to fly a specific course around several objects. This time we will be using the yaw feature of the blocks to rotate the camera towards the objects to inspect them.
Today students will demonstrate how to use pitch, roll, and yaw to move the drone through the air.
Today students will demonstrate an more complex understanding of how a UAV/Drone flies.
Today we will be able to control a drone as it completes more and more complex flight paths using math and angles to successfully move the drone around the flight path.
Today we will use the built in camera to assess the objects we are flying around and we will take pictures using the block code of those objects. Students will also get to experience flying in First Person View by clicking on the FPV view.
Agenda (65 minutes)
As a class view the short video from DroneBlocks about using the camera code block in DroneBlocks
(5 minutes)
Briefly experiment with the FPV view by creating the quick code as seen in the video and altering the height that the drone flys up. (5-10 minutes)
Relocate the drone to the habitat (indicated by an inserted red circle) - reorient the drone to face the habitat then code a path around the habitat so the camera is always facing the habitat. (15-20 minutes)
Relocate the drone to the rocket area (indicated by an inserted red circle) create a code that will fly up and down the height of the rocket from four different sides. Make sure the camera is facing towards the rocket the entire time. Incorporate the camera block to take pictures of various parts of the rocket or specific parts of the camera such as the now cone. (20 - 30 minutes)
Wrap up
Yesterday we experimented with coding a drone to fly around some solar panels that are set out around the Mars habitat.
Today we are going to use some additional features of the drone that will allow us to fly around certain objects while observing them from inside of our living spaces.
We will be using one of the features of a drone that sets allows it to be better suited for this type of investigation than an airplane or even a helicopter. This function is called yaw.
Using the yaw code blocks we will observe the objects we fly around using both the camera block and the FPV feature.
Intro/Driving Question/Opening
Hands On Activity Instructions Slides 1 of 3
To move the drone from the current location by the
solar panels you will need to scan out to an overhead
view.
In the lower right hand corner you will see a button
labeled Location.
While you are in the overhead mode locate the habitat
shown in the picture to the right.
Left click your drone to place the drone in front of the
habitat not the lunar vehicle inside the red circle.
Now code a sequence that will rotate the drone towards
the door of the habitat then fly to (not over) the habitat
and inspect the outside using the FPV feature and Yaw
so you can inspect all four sides of the living area and
then land where you started.
Then add the camera block to snap some pictures of the exterior of the living area.
Mission 1: Inspecting the Living Habitat
Hands On Activity Instructions Slide 2 of 3
Relocate to the ramp as indicated by the red circle.
Create code to rotate the drone towards the rocket then create a loo that will take the drone up that side of the rocket then return to the ground with the camera facing towards the rocket.
Now add additional code to move to the side of the rocket to the left or right of the original flight continue this pattern until you are back in the original location. Remember to direct the camera (using the yaw block) towards the rocket the entire time.
Lastly, use the camera block to take some pictures of the rocket. Either randomly, or specific parts as indicated by your teacher.
Mission 2: Inspecting the Rocket!
How do we assess our work?
Different types of assessment depending upon the outcome you were hoping for.
Engineering and the design process, did the students use “trial and error” to complete the missions. This requires attention by the teacher to determine if students built the code 1 - 2 blocks of code at at time adding checking and iterating.
Math did the students successfully use point to point coding that will incorporate a rectangle and a circle (mission 2) or perhaps a square if the students decide not to use the curve blocks.
Technology did the students understand how to use all three forces of motion to create the requested paths for the drone. Did the code the students use meet with your objectives you could have a contest to see who can code the 2 missions achieving the objective in the fewest number of blocks.
Science did the students use the minutes per second block which will vastly increase the speed of the drone but it will also be necessary to understand that an object in motion remains in motion until acted upon by other forces. In other words were the students able to move the drone quickly and precisely in concert with each other.
Language arts were the students able to write out what the drone needed to do to create the shape. Did the students use pseudocode to describe that they thought should happen. Did they then adjust their instructions after the first iteration of the code?
Differentiation
Allow students who are struggling to view the previous code that they used to create a rectangle around the solar panels. The code should be slightly different by the addition of rotating the drone towards the living area (top block under drone takeoff block), then the long sides of the rectangles will need to be adjusted.
Revisit the video Using the camera code block in DroneBlocks to help to cement in the steps or key blocks that they may have missed.
Pair students who are not as adept at coding to work with stronger students although pairing the less adept students with a very strong coder could backfire.
Having a pre prepared document that has the individual steps and blocks written out or even have screenshots of the blocks without the filled in numbers so that they can construct the code correctly then they will only have to adjust the numbers.
Allow
Remediation
Extension/Enrichment
Students who get finished quickly should try the following challenge.
Relocate the drone to the front of the maze. Attempt to create a path through the drone using the FPV and block coding. Strongly urge screenshots or even taking pictures with a camera to prevent students losing all of their work if they want to try again when the opportunity is available.
Explore one of the other simulation locations and create a mission for others in the room to complete if/when you have a second day to work with the simulations.
Teacher notes
The use of the simulator for free necessitates your being aware of when the simulator becomes available so going to the DroneBlocks site and signing up for the newsletter or email notifications is highly suggested.
If you have the financial means a year long subscription to DroneBlocks is 500.00
That gives you the teacher access to videos, weekly updates, and 100+ lessons created by DroneBlocks and other teachers who are using the site.
As students become more adept at creating coding and using the simulation you might want to consider getting DroneBlocks compatible drones that the students can fly in the simulation and then connect to the computer to upload the same code to fly the drones.
Simplified STEAM Standards
Used with permission from droneBlocks
Universal Standards & Skill Development Guide
SCIENCE
Understand that force acts on an object and includes strength and direction, causing the object to move.
Objects that appear to not be moving have multiple forces compiling to create zero force on the object.
The motion of an object can be observed and measured.
Synthesize information from a variety of sources to support ...understanding/testing Evaluate solutions, taking into consideration safety, reliability and impact
Observe, question, collect and evaluate data.
Universal Standards & Skill Development Guide
TECHNOLOGY
Technology can be created and improved by the interconnection of Science, Mathematics, and Engineering.
Utilize a variety of technology and resources to better understand concepts and solve problems.
Develop comprehension of the logic and syntax that goes into building or coding a program through engaging in and elaborating upon activities.
Simulate solutions to real-world problems using models and/or computer simulation. Program variables that represent quantities in mathematical problems.
Write conditional expressions to create program logic using if-else statements.
Universal Standards & Skill Development Guide
Improve and optimize results by identifying errors and using mathematics and technology to redesign and solve problems.
Evaluate, use prior knowledge such as scientific processes and real-world problems, and troubleshoot to develop a solution.
Discuss, explain, and collaborate to improve a product through iteration.
Design a device that converts one form of energy into another by building, testing, and refining. Determine the best solution to accomplish a given challenge.
Plan and carry out investigations...gain feedback through design process (design solutions)….construct arguments that provide a convincing explanation of solutions created through programming.
Engineering
Universal Standards & Skill Development Guide
ART
Make, design, and create using a variety of materials to develop a concept or learning experience. Brainstorm ideas through modeling and sketching.
Compile works of art to relate knowledge.
Universal Standards & Skill Development Guide
MATHEMATICS
Measure distances, width, length and speed to gain data for interpretation and refining engineering and design.
Integrate data analysis to collaborate and gain feedback.
Solve mathematical problems with numbers in any form, strategically using applicable tools.
Determine the probability of events and compare data from observed models. Explore and evaluate possible reasoning for discrepancies between models.
Observe an object’s motion, providing data and evidence to evaluate and predict future motion.
Develop and expand knowledge of geometry, understanding the concepts of measuring angles, and geometric constructions.
Understand how variables can be used to represent quantities in a real-world or mathematical problems.
Additional Content
How do Newton's three laws relate to a drone flying
Newton's three laws of motion are fundamental principles of physics that describe how objects move and interact with each other. These laws have a direct relationship to the flight of a drone and can help explain the physics behind its motion.
In the context of a drone, this law explains why the drone remains in the air when it is not being controlled or affected by any external forces. Once the drone is set in motion by the propellers, it will continue to fly forward until it is acted upon by another force, such as a change in wind direction or a command from the controller to change its flight path.
Additional Content
In the context of a drone, this law explains how the drone is able to change its speed and direction when it is being controlled by the user. By adjusting the amount of force applied to the propellers, the drone can accelerate, decelerate, or change direction. The mass of the drone also affects its acceleration - a lighter drone will be able to accelerate more quickly than a heavier one, given the same amount of force.
Additional Content
In the context of a drone, this law explains how the propellers generate lift and keep the drone in the air. As the propellers spin, they push air downward, creating an equal and opposite reaction that propels the drone upward. This lift force must be greater than the force of gravity pulling the drone down in order for it to remain in the air.
Overall, Newton's laws of motion help explain the fundamental principles of flight for a drone, including how it remains in the air, how it changes direction and speed, and how lift is generated to keep it aloft. By understanding these laws, drone pilots and enthusiasts can gain a deeper appreciation for the physics behind the technology and become better pilots as a result. (ChatGPT, personal communication, March 24, 2023)
Mission 1 Code without a loop, also without the camera block
Mission 2 Code to get your students started front and left of the rocket no loops no camera block