Lesson 8: The Final Mission

Congratulations, Commander! You have learned all the necessary skills. Now it is time to combine them into a fully automated experiment script.

Session Goals
  • Combine Hardware Control, Orbit Tracking, and Data Logging.
  • Implement logic to handle Day/Night Cycles.
  • Execute a robust Mission Loop.

The Mission Task

Your program must run autonomously. It should monitor the ISS position, take photos only when lighting conditions are good, tag them with location data, and keep a detailed log of operations.

Key Concepts

Automation
Creating a system that runs by itself without human intervention.
Integration
Combining different software modules (Camera, Sensors, Logging) to work together as a single system.
Robustness
The ability of a computer system to cope with errors during execution and handle different states (like Day vs Night) gracefully.

Astro Pi Orbit

ISS Orbit Info

from astro_pi_orbit import ISS
UsageDescription
iss.get_status()Check sunlit status
iss.get_position()Get lat/lon

Camera

Raspberry Pi Camera

from picamzero import Camera
UsageDescription
cam.take_photo(file)Capture image

EXIF

Image Metadata

from exif import Image
UsageDescription
img = Image(file)Load image
img.gps_latitude = valSet latitude

Logzero

Logging

from logzero import logger
UsageDescription
logger.info(msg)Log info

Mission Control Interface

Output Terminal
Ready to execute...