Before you keep reading...
Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.
Before you keep reading...
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.
9.7. Where is North: A Compass App (Optional)¶
This lesson provides an introduction to the Global Positioning System (GPS) as well as how to handle the complexity of many different screen sizes when designing mobile apps. It reinforces the enduring understandings of writing programs to execute algorithms, such as computing the center of a screen's width, as well as demonstrates how the GPS system in the app allows users to interact with their environment. The follow-up lesson is the My Directions Tutorial in Unit 7 which covers how to build an app that uses a Location sensor and Google Maps to get directions from a current location. The Walking Tour app in Unit 3 also reinforces the concept of GPS and identifying locations on a map.
The Student Lesson: Complete the activities for Mobile CSP Lesson 9.7: Where is North? A Compass App.
- The sensors require a device (phone or tablet) to test rather than the emulator. (The OrientationSensor does not work currently on the emulator.) Also, it looks like not all tablets will have the hardware sensors needed.
- Location Sensor Tester App
- Where is North Solutions
Estimated Length: 45 minutes
- Hook/Motivation (10 minutes): Have the students brainstorm apps that use their location. Discuss what makes an app location aware.
- Experiences and Explorations (20 minutes):
- Have students try using the Location Sensor Tester app. This is a very simple example of an app that has location awareness. It requires no coding.
- Lead the students through the Where is North Tutorial, which explains how to use the orientation sensor and location sensor to determine which direction North is in, as with a compass. During the walk-through explain that sensors in mobile devices facilitate new ways of interacting with the environment. During the walk-through explain that GPS stands for Global Positioning System. Explain to the students that GPS has changed how humans travel, navigate, and find information.
- Rethink, Reflect and/or Revise (10 minutes): Review how to use the orientation and location sensors. Students should write a reflection in their portfolio (this may be assigned for homework). Have students try the interactive exercises on location awareness.
Formative Assessment: Interactive exercises on the Mobile CSP lesson page
PROFESSIONAL DEVELOPMENT - Background Knowledge
Read more about the App Inventor Location and Orientation sensors.
Directional Bugs: As some of you are noticing, and as others have noticed in the past, there is a bug in the "Where is North" app. The azimuth correction — adding 90 — doesn't work well for other directions besides North. The reason is that the sprite heading changes from 0 to 360 in a clockwise direction, whereas the azimuth changes from 0 to 360 in a counter-clockwise direction. Alan Tranciato (Meriden High School, Meriden CT) has created a nice fix for this — i.e., he wrote a procedure that converts azimuth to heading. (Procedures are covered in Unit 5.)
9.7.1. Teacher PD Reflection¶
Discuss the following questions with other teachers in your professional development program.
- How does this lesson help students toward the enduring understanding that people write programs to implement algorithms?
- How does this lesson help students toward the enduring understanding that computing enhances communication, interaction, and cognition?
- How does this lesson help students develop the computational thinking practice of analyzing problems and artifacts?