| name | # bits | bytes used | approximate range |
|---|---|---|---|
| Full time | 40 | 0 - 4 | 4 msec to 136 years |
| Long seconds | 32 | 1 - 4 | 1 sec to 136 years |
| Long centons | 32 | 0 - 3 | 4 msec to 194 days |
| Short seconds | 16 | 1 - 2 | 1 sec to 18 hours |
| Short centons | 16 | 0 - 1 | 4 msec to 4 minutes |
save selected RAM data in case of warmstart
load persistent state data from EEPROM
enable loadshed interrupt handling
turn on CCPS power switch
initialize power control, turning on 12V converted for analog I/O
wait until enough power to keep 12V on without loadshed
determine wakeup cause
if alarm clock or watchdog timeout
report timeout error
if apparent power reset
report device error
if coldstart wakeup (alarm clock, solar, or lander)
decrement failure counts of soft-failed devices
initialize timer handling
initialize telemetry packet handling
if APXS was left on (night mode)
suspend APXS data collection
turn off APXS
if solar wakeup and {batt_usage} doesn't allow batteries for 12V
turn off CCPS
wait until enough power to keep 12V and modem transmit on
without loadshed
check for automatic mission phase change based on gravity
if on Mars
close 3BSS switch to bring all batteries on-line
if coldstart
heat modem for {MODEM_HEAT} seconds
perform clock sync communication with lander
if unexpected warmstart and possibly valid telemetry data left in RAM
send telemetry data
perform {HEALTH_LEVEL} health check
start control loop
steer wheels straight do navigation_startup start drive motors (all forward) loop until at destination or untraversable hazard: high_rate loop (until at next stop point): do drive_update check distance to goal do navigation_check end stop wheels if time for heartbeat do heartbeat communication do hazard_avoidance adjust steering toward goal (or along avoidance heading) (Figure 6) restart drive motors end do navigation_stop
set time limit steer wheels to specified steering angles do navigation_startup start drive motors in specified direction loop until reached destination or hazard do drive_update do navigation_check end stop wheels do navigation_stop
set time limit steer wheels to turn-in-place position (Figure 5) do navigation_startup start drive motors (L & R sides in opposite direction) for shortest turn direction loop until about to cross desired heading, or hazard do drive_update do navigation_check end stop wheels do navigation_stop
set time limit steer wheels straight do navigation_startup start drive motors (all reverse) loop until contact, reached travel limit or hazard check APXS contact for done do drive_update do navigation_check end stop wheels do navigation_stop
navigation_startup
turn on and calibrate gyro
turn on accelerometers, LEDs (encoders)
initialize contact sensors
record telemetry header
navigation_stop
turn off accels, contact sensors (gyro is left on for stability)
finish telemetry
drive_update
scan sensors
update dead reckoning
update telemetry
navigation_check
check timeout
check loadshed
check lander proximity hazard
check for sensors exceeding safe limits (at the current {RISK_LEVEL})
check for unmasked contact
check motor current (overheat or stall)
Turn to specified absolute heading (expected sun position) Capture image with specified camera Locate sky region of image Locate sun heading (center of intensity gradient) in image Set vehicle heading to expected heading - measured heading
if auto-exposure requested determine appropriate exposure time capture image acquire specified region of the image to bulk RAM if compression requested perform BTC compression in place format and send image data telemetry packets
read all sensors, record current state in telemetry packet check A/D reference ground and power levels check solar panels and batteries voltage and current with switchable devices off check power converters voltage and current with switchable devices off check memory read/write test RAM, error-check EEPROM check alarm clock, time stamp check temperature sensors check modem current usage (Rx and Tx modes) check lasers current usage, check spot detection check CCDs change in average image intensity between very short and very long exposures current usage check acceleration sensors min/max readings during traverse, current usage check potentiometer sensors (steering, bogeys, differential) min/max readings during traverse current usage check wheel encoder accumulated change during traverse current usage check heaters current usage, temperature change check motor heater banks check current usage (check temperature change in front wheels?) send results packet reset traverse sensor limitsIf a power source has failed, devices depending on that source are not checked.
| Context | Commands |
|---|---|
| General | main loop, APXS, MAE, set parameter, patch |
| Navigation | Goto waypoint, find rock, unstow, move, turn, health check, soil experiments |
| Imaging | capture image |