POWER_READ_TEMP_CMDÂ
First byte is command, second byte is which temperature to read. Transmitted over CAN
POWER_READ_SOLAR_CURRENT_CMD
First byte is command, second byte is which current to read. Transmitted over CAN
POWER_READ_LOAD_CURRENT_CMD
First byte is command, second byte is which current to read. Transmitted over CAN
POWER_READ_MSB_VOLTAGE_CMD,
Single byte, transmitted over CAN
POWER_GET_BATTERY_SOC_CMD
Single byte, transmitted over CAN
POWER_GET_SA_CHARGE_STATE_CMD,
Single byte, transmitted over CAN
POWER_GET_BOOT_COUNT_CMD,
Single byte, transmitted over CAN
POWER_FRAM_GET_OPMODE_CMD,
Single byte is command, transmitted over CAN
POWER_FRAM_GET_SOC_CMD,
Single byte is command, transmitted over CAN
POWER_FRAM_GET_BOOT_COUNT_CMD,
Single byte is command, transmitted over
POWER_SET_LOAD_OFF_CMD,
First byte is command, second byte is which load to turn off. Transmitted over CAN
POWER_SET_LOAD_ON_CMD,
First byte is command, second byte is which load to turn on. Transmitted over CAN
POWER_SET_SOLAR_OFF_CMD,
First byte is command, second byte is which solar cell to turn off. Transmitted over CAN
POWER_SET_SOLAR_ON_CMD,
First byte is command, second byte is which solar cell to turn on. Transmitted over CAN
POWER_SET_POW_MODE_CMD,
First byte is command, second byte is which power mode to set. Transmitted over CAN
POWER_RESET_LOAD_SWITCH_CMD,
Currently unused
The payload interface will be defined after the payload software is developed. The following commands are the preliminary commands and function prototypes to call:
calibrate ():
This method is used to run the radiometer calibration sequence. This should be called after the
ArcticSat has been oriented properly to have the payload antenna pointing to deep space. After
the calibration measurement has been completed, it returns a Boolean to indicate if measurement
was successful.
return (bool)
getCalibrate ():
This method retrieves the last calibration data and returns both the raw voltage and brightness
temperature measurements respectively.
return (float, float)
measure ():
This method runs the radiometer measurement sequence and stores the data. This should be
called when ArcticSat is over the measurement region. It returns a Boolean to indicate if
measurement was successful.
return (bool)
getRawMeasure ():
This method retrieves the last raw voltages measurements collected during the last pass over the
detection location. It returns an array of floats, this might have to be segmented and sent in
multiple instances, so it also returns an index position signifying where in the array it stopped.
return (array[float], uint8_t)
getTbMeasure ():
This retrieves the last processed brightness temperature collected during the last pass over the
detection location. It returns an array of floats, this might have to be segmented and sent in
multiple instances, so it also returns an index position signifying where in the array it stopped.
return (array[float], uint8_t)
getBoardTemp ():
This method returns the average temperature of the 3 thermistors on the payload radiometer
board.
return (float)
switchFrontEnd ():
This procedure switches the RF front end from the antenna to a matched load or vise-versa.
When called by the CDH would override the local version and switch position changes. Returns
Boolean to indicate if operation was successful.
return (bool)
ADCS_GET_MEASUREMENT_GYRO_CMD,
ADCS_GET_MEASUREMENT_MAGNETOMETER_CMD,
ADCS_SUN_SENSOR_SELECT_CMD
Used to switch between primary and backup sun sensors
ADCS_GET_MEASUREMENT_SUN_CMD,
ADCS_GET_SUN_POINTING_TM_CMD
Commands spacecraft to generate and transmit sun pointing telemetry
Earth vector, sun vector, sun sensor pixel values
ADCS_GET_ECLIPSE_TIME_CMD
Replies with next scheduled eclipse time
ADCS_SET_TR_STATE_CMD
Used to activate/deactivate torque rods remotely.
ADCS_SET_TR_POLARITY_CMD
Used to set the polarity of torque rods
ADCS_SET_TR_PWM_CMD
Used to directly set the PWM of torque rods.
Requires 2 additional input parameters - which torque rod to set and the PWM value to set to
ADCS_SET_GYRO_I2C_ADDRESS_CMD
Used to switch between primary and backup IMU - backup IMU has a different address
ADCS_SET_ECLIPSE_TIME_CMD
Schedules the next eclipse timeÂ
ADCS_PING_CMD
Send and receive a single byte to ADCS over SPI.
ADCS_SPI_SYNC_CMD
As SPI is a synchronous protocol, this transmits empty frames until ADCS is synchronized with CDH.
CDH_SCHEDULE_TTT_CMD
Schedules a time-tagged task. Any command in this document can be scheduled as a time-tagged task. This command has two arguments:
Time to execute task
Task to execute and task parameters (if applicable)
CDH_SET_TIME_CMD
Sets the current time on CDH
CDH_SET_DEPLOYMENT_STARTUP_STATE_CMD,
CDH_SET_DETUMBLING_STARTUP_STATE_CMD,
CDH_CLEAR_REBOOT_REASON_CMD,
CDH_FORCE_FW_STATE_CMD,
CDH_SET_FW_ARM_TIMEOUT_CMD,
CDH_WATCHDOG_DISABLE_CMD,
CDH_RQST_PWR_RESET_LOAD_CMD,
CDH_FW_IDLE_CMD
Set the IDLE state
CDH_FW_RX_FW_CMD
Set the RX_FW state
CDH_FW_PRE_VER_CMD
Run the pre-verify routine
CDH_FW_ARM_CMD
Arm CDH for update
CDH_FW_EXECUTE_CMD
Begin update
CDH_FW_EXECUTE_CONFIRM_CMD
Confirm update
CDH_FW_POST_VER_CMD
Verify update version is correct after update
CDH_GET_TIME_CMD
Replies with the current time on CDH
CDH_DOWNLOAD_LOG_FILE_CMD
Downloads a log file stored in non-volatile storage. Requires an argument for which filename to download
CDH_LIST_FILES_CMD
Lists files currently stored in non-volatile storage
CDH_LIST_FW_CMD
Lists firmware images stored in boot rom
CDH_GET_SPACECRAFT_STATUS_CMD,
CDH_GET_HW_STATUS_CMD,
CDH_FW_PUT_DATA_CMD,
CDH_FW_GET_STATE_CMD,
CDH_CHECKSUM_FILE_CMD,
CDH_MV_FILE_CMD,
CDH_RM_FILE_CMD,
CDH_CP_FILE_CMD,
CDH_CHECKSUM_PGRM_FLASH_CMD,
CDH_CP_TO_PGRM_FLASH_CMD,
CDH_GET_SW_VER_CMD,
CDH_GET_DES_VER_CMD,
CDH_GET_SPI_DIR_CMD,
CDH_GET_FS_FREE_SPACE_CMD,
CDH_FW_UPDATE_SPI_DIR_CMD,
CDH_FW_CREATE_SPI_DIR_CMD,
CDH_WRITE_PROG_FLASH_CMD,
CDH_ERASE_PROG_FLASH_CMD,
CDH_RESET_FW_MNGR_CMD,
CDH_FW_SET_CHECKSUM_CMD,
CDH_FW_SET_DESVER_CMD,
CDH_FORMAT_FS_CMD,
CDH_RESET_SYSTEM_CMD,
CDH_FW_RX_PROGRESS_CMD,
CDH_FW_PUT_DATA_2_CMD,
CDH_CHECKSUM_FILE_PART_CMD,
CDH_FILE_WRITE_CMD,
CDH_FILE_INSERT_CMD,
CDH_FILE_DELETE_CMD,
POWER_READ_TEMP_CMD: Reads board or thermistor temperature. Byte 0: Command, Byte 1: Thermistor ID (0–6). Transmitted over CAN.
POWER_READ_SOLAR_CURRENT_CMD: Reads current draw for a panel. Byte 0: Command, Byte 1: Panel ID (0–6). Transmitted over CAN.
POWER_READ_LOAD_CURRENT_CMD: Reads output current for a specific load. Byte 0: Command, Byte 1: Load ID. Transmitted over CAN.
POWER_READ_MSB_VOLTAGE_CMD: Reads Main Power Bus (MSB) voltage. Single byte. Transmitted over CAN.
POWER_GET_MASTER_CURRENT_CMD: Reads total system master current draw (mA). Single byte. Transmitted over CAN.
POWER_GET_BATTERY_SOC_CMD: Retrieves fused Battery State of Charge data. Single byte. Transmitted over CAN.
POWER_GET_BATTERY_STATE_CMD: Retrieves full BatterySoCState_t telemetry struct. Transmitted over CAN.
POWER_GET_SA_CHARGE_STATE_CMD: Retrieves Solar Array charge controller state. Single byte. Transmitted over CAN.
POWER_GET_BOOT_COUNT_CMD: Retrieves EPS boot count. Single byte. Transmitted over CAN.
POWER_GET_POW_MODE_STATE_CMD: Retrieves current POWER_MODE_STATE_t struct. Transmitted over CAN.
POWER_GET_SOLAR_PANEL_DATA_CMD: Retrieves SOLAR_PANEL_DATA_ENTRY for specified panel. Byte 0: Command, Byte 1: Panel ID.
POWER_GET_CCLSM_DATA_CMD: Retrieves active runtime telemetry for a CCLSM load. Byte 0: Command, Byte 1: Load ID.
POWER_FRAM_GET_OPMODE_CMD: Reads operating mode stored in non-volatile FRAM. Single byte. Transmitted over CAN.
POWER_FRAM_GET_SOC_CMD: Reads battery SoC stored in FRAM. Single byte. Transmitted over CAN.
POWER_FRAM_GET_BOOT_COUNT_CMD: Reads persistent boot count from FRAM. Single byte. Transmitted over CAN.
POWER_SET_LOAD_OFF_CMD: Disables power to a specific load switch. Byte 0: Command, Byte 1: Load ID. Transmitted over CAN.
POWER_SET_LOAD_ON_CMD: Enables power to a specific load switch. Byte 0: Command, Byte 1: Load ID. Transmitted over CAN.
POWER_SET_SOLAR_OFF_CMD: Disables a specific solar panel input. Byte 0: Command, Byte 1: Panel ID. Transmitted over CAN.
POWER_SET_SOLAR_ON_CMD: Enables a specific solar panel input. Byte 0: Command, Byte 1: Panel ID. Transmitted over CAN.
POWER_SET_POW_MODE_CMD: Sets operational power mode and transmits confirmation string back. Byte 0: Command, Byte 1: Target Mode.
POWER_REQ_POW_MODE_CHANGE_CMD: Power subsystem requests power state transition approval from CDH. Byte 0: Command, Byte 1: Current Mode, Byte 2: Requested Mode.
POWER_CDH_DEMAND_POW_MODE_CMD: Overrides power state directly (CDH-forced mode change). Byte 0: Command, Byte 1: Target Mode.
POWER_RESET_LOAD_SWITCH_CMD: Resets load switch fault status (currently unused).
Power State Struct (POWER_MODE_STATE_t)
current_mode: Current operating power mode (PowerMode_t).
previous_mode: Previous power mode for comparison (PowerMode_t).
requested_mode: Requested mode pending transition (PowerMode_t).
mode_changed: Flag indicating mode change occurred (uint8_t).
allow_change: Permission flag for mode changes (uint8_t).
change_lower: Flag for lower power mode transitions (uint8_t).
transition_pending: Flag indicating transition in progress (uint8_t).
cdh_upgrade_approval: Approval for higher power modes; 1=approved, 0=denied (uint8_t).
cdh_approved_mode: Highest mode CDH has approved upgrade to (PowerMode_t).
cdh_approval_time: Timestamp when CDH approval was granted (uint32_t).
last_mode_change_time: Timestamp of last mode change (uint32_t).
mode_duration: Time spent in current mode in ms (uint32_t).
Battery State Struct (BatterySoCState_t)
soc: Fused SoC [0..1] (float).
soc_coulomb: Coulomb-counter SoC [0..1] (float).
soc_ocv: Open-Circuit Voltage derived SoC [0..1] (float).
pack_capacity_mAh: Configured pack capacity for 3p2s setup (float).
coulomb_mAh: Accumulated charge basis in mAh from pulses (float).
last_pulse_tick: Tick at last pulse (uint32_t).
rest_elapsed_ms: Time in low-current rest state (uint32_t).
is_resting: Flag indicating rest state; 1=true, 0=false (uint8_t).
last_pack_voltage_V: Latest measured pack voltage in Volts (float).
last_pack_current_mA: Latest measured pack current in mA (float).
Solar Panel Data Entry (SOLAR_PANEL_DATA_ENTRY)
name[16]: ASCII panel name for debugging, e.g., "PANEL_A1" (char).
panel_id: Panel ID from 0–6 (uint8_t).
current_mA: Panel current output in mA (float).
current_raw_adc: Raw ADC reading for current (uint32_t).
switch_enabled: Switch status; 0=disabled, 1=enabled (uint8_t).
thermistor: Embedded thermistor data struct (thermistor_data_t).
panel_status: Status; 0=normal, 1=over_temp, 2=under_temp, 3=fault (uint8_t).
fault_flags: Bit field for fault tracking (uint8_t).
last_measurement_ms: Timestamp of last update (uint32_t).
measurement_count: Measurement counter (uint32_t).
Thermistor Data Struct (thermistor_data_t)
temperature_C: Current temperature in Celsius (float).
raw_adc: Raw ADC reading (uint32_t).
voltage_V: Converted voltage (float).
resistance_ohms: Calculated thermistor resistance (float).
status: Status; 0=normal, 1=high_temp, 2=low_temp, 3=error (uint8_t).
last_update_ms: Timestamp of last reading (uint32_t).
CCLSM Load Switch Entry (CCLSM_DATA_ENTRY)
name[16]: Subsystem label (char).
VOLTAGE_IN: Input voltage in mV (uint16_t).
VOLTAGE_OUT: Output voltage in mV, optional by module (uint16_t).
CURRENT_OUT: Output current in mA (uint16_t).
SWITCH_STATE: State; 0=off, 1=on (uint8_t).
SOFTWARE_PROTECTION_STATE: Software protection status (uint8_t).
SOFTWARE_FAULT_STATE: Software fault status (uint8_t).
HARDWARE_FAULT_STATE: Hardware fault status (uint8_t).
CCLSM_RESPONSE_TIME: Ping response time in ms (uint32_t).
CCLSM_WAITING_RESPONSE: Response flag; 0=received, 1=pending, 2=timeout (uint8_t).
calibrate(): Runs radiometer calibration facing deep space. Returns bool.
getCalibrate(): Returns last calibration values as (float raw_voltage, float brightness_temp).
measure(): Executes radiometer measurement sequence over target region. Returns bool.
getRawMeasure(): Returns raw voltages array and last index position as (float[] measurements, uint8_t index).
getTbMeasure(): Returns brightness temperature array and last index position as (float[] measurements, uint8_t index).
getBoardTemp(): Returns average temperature of 3 payload board thermistors in °C. Returns float.
switchFrontEnd(): Toggles RF front end between antenna and matched load. Returns bool.
ADCS_GET_MEASUREMENT_GYRO_CMD: Requests gyroscope measurements.
ADCS_GET_MEASUREMENT_MAGNETOMETER_CMD: Requests magnetometer measurements.
ADCS_SUN_SENSOR_SELECT_CMD: Toggles between primary and backup sun sensors.
ADCS_GET_MEASUREMENT_SUN_CMD: Requests sun sensor measurements.
ADCS_GET_SUN_POINTING_TM_CMD: Requests Earth vector, Sun vector, and sun sensor pixel values.
ADCS_GET_ECLIPSE_TIME_CMD: Returns next scheduled eclipse time.
ADCS_SET_TR_STATE_CMD: Activates or deactivates torque rods.
ADCS_SET_TR_POLARITY_CMD: Configures torque rod polarity.
ADCS_SET_TR_PWM_CMD: Sets torque rod PWM. Requires parameters: torque rod ID, PWM value.
ADCS_SET_GYRO_I2C_ADDRESS_CMD: Switches between primary and backup IMU I2C addresses.
ADCS_SET_ECLIPSE_TIME_CMD: Sets next scheduled eclipse time.
ADCS_PING_CMD: Transmits/receives single test byte over SPI.
ADCS_SPI_SYNC_CMD: Sends dummy frames to align CDH–ADCS SPI communication.
CDH_SCHEDULE_TTT_CMD: Schedules time-tagged task. Requires execution timestamp and task command/parameters.
CDH_SET_TIME_CMD: Sets current onboard CDH time.
CDH_SET_DEPLOYMENT_STARTUP_STATE_CMD: Sets deployment startup state.
CDH_SET_DETUMBLING_STARTUP_STATE_CMD: Sets detumbling startup state.
CDH_CLEAR_REBOOT_REASON_CMD: Clears reboot reason flags.
CDH_FORCE_FW_STATE_CMD: Forces firmware state transition.
CDH_SET_FW_ARM_TIMEOUT_CMD: Sets timeout for firmware arming.
CDH_WATCHDOG_DISABLE_CMD: Disables system watchdog.
CDH_RQST_PWR_RESET_LOAD_CMD: Requests power load reset from EPS.
CDH_FW_IDLE_CMD: Sets firmware state to IDLE.
CDH_FW_RX_FW_CMD: Sets firmware state to RX_FW.
CDH_FW_PRE_VER_CMD: Executes pre-verification routine.
CDH_FW_ARM_CMD: Arms firmware manager for flashing.
CDH_FW_EXECUTE_CMD: Commences firmware update execution.
CDH_FW_EXECUTE_CONFIRM_CMD: Confirms firmware update status.
CDH_FW_POST_VER_CMD: Verifies updated version signature post-update.
CDH_GET_TIME_CMD: Retrieves current CDH timestamp.
CDH_DOWNLOAD_LOG_FILE_CMD: Downloads non-volatile log file (requires filename argument).
CDH_LIST_FILES_CMD: Returns list of files currently stored in storage.
CDH_LIST_FW_CMD: Returns firmware images stored in boot ROM.
CDH_GET_SPACECRAFT_STATUS_CMD: Retrieves high-level spacecraft status.
CDH_GET_HW_STATUS_CMD: Retrieves CDH hardware status.
CDH_FW_PUT_DATA_CMD: Writes firmware binary block.
CDH_FW_GET_STATE_CMD: Returns firmware manager state.
CDH_CHECKSUM_FILE_CMD: Calculates checksum for specified file.
CDH_MV_FILE_CMD: Moves/renames file in storage.
CDH_RM_FILE_CMD: Deletes file from storage.
CDH_CP_FILE_CMD: Copies file in storage.
CDH_CHECKSUM_PGRM_FLASH_CMD: Calculates checksum of program flash memory.
CDH_CP_TO_PGRM_FLASH_CMD: Copies image from storage to program flash.
CDH_GET_SW_VER_CMD: Retrieves software version.
CDH_GET_DES_VER_CMD: Retrieves designated target version.
CDH_GET_SPI_DIR_CMD: Reads SPI directory contents.
CDH_GET_FS_FREE_SPACE_CMD: Returns remaining filesystem space.
CDH_FW_UPDATE_SPI_DIR_CMD: Updates SPI directory entry.
CDH_FW_CREATE_SPI_DIR_CMD: Creates directory entry in SPI flash.
CDH_WRITE_PROG_FLASH_CMD: Writes directly to program flash.
CDH_ERASE_PROG_FLASH_CMD: Erases program flash sector.
CDH_RESET_FW_MNGR_CMD: Resets firmware manager state machine.
CDH_FW_SET_CHECKSUM_CMD: Sets expected checksum for firmware image.
CDH_FW_SET_DESVER_CMD: Sets designated version string for update.
CDH_FORMAT_FS_CMD: Formats non-volatile filesystem.
CDH_RESET_SYSTEM_CMD: Triggers full CDH system reset.
CDH_FW_RX_PROGRESS_CMD: Queries firmware download progress.
CDH_FW_PUT_DATA_2_CMD: Secondary packet handler for firmware binary writes.
CDH_CHECKSUM_FILE_PART_CMD: Calculates checksum on partial file segment.
CDH_FILE_WRITE_CMD: Writes arbitrary data stream to file.
CDH_FILE_INSERT_CMD: Inserts data block into existing file.
CDH_FILE_DELETE_CMD: Truncates or deletes file target.