The objective of this test is to provide a baseline for testing the Extended Kalman Filter for attitude determination.
Test Description: This test will compare the attitude estimation using only gyroscope and magnetometer telemetry against a "ground truth" provided by Vicon motion tracking
Completed: 06/10/2025
Documented by: Riley Sweeney
Resources Required:
Tools: Torx T8 screwdriver
Hardware and Equipment: CubeADCS, Xbee Pro S3B, 3-axis gimbal, fishing line, laptop
PPE: Please use proper ESD safety when working with electronics
Verification Activities:
Pass Criteria:
There are three main components used in this test. These are:
The CubeADCS test piece, containing the EM CDH and ADCS PCBs (and all applicable sensors), batteries and power management, and an Xbee Pro S3B to send telemetry wirelessly.
The three axis gimbal to mount the CubeADCS to.
STAR Lab's Vicon test bed, where the gimbal will be placed to track its rotation.
CubeADCS (top)
CubeADCS (bottom)
3-axis gimbal
CubeADCS mounted to gimbal
Gimbal setup in Vicon testbed
This will outline the physical setup to perform the test. It is assumed that the correct firmware/software has been uploaded to the ADCS microcontroller and CDH OBC, and the CubeADCS is already assembled.
On the CubeADCS, unplug the AC power cable from its socket.
Place the CubeADCS in the gimbal as shown in the figure above. Note the orientation of the Vicon dots.
Use a Torx T8 screwdriver to tighten the set screws around the CubeADCS, there are 8 in total.
Plug the AC power cable back into its socket on the CubeADCS
Place the gimbal in the Vicon testbed as shown.
Turn on the Vicon cameras and launch the Vicon Tracker software. It is assumed the cameras are set up and calibrated.
Tie fishing line onto one of the rings of the gimbal.
On your computer, open the "import_gyroMag.py" in your preferred IDE. This program gathers telemetry from the CubeADCS wirelessly using an Xbee and saves it to a .csv file.
Connect the Xbee radio module to your computer via USB.
Ensure the COM port specified in Python matches with the Xbee in the Device Manager. Change if needed.
Modify the name of the output .csv file if needed. It will append data if the file already exists.
On the Vicon computer, open "Mitesh_Vicon_Multi_Objects_Just_Run_This.m" in Matlab.
Modify the name of the output file to your preference. This will contain the "ground truth" data gathered using Vicon.
Rotate the gimbal to wind the fishing line around it. Ensure there is consistent tension in the line while winding.
After winding the gimbal, run the spool of fishing line away from the gimbal and out of the view of the Vicon cameras to avoid interference.
Turn on the CubeADCS by pressing the power switch on top. To confirm function, check the Xbee connected to your computer. The RSSI led should be lit red to show it is in communication with the CubeADCS radio. If so, you are ready to begin data collection.
Data collection begins with running ""Mitesh_Vicon_Multi_Objects_Just_Run_This.m" on the Vicon computer, and "import_gyroMag.py" on your computer. All telemetry is timestamped, these actions do not need to be coordinated. You should see the Python program printing sensor telemetry to the console as it runs.
With both programs running, gently begin pulling on the fishing line to unwind from the gimbal and spin the CubeADCS.
After fully unwound, terminate both the Matlab and Python programs to save your data.
Provide step-by-step instructions for data analysis, including location of data storage.
Open "telem2EKF.py". This script will do all of the conversion, parsing, and organizing the raw telemetry to be used by the Extended Kalman Filter attitude estimator. Simply call "process_csv('input.csv', 'output.csv')" with the name of your telemetry .csv as the input, and the processed data will be saved to "output.csv".
Open Excel and load the processed .csv. The current timestamps are formatted as floats, and should be converted to numerical time duration to be used by the EKF. Create a new row, and paste this formula to do the conversion: "=CONVERT(A2,"day","sec")".
Save this file as an Excel spreadsheet.
The Matlab script "processing.m" loads both the processed .csv and the Vicon tracking results. Specify the specific file names and run to propagate the EKF.
Two plots for the CubeADCS will be created, one with the sensor data, the other from the Vicon data.