CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
adcs_commands.h File Reference
Include dependency graph for adcs_commands.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t ADCS_initialize ()
 Initialize the ADCS CRC, timestamp, and file system directory.
 
uint8_t ADCS_reset ()
 Instruct the ADCS to execute the ADCS_Reset command.
 
uint8_t ADCS_get_identification (ADCS_id_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Identification command.
 
uint8_t ADCS_get_program_status (ADCS_boot_running_status_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Program_Status command.
 
uint8_t ADCS_get_communication_status (ADCS_comms_status_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Communication_Status command.
 
uint8_t ADCS_deploy_magnetometer (uint8_t deploy_timeout)
 Instruct the ADCS to execute the ADCS_Deploy_Magnetometer command.
 
uint8_t ADCS_set_run_mode (ADCS_run_mode_enum_t mode)
 Instruct the ADCS to execute the ADCS_Set_Run_Mode command.
 
uint8_t ADCS_clear_errors ()
 Instruct the ADCS to execute the ADCS_Clear_Errors command.
 
uint8_t ADCS_attitude_control_mode (ADCS_control_mode_enum_t mode, uint16_t timeout)
 Instruct the ADCS to execute the titular command.
 
uint8_t ADCS_attitude_estimation_mode (ADCS_estimation_mode_enum_t mode)
 Instruct the ADCS to execute the ADCS_Attitude_Estimation_Mode command.
 
uint8_t ADCS_cmd_ack (ADCS_cmd_ack_struct_t *ack)
 Instructs the ADCS to determine whether the last command succeeded. (Doesn't work for telemetry requests, by design.)
 
uint8_t ADCS_run_once ()
 Instruct the ADCS to execute the ADCS_Run_Once command.
 
uint8_t ADCS_set_magnetometer_mode (ADCS_magnetometer_mode_enum_t mode)
 Instruct the ADCS to execute the titular command.
 
uint8_t ADCS_set_magnetorquer_output (double x_duty, double y_duty, double z_duty)
 Instruct the ADCS to execute the ADCS_Set_Magnetorquer_Output command.
 
uint8_t ADCS_set_wheel_speed (int16_t x_speed, int16_t y_speed, int16_t z_speed)
 Instruct the ADCS to execute the titular command.
 
uint8_t ADCS_save_config ()
 Instruct the ADCS to execute the ADCS_Save_Config command.
 
uint8_t ADCS_get_estimate_angular_rates (ADCS_angular_rates_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Estimate_Angular_Rates command.
 
uint8_t ADCS_get_llh_position (ADCS_llh_position_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_LLH_Position command.
 
uint8_t ADCS_get_power_control (ADCS_power_control_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Power_Control command.
 
uint8_t ADCS_set_power_control (ADCS_power_select_enum_t cube_control_signal, ADCS_power_select_enum_t cube_control_motor, ADCS_power_select_enum_t cube_sense1, ADCS_power_select_enum_t cube_sense2, ADCS_power_select_enum_t cube_star_power, ADCS_power_select_enum_t cube_wheel1_power, ADCS_power_select_enum_t cube_wheel2_power, ADCS_power_select_enum_t cube_wheel3_power, ADCS_power_select_enum_t motor_power, ADCS_power_select_enum_t gps_power)
 Set the power control mode of each component of the ADCS; for each, 0 turns the component off, 1 turns it on, and 2 keeps it the same as previously.
 
uint8_t ADCS_set_magnetometer_config (double mounting_transform_alpha_angle, double mounting_transform_beta_angle, double mounting_transform_gamma_angle, double channel_1_offset, double channel_2_offset, double channel_3_offset, double sensitivity_matrix_s11, double sensitivity_matrix_s22, double sensitivity_matrix_s33, double sensitivity_matrix_s12, double sensitivity_matrix_s13, double sensitivity_matrix_s21, double sensitivity_matrix_s23, double sensitivity_matrix_s31, double sensitivity_matrix_s32)
 Instruct the ADCS to set the magnetometer configuration.
 
uint8_t ADCS_bootloader_clear_errors ()
 Instruct the ADCS to execute the ADCS_Bootloader_Clear_Errors command.
 
uint8_t ADCS_set_unix_time_save_mode (bool save_now, bool save_on_update, bool save_periodic, uint8_t period_s)
 Instruct the ADCS to execute the ADCS_Set_Unix_Time_Save_Mode command.
 
uint8_t ADCS_get_unix_time_save_mode (ADCS_set_unix_time_save_mode_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Unix_Time_Save_Mode command.
 
uint8_t ADCS_set_sgp4_orbit_params (double inclination, double eccentricity, double ascending_node_right_ascension, double perigee_argument, double b_star_drag_term, double mean_motion, double mean_anomaly, double epoch)
 Instruct the ADCS to execute the ADCS_Set_SGP4_Orbit_Params command.
 
uint8_t ADCS_get_sgp4_orbit_params (ADCS_orbit_params_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_SGP4_Orbit_Params command.
 
uint8_t ADCS_save_orbit_params ()
 Instruct the ADCS to execute the ADCS_Save_Orbit_Params command.
 
uint8_t ADCS_get_rate_sensor_rates (ADCS_rated_sensor_rates_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Rate_Sensor_Rates command.
 
uint8_t ADCS_get_wheel_speed (ADCS_wheel_speed_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Wheel_Speed command.
 
uint8_t ADCS_get_magnetorquer_command (ADCS_magnetorquer_command_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Magnetorquer_Command command.
 
uint8_t ADCS_get_raw_magnetometer_values (ADCS_raw_magnetometer_values_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Raw_Magnetometer_Values command.
 
uint8_t ADCS_get_estimate_fine_angular_rates (ADCS_fine_angular_rates_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Estimate_Fine_Angular_Rates command.
 
uint8_t ADCS_get_magnetometer_config (ADCS_magnetometer_config_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Magnetometer_Config command.
 
uint8_t ADCS_get_commanded_attitude_angles (ADCS_commanded_angles_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Commanded_Attitude_Angles command.
 
uint8_t ADCS_set_commanded_attitude_angles (double x, double y, double z)
 Instruct the ADCS to execute the ADCS_Set_Commanded_Attitude_Angles command.
 
uint8_t ADCS_set_estimation_params (float magnetometer_rate_filter_system_noise, float extended_kalman_filter_system_noise, float coarse_sun_sensor_measurement_noise, float sun_sensor_measurement_noise, float nadir_sensor_measurement_noise, float magnetometer_measurement_noise, float star_tracker_measurement_noise, bool use_sun_sensor, bool use_nadir_sensor, bool use_css, bool use_star_tracker, bool nadir_sensor_terminator_test, bool automatic_magnetometer_recovery, ADCS_magnetometer_mode_enum_t magnetometer_mode, ADCS_magnetometer_mode_enum_t magnetometer_selection_for_raw_magnetometer_telemetry, bool automatic_estimation_transition_due_to_rate_sensor_errors, bool wheel_30s_power_up_delay, uint8_t error_counter_reset_period_min)
 Instruct the ADCS to execute the ADCS_Set_Estimation_Params command.
 
uint8_t ADCS_get_estimation_params (ADCS_estimation_params_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Estimation_Params command.
 
uint8_t ADCS_set_augmented_sgp4_params (double incl_coefficient, double raan_coefficient, double ecc_coefficient, double aop_coefficient, double time_coefficient, double pos_coefficient, double maximum_position_error, ADCS_augmented_sgp4_filter_enum_t augmented_sgp4_filter, double xp_coefficient, double yp_coefficient, uint8_t gps_roll_over, double position_sd, double velocity_sd, uint8_t min_satellites, double time_gain, double max_lag, uint16_t min_samples)
 Set the Augmented SGP4 Parameters of the ADCS.
 
uint8_t ADCS_get_augmented_sgp4_params (ADCS_augmented_sgp4_params_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Augmented_SGP4_Params command.
 
uint8_t ADCS_set_tracking_controller_target_reference (float lon, float lat, float alt)
 Instruct the ADCS to execute the ADCS_Set_Tracking_Controller_Target_Reference command.
 
uint8_t ADCS_get_tracking_controller_target_reference (ADCS_tracking_controller_target_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Tracking_Controller_Target_Reference command.
 
uint8_t ADCS_set_rate_gyro_config (ADCS_axis_select_enum_t gyro1, ADCS_axis_select_enum_t gyro2, ADCS_axis_select_enum_t gyro3, double x_rate_offset, double y_rate_offset, double z_rate_offset, uint8_t rate_sensor_mult)
 Instruct the ADCS to execute the ADCS_Set_Rate_Gyro_Config command.
 
uint8_t ADCS_get_rate_gyro_config (ADCS_rate_gyro_config_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Get_Rate_Gyro_Config command.
 
uint8_t ADCS_get_estimated_attitude_angles (ADCS_estimated_attitude_angles_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Estimated_Attitude_Angles command.
 
uint8_t ADCS_get_magnetic_field_vector (ADCS_magnetic_field_vector_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Magnetic_Field_Vector command.
 
uint8_t ADCS_get_fine_sun_vector (ADCS_fine_sun_vector_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Fine_Sun_Vector command.
 
uint8_t ADCS_get_nadir_vector (ADCS_nadir_vector_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Nadir_Vector command.
 
uint8_t ADCS_get_commanded_wheel_speed (ADCS_wheel_speed_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Commanded_Wheel_Speed command.
 
uint8_t ADCS_get_igrf_magnetic_field_vector (ADCS_magnetic_field_vector_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_IGRF_Magnetic_Field_Vector command.
 
uint8_t ADCS_get_quaternion_error_vector (ADCS_quaternion_error_vector_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Quaternion_Error_Vector command.
 
uint8_t ADCS_get_estimated_gyro_bias (ADCS_estimated_gyro_bias_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Estimated_Gyro_Bias command.
 
uint8_t ADCS_get_estimation_innovation_vector (ADCS_estimation_innovation_vector_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Estimation_Innovation_Vector command.
 
uint8_t ADCS_get_raw_cam1_sensor (ADCS_raw_cam_sensor_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Raw_Cam1_Sensor command.
 
uint8_t ADCS_get_raw_cam2_sensor (ADCS_raw_cam_sensor_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Raw_Cam2_Sensor command.
 
uint8_t ADCS_get_raw_coarse_sun_sensor_1_to_6 (ADCS_raw_coarse_sun_sensor_1_to_6_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Raw_Coarse_Sun_Sensor_1_to_6 command.
 
uint8_t ADCS_get_raw_coarse_sun_sensor_7_to_10 (ADCS_raw_coarse_sun_sensor_7_to_10_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Raw_Coarse_Sun_Sensor_7_to_10 command.
 
uint8_t ADCS_get_cubecontrol_current (ADCS_cubecontrol_current_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_CubeControl_Current command.
 
uint8_t ADCS_get_raw_gps_status (ADCS_raw_gps_status_struct_t *output_struct)
 
uint8_t ADCS_get_raw_gps_time (ADCS_raw_gps_time_struct_t *output_struct)
 
uint8_t ADCS_get_raw_gps_x (ADCS_raw_gps_struct_t *output_struct)
 
uint8_t ADCS_get_raw_gps_y (ADCS_raw_gps_struct_t *output_struct)
 
uint8_t ADCS_get_raw_gps_z (ADCS_raw_gps_struct_t *output_struct)
 
uint8_t ADCS_get_measurements (ADCS_measurements_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_Measurements command.
 
uint8_t ADCS_reset_file_list_read_pointer ()
 Instruct the ADCS to execute the ADCS_reset_file_list_read_pointer command.
 
uint8_t ADCS_advance_file_list_read_pointer ()
 Instruct the ADCS to execute the ADCS_advance_file_list_read_pointer command.
 
uint8_t ADCS_get_file_info_telemetry (ADCS_file_info_struct_t *output_struct)
 Request file information telemetry from the ADCS.
 
uint8_t ADCS_load_file_download_block (ADCS_file_type_enum_t file_type, uint8_t counter, uint32_t offset, uint16_t block_length)
 Instruct the ADCS to load a file download block into the download buffer.
 
uint8_t ADCS_get_download_block_ready_telemetry (ADCS_download_block_ready_struct_t *output_struct)
 Request Download Block Ready telemetry from the ADCS.
 
uint8_t ADCS_initiate_download_burst (bool ignore_hole_map)
 Send the Initiate Download Burst command to the ADCS.
 
uint8_t ADCS_set_hole_map (uint8_t *hole_map, uint8_t which_map)
 Send a File Upload Hole Map command to the ADCS.
 
uint8_t ADCS_get_hole_map (uint8_t *hole_map_struct, uint8_t which_map)
 Retrieve a File Upload Hole Map telemetry from the ADCS.
 
uint8_t ADCS_format_sd ()
 Instruct the ADCS to format the SD card.
 
uint8_t ADCS_erase_file (ADCS_file_type_enum_t filetype, uint8_t filecounter, bool erase_all)
 Send the Erase File command to the ADCS.
 
uint8_t ADCS_get_sd_card_format_erase_progress (ADCS_sd_card_format_erase_progress_struct_t *output_struct)
 Retrieve the SD card format/erase progress telemetry from the ADCS.
 
uint8_t ADCS_get_file_download_buffer (ADCS_file_download_buffer_struct_t *output_struct)
 Retrieve the File Download Buffer telemetry from the ADCS.
 
uint8_t ADCS_get_acp_execution_state (ADCS_acp_execution_state_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_execution_state command.
 
uint8_t ADCS_get_current_state_1 (ADCS_current_state_1_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_get_current_state_1 command. (There's an ADCS_current_state_2 command which is presently not implemented)
 
uint8_t ADCS_get_raw_star_tracker_data (ADCS_raw_star_tracker_struct_t *output_struct)
 Instruct the ADCS to execute the ADCS_get_raw_star_tracker_data command.
 
uint8_t ADCS_save_image_to_sd (ADCS_camera_select_enum_t camera_select, ADCS_image_size_enum_t image_size)
 Instruct the ADCS to save an image to the SD card.
 
uint8_t ADCS_get_current_unix_time (uint64_t *epoch_time_ms)
 Instruct the ADCS to execute the ADCS_get_current_unix_time command.
 
uint8_t ADCS_synchronize_unix_time ()
 Instruct the ADCS to synchronize its Unix epoch time to the current OBC Unix time.
 
uint8_t ADCS_set_sd_log_config (uint8_t which_log, const uint8_t **log_array, uint8_t log_array_size, uint16_t log_period, ADCS_sd_log_destination_enum_t which_sd)
 Instruct the ADCS to execute the ADCS_set_sd_log_config command.
 
uint8_t ADCS_get_sd_log_config (uint8_t which_log, ADCS_sd_log_config_struct *config)
 Instruct the ADCS to execute the ADCS_get_sd_log_config command.
 
int16_t ADCS_load_sd_file_block_to_filesystem (ADCS_file_info_struct_t file_info, uint8_t current_block, lfs_file_t *file)
 Save one block of the ADCS SD card file pointed to by the file pointer into the ADCS download buffer, then append it to the file in LittleFS.
 
int16_t ADCS_save_sd_file_to_lfs (bool index_file_bool, uint16_t file_index)
 Save a specified file from the ADCS SD card to the ADCS subfolder in LittleFS.
 
uint8_t ADCS_disable_SD_logging ()
 Disable all active ADCS SD card logs.
 
uint8_t ADCS_disable_peripherals_and_SD_logs_without_stabilisation ()
 Disable all ADCS peripherals and active SD card logs.
 
uint8_t ADCS_disable_peripherals_and_SD_logs_with_stabilisation ()
 Disable all ADCS peripherals and active SD card logs except the CubeSense Motor and Signal power, required for attitude stabilisation.
 
uint8_t ADCS_get_sd_card_file_list (uint16_t num_to_read, uint16_t index_offset)
 Get the list of files from the SD card.
 
uint8_t ADCS_erase_sd_file_by_index (uint16_t file_index)
 Given the index on the SD card of a file, erase that file.
 
uint8_t ADCS_bootloader_run_program ()
 Run the internal flash (CubeACP) program, exiting the bootloader. If CubeACP is already running, this function does nothing.
 

Function Documentation

◆ ADCS_advance_file_list_read_pointer()

uint8_t ADCS_advance_file_list_read_pointer ( )

Instruct the ADCS to execute the ADCS_advance_file_list_read_pointer command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_attitude_control_mode()

uint8_t ADCS_attitude_control_mode ( ADCS_control_mode_enum_t mode,
uint16_t timeout )

Instruct the ADCS to execute the titular command.

Parameters
modeControl mode to set (Table 77 in Firmware Manual)
timeoutTimeout to set control mode
Returns
0 if successful, non-zero if an error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_attitude_estimation_mode()

uint8_t ADCS_attitude_estimation_mode ( ADCS_estimation_mode_enum_t mode)

Instruct the ADCS to execute the ADCS_Attitude_Estimation_Mode command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_bootloader_clear_errors()

uint8_t ADCS_bootloader_clear_errors ( )

Instruct the ADCS to execute the ADCS_Bootloader_Clear_Errors command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the caller graph for this function:

◆ ADCS_bootloader_run_program()

uint8_t ADCS_bootloader_run_program ( )

Run the internal flash (CubeACP) program, exiting the bootloader. If CubeACP is already running, this function does nothing.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred.
Note
This function always returns an error, because if the ADCS leaves the bootloader it can't confirm this command, which commands it to leave the bootloader
Here is the caller graph for this function:

◆ ADCS_clear_errors()

uint8_t ADCS_clear_errors ( )

Instruct the ADCS to execute the ADCS_Clear_Errors command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_cmd_ack()

uint8_t ADCS_cmd_ack ( ADCS_cmd_ack_struct_t * ack)

Instructs the ADCS to determine whether the last command succeeded. (Doesn't work for telemetry requests, by design.)

Parameters
[out]ackStructure containing the formatted information about the last command sent.
Returns
0 if successful, non-zero if an error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_deploy_magnetometer()

uint8_t ADCS_deploy_magnetometer ( uint8_t deploy_timeout)

Instruct the ADCS to execute the ADCS_Deploy_Magnetometer command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_disable_peripherals_and_SD_logs_with_stabilisation()

uint8_t ADCS_disable_peripherals_and_SD_logs_with_stabilisation ( )

Disable all ADCS peripherals and active SD card logs except the CubeSense Motor and Signal power, required for attitude stabilisation.

Note
If CubeSense Motor and/or Signal Power are already off, they will remain off.
Compared to without_stabilisation, this costs average 250 mW, maximum 1 W extra.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_disable_peripherals_and_SD_logs_without_stabilisation()

uint8_t ADCS_disable_peripherals_and_SD_logs_without_stabilisation ( )

Disable all ADCS peripherals and active SD card logs.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_disable_SD_logging()

uint8_t ADCS_disable_SD_logging ( )

Disable all active ADCS SD card logs.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_erase_file()

uint8_t ADCS_erase_file ( ADCS_file_type_enum_t filetype,
uint8_t filecounter,
bool erase_all )

Send the Erase File command to the ADCS.

Parameters
[in]erase_file_commandPointer to a struct containing the file type, file counter, and erase all flag.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_erase_sd_file_by_index()

uint8_t ADCS_erase_sd_file_by_index ( uint16_t file_index)

Given the index on the SD card of a file, erase that file.

Parameters
[in]file_indexThe index of the file.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_format_sd()

uint8_t ADCS_format_sd ( )

Instruct the ADCS to format the SD card.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_acp_execution_state()

uint8_t ADCS_get_acp_execution_state ( ADCS_acp_execution_state_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_execution_state command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_augmented_sgp4_params()

uint8_t ADCS_get_augmented_sgp4_params ( ADCS_augmented_sgp4_params_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Augmented_SGP4_Params command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_commanded_attitude_angles()

uint8_t ADCS_get_commanded_attitude_angles ( ADCS_commanded_angles_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Commanded_Attitude_Angles command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_commanded_wheel_speed()

uint8_t ADCS_get_commanded_wheel_speed ( ADCS_wheel_speed_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Commanded_Wheel_Speed command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_communication_status()

uint8_t ADCS_get_communication_status ( ADCS_comms_status_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Communication_Status command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_cubecontrol_current()

uint8_t ADCS_get_cubecontrol_current ( ADCS_cubecontrol_current_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_CubeControl_Current command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_current_state_1()

uint8_t ADCS_get_current_state_1 ( ADCS_current_state_1_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_get_current_state_1 command. (There's an ADCS_current_state_2 command which is presently not implemented)

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_current_unix_time()

uint8_t ADCS_get_current_unix_time ( uint64_t * epoch_time_ms)

Instruct the ADCS to execute the ADCS_get_current_unix_time command.

Parameters
epoch_time_msPointer to uint64 to store the time since the Unix epoch in ms, according to the ADCS
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_download_block_ready_telemetry()

uint8_t ADCS_get_download_block_ready_telemetry ( ADCS_download_block_ready_struct_t * output_struct)

Request Download Block Ready telemetry from the ADCS.

Parameters
[out]output_structPointer to the struct to populate with telemetry data.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_estimate_angular_rates()

uint8_t ADCS_get_estimate_angular_rates ( ADCS_angular_rates_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Estimate_Angular_Rates command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_estimate_fine_angular_rates()

uint8_t ADCS_get_estimate_fine_angular_rates ( ADCS_fine_angular_rates_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Estimate_Fine_Angular_Rates command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_estimated_attitude_angles()

uint8_t ADCS_get_estimated_attitude_angles ( ADCS_estimated_attitude_angles_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Estimated_Attitude_Angles command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_estimated_gyro_bias()

uint8_t ADCS_get_estimated_gyro_bias ( ADCS_estimated_gyro_bias_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Estimated_Gyro_Bias command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_estimation_innovation_vector()

uint8_t ADCS_get_estimation_innovation_vector ( ADCS_estimation_innovation_vector_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Estimation_Innovation_Vector command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_estimation_params()

uint8_t ADCS_get_estimation_params ( ADCS_estimation_params_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Estimation_Params command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_file_download_buffer()

uint8_t ADCS_get_file_download_buffer ( ADCS_file_download_buffer_struct_t * output_struct)

Retrieve the File Download Buffer telemetry from the ADCS.

Parameters
[out]output_structPointer to the struct where the telemetry data will be stored.
Returns
0 if successful, non-zero if an error occurred in transmission or processing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_file_info_telemetry()

uint8_t ADCS_get_file_info_telemetry ( ADCS_file_info_struct_t * output_struct)

Request file information telemetry from the ADCS.

Parameters
[out]output_structPointer to the struct to store parsed telemetry data.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_fine_sun_vector()

uint8_t ADCS_get_fine_sun_vector ( ADCS_fine_sun_vector_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Fine_Sun_Vector command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_hole_map()

uint8_t ADCS_get_hole_map ( uint8_t * hole_map_struct,
uint8_t which_map )

Retrieve a File Upload Hole Map telemetry from the ADCS.

Parameters
[out]hole_map_structPointer to an array of uint8 to store the retrieved hole map.
[in]which_mapNumber between 1 and 8 to choose the hole map to upload.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:

◆ ADCS_get_identification()

uint8_t ADCS_get_identification ( ADCS_id_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Identification command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_igrf_magnetic_field_vector()

uint8_t ADCS_get_igrf_magnetic_field_vector ( ADCS_magnetic_field_vector_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_IGRF_Magnetic_Field_Vector command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_llh_position()

uint8_t ADCS_get_llh_position ( ADCS_llh_position_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_LLH_Position command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_magnetic_field_vector()

uint8_t ADCS_get_magnetic_field_vector ( ADCS_magnetic_field_vector_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Magnetic_Field_Vector command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_magnetometer_config()

uint8_t ADCS_get_magnetometer_config ( ADCS_magnetometer_config_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Magnetometer_Config command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_magnetorquer_command()

uint8_t ADCS_get_magnetorquer_command ( ADCS_magnetorquer_command_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Magnetorquer_Command command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_measurements()

uint8_t ADCS_get_measurements ( ADCS_measurements_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Measurements command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_nadir_vector()

uint8_t ADCS_get_nadir_vector ( ADCS_nadir_vector_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Nadir_Vector command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_power_control()

uint8_t ADCS_get_power_control ( ADCS_power_control_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Power_Control command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_program_status()

uint8_t ADCS_get_program_status ( ADCS_boot_running_status_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Program_Status command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_quaternion_error_vector()

uint8_t ADCS_get_quaternion_error_vector ( ADCS_quaternion_error_vector_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Quaternion_Error_Vector command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_rate_gyro_config()

uint8_t ADCS_get_rate_gyro_config ( ADCS_rate_gyro_config_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Rate_Gyro_Config command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_rate_sensor_rates()

uint8_t ADCS_get_rate_sensor_rates ( ADCS_rated_sensor_rates_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Rate_Sensor_Rates command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_raw_cam1_sensor()

uint8_t ADCS_get_raw_cam1_sensor ( ADCS_raw_cam_sensor_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Raw_Cam1_Sensor command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_raw_cam2_sensor()

uint8_t ADCS_get_raw_cam2_sensor ( ADCS_raw_cam_sensor_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Raw_Cam2_Sensor command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_raw_coarse_sun_sensor_1_to_6()

uint8_t ADCS_get_raw_coarse_sun_sensor_1_to_6 ( ADCS_raw_coarse_sun_sensor_1_to_6_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Raw_Coarse_Sun_Sensor_1_to_6 command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_raw_coarse_sun_sensor_7_to_10()

uint8_t ADCS_get_raw_coarse_sun_sensor_7_to_10 ( ADCS_raw_coarse_sun_sensor_7_to_10_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Raw_Coarse_Sun_Sensor_7_to_10 command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_raw_gps_status()

uint8_t ADCS_get_raw_gps_status ( ADCS_raw_gps_status_struct_t * output_struct)

◆ ADCS_get_raw_gps_time()

uint8_t ADCS_get_raw_gps_time ( ADCS_raw_gps_time_struct_t * output_struct)

◆ ADCS_get_raw_gps_x()

uint8_t ADCS_get_raw_gps_x ( ADCS_raw_gps_struct_t * output_struct)

◆ ADCS_get_raw_gps_y()

uint8_t ADCS_get_raw_gps_y ( ADCS_raw_gps_struct_t * output_struct)

◆ ADCS_get_raw_gps_z()

uint8_t ADCS_get_raw_gps_z ( ADCS_raw_gps_struct_t * output_struct)

◆ ADCS_get_raw_magnetometer_values()

uint8_t ADCS_get_raw_magnetometer_values ( ADCS_raw_magnetometer_values_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Raw_Magnetometer_Values command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_raw_star_tracker_data()

uint8_t ADCS_get_raw_star_tracker_data ( ADCS_raw_star_tracker_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_get_raw_star_tracker_data command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:

◆ ADCS_get_sd_card_file_list()

uint8_t ADCS_get_sd_card_file_list ( uint16_t num_to_read,
uint16_t index_offset )

Get the list of files from the SD card.

Parameters
[in]num_to_readThe maximum number of file entries to read.
[in]index_offsetThe index (starting at 0) from which to start reading files.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission, negative if an LFS or snprintf error code occurred.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_sd_card_format_erase_progress()

uint8_t ADCS_get_sd_card_format_erase_progress ( ADCS_sd_card_format_erase_progress_struct_t * output_struct)

Retrieve the SD card format/erase progress telemetry from the ADCS.

Parameters
[out]output_structPointer to the struct where the telemetry data will be stored.
Returns
0 if successful, non-zero if an error occurred in transmission or processing.
Here is the call graph for this function:

◆ ADCS_get_sd_log_config()

uint8_t ADCS_get_sd_log_config ( uint8_t which_log,
ADCS_sd_log_config_struct * config )

Instruct the ADCS to execute the ADCS_get_sd_log_config command.

Parameters
[in]configPointer to struct to store the config data
[in]which_log1 or 2; which specific log number to log to the SD card
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_sgp4_orbit_params()

uint8_t ADCS_get_sgp4_orbit_params ( ADCS_orbit_params_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_SGP4_Orbit_Params command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_tracking_controller_target_reference()

uint8_t ADCS_get_tracking_controller_target_reference ( ADCS_tracking_controller_target_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Tracking_Controller_Target_Reference command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_unix_time_save_mode()

uint8_t ADCS_get_unix_time_save_mode ( ADCS_set_unix_time_save_mode_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Unix_Time_Save_Mode command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_get_wheel_speed()

uint8_t ADCS_get_wheel_speed ( ADCS_wheel_speed_struct_t * output_struct)

Instruct the ADCS to execute the ADCS_Get_Wheel_Speed command.

Parameters
output_structPointer to struct in which to place packed ADCS telemetry data
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_initialize()

uint8_t ADCS_initialize ( )

Initialize the ADCS CRC, timestamp, and file system directory.

Returns
0 when successful
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_initiate_download_burst()

uint8_t ADCS_initiate_download_burst ( bool ignore_hole_map)

Send the Initiate Download Burst command to the ADCS.

Parameters
[in]ignore_hole_mapBoolean flag to ignore the hole map.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_load_file_download_block()

uint8_t ADCS_load_file_download_block ( ADCS_file_type_enum_t file_type,
uint8_t counter,
uint32_t offset,
uint16_t block_length )

Instruct the ADCS to load a file download block into the download buffer.

Parameters
[in]file_typeFile type to load (e.g., telemetry log, JPG, etc.).
[in]counterCounter value for file block.
[in]offsetOffset in the file from which to start downloading.
[in]block_lengthNumber of packets to send.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_load_sd_file_block_to_filesystem()

int16_t ADCS_load_sd_file_block_to_filesystem ( ADCS_file_info_struct_t file_info,
uint8_t current_block,
lfs_file_t * file )

Save one block of the ADCS SD card file pointed to by the file pointer into the ADCS download buffer, then append it to the file in LittleFS.

Parameters
[in]file_infoA struct containing information about the currently-pointed-to file
[in]current_blockThe block to load into the download buffer
[in]filePointer to LittleFS file to store everything to
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission. Specifically: bytes 0-2 are the ADCS error, bytes 3-10 are which command failed, bytes 11-16 are the index of the failure if applicable
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_reset()

uint8_t ADCS_reset ( )

Instruct the ADCS to execute the ADCS_Reset command.

Returns
0 if successful, non-zero if a HAL error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_reset_file_list_read_pointer()

uint8_t ADCS_reset_file_list_read_pointer ( )

Instruct the ADCS to execute the ADCS_reset_file_list_read_pointer command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_run_once()

uint8_t ADCS_run_once ( )

Instruct the ADCS to execute the ADCS_Run_Once command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_save_config()

uint8_t ADCS_save_config ( )

Instruct the ADCS to execute the ADCS_Save_Config command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_save_image_to_sd()

uint8_t ADCS_save_image_to_sd ( ADCS_camera_select_enum_t camera_select,
ADCS_image_size_enum_t image_size )

Instruct the ADCS to save an image to the SD card.

Parameters
[in]camera_select(int) Which camera to save the image from; can be Camera 1 (0) [sun], Camera 2 (1) [nadir, boom-side], or Star (2) [not on CTS-SAT-1]
[in]image_size(int) Resolution of the image to save; can be 1024x1024 (0), 512x512 (1), 256x256 (2), 128x128 (3), or 64x64 (4)
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_save_orbit_params()

uint8_t ADCS_save_orbit_params ( )

Instruct the ADCS to execute the ADCS_Save_Orbit_Params command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_save_sd_file_to_lfs()

int16_t ADCS_save_sd_file_to_lfs ( bool index_file_bool,
uint16_t file_index )

Save a specified file from the ADCS SD card to the ADCS subfolder in LittleFS.

Parameters
[in]index_file_boolWhether this is the index file or not
[in]file_indexIndex of the file in the SD card; only used if index_file_bool is false
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission, negative if an LFS or snprintf error code occurred. Specifically, assuming no HAL or LFS error: bytes 0-2 are the ADCS error, bytes 3-10 are which command failed, bytes 11-16 are the index of the failure if applicable
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_augmented_sgp4_params()

uint8_t ADCS_set_augmented_sgp4_params ( double incl_coefficient,
double raan_coefficient,
double ecc_coefficient,
double aop_coefficient,
double time_coefficient,
double pos_coefficient,
double maximum_position_error,
ADCS_augmented_sgp4_filter_enum_t augmented_sgp4_filter,
double xp_coefficient,
double yp_coefficient,
uint8_t gps_roll_over,
double position_sd,
double velocity_sd,
uint8_t min_satellites,
double time_gain,
double max_lag,
uint16_t min_samples )

Set the Augmented SGP4 Parameters of the ADCS.

Parameters
[in]incl_coefficientSet inclination filter coefficient
[in]raan_coefficientSet RAAN filter coefficient
[in]ecc_coefficientSet eccentricity filter coefficient
[in]aop_coefficientSet argument of perigee filter coefficient
[in]time_coefficientSet time filter coefficient
[in]pos_coefficientSet position filter coefficient
[in]maximum_position_errorMaximum position error for Augmented_SGP4 to continue working
[in]augmented_sgp4_filterThe type of filter being used (enum)
[in]xp_coefficientPolar coefficient xp
[in]yp_coefficientPolar coefficient yp
[in]gps_roll_overGPS roll over number
[in]position_sdMaximum position standard deviation for Augmented_SGP4 to continue working
[in]velocity_sdMaximum velocity standard deviation for Augmented_SGP4 to continue working
[in]min_satellitesMinimum satellites required for Augmented_SGP4 to continue working
[in]time_gainTime offset compensation gain
[in]max_lagMaximum lagged timestamp measurements to incorporate
[in]min_samplesMinimum samples to use to get Augmented_SGP4
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_commanded_attitude_angles()

uint8_t ADCS_set_commanded_attitude_angles ( double x,
double y,
double z )

Instruct the ADCS to execute the ADCS_Set_Commanded_Attitude_Angles command.

Parameters
[in]xx attitude angle
[in]yy attitude angle
[in]zz attitude angle
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_estimation_params()

uint8_t ADCS_set_estimation_params ( float magnetometer_rate_filter_system_noise,
float extended_kalman_filter_system_noise,
float coarse_sun_sensor_measurement_noise,
float sun_sensor_measurement_noise,
float nadir_sensor_measurement_noise,
float magnetometer_measurement_noise,
float star_tracker_measurement_noise,
bool use_sun_sensor,
bool use_nadir_sensor,
bool use_css,
bool use_star_tracker,
bool nadir_sensor_terminator_test,
bool automatic_magnetometer_recovery,
ADCS_magnetometer_mode_enum_t magnetometer_mode,
ADCS_magnetometer_mode_enum_t magnetometer_selection_for_raw_magnetometer_telemetry,
bool automatic_estimation_transition_due_to_rate_sensor_errors,
bool wheel_30s_power_up_delay,
uint8_t error_counter_reset_period_min )

Instruct the ADCS to execute the ADCS_Set_Estimation_Params command.

Parameters
[in]magnetometer_rate_filter_system_noiseMagnetometer rate filter system noise parameter
[in]extended_kalman_filter_system_noiseEKS system noise parameter
[in]coarse_sun_sensor_measurement_noiseCSS measurement noise parameter
[in]sun_sensor_measurement_noisesun sensor measurement noise parameter
[in]nadir_sensor_measurement_noisenadir sensor measurement noise parameter
[in]magnetometer_measurement_noisemagnetometer measurement noise parameter
[in]star_tracker_measurement_noisestar tracker measurement noise parameter
[in]use_sun_sensorwhether or not to use the sun sensor measurement in extended kalman filter
[in]use_nadir_sensorwhether or not to use the nadir sensor measurement in extended kalman filter
[in]use_csswhether or not to use the CSS measurement in extended kalman filter
[in]use_star_trackerwhether or not to use the star tracker measurement in extended kalman filter
[in]nadir_sensor_terminator_testselect to ignore nadir sensor measurements when terminator is in FOV
[in]automatic_magnetometer_recoveryselect whether automatic switch to redundant magnetometer should occur in case of failure
[in]magnetometer_modeselect magnetometer mode for estimation and control
[in]magnetometer_selection_for_raw_magnetometer_telemetryselect magnetometer mode for the second raw telemetry frame
[in]automatic_estimation_transition_due_to_rate_sensor_errorsenable/disable automatic transition from MEMS rate estimation mode to RKF in case of rate sensor error
[in]wheel_30s_power_up_delaypresent in CubeSupport but not in the manual – need to test
[in]error_counter_reset_period_minreset period for error counter
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_hole_map()

uint8_t ADCS_set_hole_map ( uint8_t * hole_map,
uint8_t which_map )

Send a File Upload Hole Map command to the ADCS.

Parameters
[in]hole_mapPointer to a 16-byte array representing the hole map.
[in]which_mapNumber between 1 and 8 to choose the hole map to upload.
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_magnetometer_config()

uint8_t ADCS_set_magnetometer_config ( double mounting_transform_alpha_angle,
double mounting_transform_beta_angle,
double mounting_transform_gamma_angle,
double channel_1_offset,
double channel_2_offset,
double channel_3_offset,
double sensitivity_matrix_s11,
double sensitivity_matrix_s22,
double sensitivity_matrix_s33,
double sensitivity_matrix_s12,
double sensitivity_matrix_s13,
double sensitivity_matrix_s21,
double sensitivity_matrix_s23,
double sensitivity_matrix_s31,
double sensitivity_matrix_s32 )

Instruct the ADCS to set the magnetometer configuration.

Parameters
mounting_transform_alpha_angleMounting transform alpha angle [deg]
mounting_transform_beta_angleMounting transform beta angle [deg]
mounting_transform_gamma_angleMounting transform gamma angle [deg]
channel_1_offsetChannel 1 offset value
channel_2_offsetChannel 2 offset value
channel_3_offsetChannel 3 offset value
sensitivity_matrix_s11Value (1, 1) of the magnetometer sensitivity matrix
sensitivity_matrix_s22Value (2, 2) of the magnetometer sensitivity matrix
sensitivity_matrix_s33Value (3, 3) of the magnetometer sensitivity matrix
sensitivity_matrix_s12Value (1, 2) of the magnetometer sensitivity matrix
sensitivity_matrix_s13Value (1, 3) of the magnetometer sensitivity matrix
sensitivity_matrix_s21Value (2, 1) of the magnetometer sensitivity matrix
sensitivity_matrix_s23Value (2, 3) of the magnetometer sensitivity matrix
sensitivity_matrix_s31Value (3, 1) of the magnetometer sensitivity matrix
sensitivity_matrix_s32Value (3, 2) of the magnetometer sensitivity matrix
Returns
0 if successful, non-zero if an error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_magnetometer_mode()

uint8_t ADCS_set_magnetometer_mode ( ADCS_magnetometer_mode_enum_t mode)

Instruct the ADCS to execute the titular command.

Parameters
modeMode to set (Table 89 in Firmware Manual)
Returns
0 if successful, non-zero if an error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_magnetorquer_output()

uint8_t ADCS_set_magnetorquer_output ( double x_duty,
double y_duty,
double z_duty )

Instruct the ADCS to execute the ADCS_Set_Magnetorquer_Output command.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_power_control()

uint8_t ADCS_set_power_control ( ADCS_power_select_enum_t cube_control_signal,
ADCS_power_select_enum_t cube_control_motor,
ADCS_power_select_enum_t cube_sense1,
ADCS_power_select_enum_t cube_sense2,
ADCS_power_select_enum_t cube_star_power,
ADCS_power_select_enum_t cube_wheel1_power,
ADCS_power_select_enum_t cube_wheel2_power,
ADCS_power_select_enum_t cube_wheel3_power,
ADCS_power_select_enum_t motor_power,
ADCS_power_select_enum_t gps_power )

Set the power control mode of each component of the ADCS; for each, 0 turns the component off, 1 turns it on, and 2 keeps it the same as previously.

Parameters
cube_control_signalPower control mode for cube control signal
cube_control_motorPower control mode for cube control motor
cube_sense1Power control mode for cube sense 1
cube_sense2Power control mode for cube sense 2
cube_star_powerPower control mode for cube star
cube_wheel1_powerPower control mode for cube wheel 1
cube_wheel2_powerPower control mode for cube wheel 2
cube_wheel3_powerPower control mode for cube wheel 3
motor_powerPower control mode for motor
gps_powerPower control mode for gps
Returns
0 if successful, non-zero if an error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_rate_gyro_config()

uint8_t ADCS_set_rate_gyro_config ( ADCS_axis_select_enum_t gyro1,
ADCS_axis_select_enum_t gyro2,
ADCS_axis_select_enum_t gyro3,
double x_rate_offset,
double y_rate_offset,
double z_rate_offset,
uint8_t rate_sensor_mult )

Instruct the ADCS to execute the ADCS_Set_Rate_Gyro_Config command.

Parameters
[in]gyro1Axis for Gyro #1 (options are pos/neg x, pos/neg y, pos/neg z)
[in]gyro2Axis for Gyro #2 (options are pos/neg x, pos/neg y, pos/neg z)
[in]gyro3Axis for Gyro #3 (options are pos/neg x, pos/neg y, pos/neg z)
[in]x_rate_offsetx-rate sensor offset
[in]y_rate_offsety-rate sensor offset
[in]z_rate_offsetz-rate sensor offset
[in]rate_sensor_multmultiplier of rate sensor measurement
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_run_mode()

uint8_t ADCS_set_run_mode ( ADCS_run_mode_enum_t mode)

Instruct the ADCS to execute the ADCS_Set_Run_Mode command.

Parameters
[in]modeRun mode to set; can be can be off (0), enabled (1), triggered (2), or simulation (3)
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_sd_log_config()

uint8_t ADCS_set_sd_log_config ( uint8_t which_log,
const uint8_t ** log_array,
uint8_t log_array_len,
uint16_t log_period,
ADCS_sd_log_destination_enum_t which_sd )

Instruct the ADCS to execute the ADCS_set_sd_log_config command.

Parameters
[in]which_log1 or 2; which specific log number to log to the SD card
[in]log_arrayPointer to list of bitmasks to set the log config
[in]log_array_lenNumber of things to log
[in]log_periodPeriod to log data to the SD card; if zero, then disable logging
[in]which_sdWhich SD card to log to; 0 for primary, 1 for secondary
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_sgp4_orbit_params()

uint8_t ADCS_set_sgp4_orbit_params ( double inclination,
double eccentricity,
double ascending_node_right_ascension,
double perigee_argument,
double b_star_drag_term,
double mean_motion,
double mean_anomaly,
double epoch )

Instruct the ADCS to execute the ADCS_Set_SGP4_Orbit_Params command.

Parameters
[in]inclinationinclination (degrees)
[in]eccentricityeccentricity (dimensionless)
[in]ascending_node_right_ascensionright ascension of the ascending node (degrees)
[in]perigee_argumentargument of perigee (degrees)
[in]b_star_drag_termb-star drag term (dimensionless)
[in]mean_motionmean motion (orbits per day)
[in]mean_anomalymean anomaly (degrees)
[in]epochepoch (double; integer component is year, decimal component is day)
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_tracking_controller_target_reference()

uint8_t ADCS_set_tracking_controller_target_reference ( float lon,
float lat,
float alt )

Instruct the ADCS to execute the ADCS_Set_Tracking_Controller_Target_Reference command.

Parameters
[in]lonlongitude
[in]latlatitude
[in]altaltitude
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_unix_time_save_mode()

uint8_t ADCS_set_unix_time_save_mode ( bool save_now,
bool save_on_update,
bool save_periodic,
uint8_t period_s )

Instruct the ADCS to execute the ADCS_Set_Unix_Time_Save_Mode command.

Parameters
[in]save_nowwhether to save the current Unix time immediately (bool passed as int; 1 = save immediately, 0 = don't save immediately)
[in]save_on_updatewhether to save the current Unix time whenever a command is used to update it (bool passed as int; 1 = save on command, 0 = don't)
[in]save_periodicwhether to save the current Unix time periodically (bool passed as int; 1 = save periodically, 0 = don't)
[in]period_sthe period of saving the current Unix time
Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_set_wheel_speed()

uint8_t ADCS_set_wheel_speed ( int16_t x_speed,
int16_t y_speed,
int16_t z_speed )

Instruct the ADCS to execute the titular command.

Parameters
x_speedWheel speed X value
y_speedWheel speed Y value
z_speedWheel speed Z value
Returns
0 if successful, non-zero if an error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADCS_synchronize_unix_time()

uint8_t ADCS_synchronize_unix_time ( )

Instruct the ADCS to synchronize its Unix epoch time to the current OBC Unix time.

Returns
0 if successful, non-zero if a HAL or ADCS error occurred in transmission.
Here is the call graph for this function:
Here is the caller graph for this function: