State Machine Documentation - aa236b-winter-2019/software-documentation GitHub Wiki

Table of Contents

Introduction

Packages Used

States

Introduction

This wiki page describes how the state machine works. It will detail the various states of the satellite and the necessary conditions for the flight software to switch modes. (To Be Continued)

Packages Used (To Be Updated)

  • math

States (To Be Completed)

  • Hold
  • DeployAntenna
  • Detumble
    • The State Machine initializes PandaSat in the Detumble state (?). This state turns on the magnetorquer for for 60 seconds and then switches PandaSat into the BatteryBeaconCheck state.
  • BatteryBeaconCheck
    • The BatteryBeaconCheck state shuts off the magnetorquer, and then compares the current battery voltage against a preset beaconing threshold for 1 second. If the battery voltage exceeds the threshold, PandaSat is switched into the Beacon state. Otherwise, PandaSat is switched into the Sleep state.
  • Sleep
    • The Sleep state waits 60 seconds and then switches PandaSat back into the BatteryBeaconCheck state. During this time, the battery should be charging via the solar panels.
  • Beacon
    • The Beacon state sends a health data beacon signal for 10 seconds and then switches PandaSat into the Listen state.
  • Listen
    • The Listen state listens for a ground signal for 15 seconds and then switches PandaSat into the UplinkCheck state.
  • UplinkCheck
    • The UplinkCheck state checks to see if an uplink was made in the Listen state for 1 second. If an uplink was request, PandaSat is switched into the ProcessUplink state. Otherwise, PandaSat is switched into the PayloadScheduleCheck state.
  • ProcessUplink
    • The ProcessUplink state processes the uplink over 10 seconds and switches PandaSat into the DownlinkCheck State.
  • DownlinkCheck
    • The DownlinkCheck state checks for a downlink request for 1 second. If a downlink was requested, PandaSat is switched into the Downlink state. Otherwise, PandaSat is switched into the PayloadScheduleCheck state.
  • Downlink
    • The Downlink state downlinks data to the groundstation for 5 minutes and then switches PandaSat into the PayloadScheduleCheck state.
  • PayloadScheduleCheck
    • The PayloadScheduleCheck state checks if a payload operation was requested for 1 second. If the current time satisfies the condition for payload operation, PandaSat is switched into the BatteryPayloadCheck state. Otherwise, PandaSat is switched into the TumbleCheck state.
  • BatteryPayloadCheck
    • The BatteryPayloadCheck state compares the current battery voltage against a preset payload threshold for 1 second. If the battery voltage exceeds the threshold, PandaSat is switched into the PayloadOn state. Otherwise, PandaSat is switched into the TumbleCheck state.
  • PayloadOn
    • The PayloadOn state turns the payload on for 5 minutes and then switches PandaSat into the TumbleCheck state.
  • TumbleCheck
    • The TumbleCheck state compared the current angular velocity against a preset tumble threshold for 1 second. If the angular velocity exceeds the threshold, PandaSat is switched into the BatteryTumbleCheck state. Otherwise, PandaSat is switched into the Sleep state.
  • BatteryTumbleCheck
    • The BatteryTumbleCheck state compares the current battery voltage against a preset detumble threshold for 1 second. If the battery voltage exceeds the threshold, PandaSat is switched into the Detumble state. Otherwise, PandaSat is switched into the Sleep state.