-
Notifications
You must be signed in to change notification settings - Fork 5
IMU disable fault #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IMU disable fault #213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is concise with minimal impact and the verification evidence is clear/well presented. Looks good to me to merge. Only note is with respect to the pipeline .yml
} | ||
|
||
if (sfr::imu::power_setting == (uint8_t)sensor_power_mode_type::on && sfr::imu::powered == false) { | ||
if (sfr::imu::power_setting == (uint8_t)sensor_power_mode_type::on && sfr::imu::powered == false && !fault_groups::imu_faults::imu_disable->get_base()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at its core, this does not need to be a fault because the fault is not being signaled by any conditions inside automation and is only controlled through manual force/suppress (making it functionally equivalent to a boolean SFR field).
However, since the use case for setting this flag to high is when the system is in an off-nominal state, keeping this flag designated as a fault is not causing any harm and in fact my provide some situational awareness to operators. The only clear negative with this approach is that the fault takes up more space in the serialized telemetry packet than the SFR bool would (since bools are packed as much as possible down to 1 bit, while faults are packed down to 4 control bits)
Regardless, since its only a few extra bits in telemetry and since you've verifed this functionality on HITL pretty thoroughly, I feel that going with the fault is okay
Edit: telemetry size is actually irrelevant if we aren't sending it in normal report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not see any verification evidence that this has not impacted normal report decoding in the ground station- that is important. From briefly looking at the PR- if the IMU is already powered, this will not turn off the IMU (I think). Is this intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to turn off the IMU if it is already on?
Looks as though normal report was not touched so the state of this fault is not being telemetered: https://github.com/Alpha-CubeSat/oop-flight-code/blob/main/src/Monitors/NormalReportMonitor.cpp#L57-L68 I missed this on my first pass, but this is somewhat worrisome to me. If this somehow gets set to high, and the imu is not powering on, you would just have to guess that its the fault being on. This is probably fine because its not being signalled in automation, but still not ideal. Seems like if we go this route, we should be confident that GS works as neither side (serialization or deserialization) have changed and both are hardcoded Also concur that we should consider turning off if already on, however if we decide to do this, we should verify that turning off mid collection does not have any negative side effects (on future use of the imu, on IMU Report Monitor, etc.) |
Regarding turning the IMU off in addition to preventing it turning on, I agree with both comments about the testing requirements and operational benefit. I should have made it more clear in the PR description, but the primary use case for this functionality is indeed powering off the IMU actively rather than just turning it on - this is done by triggering this fault and SFR overriding the existing With that being said, I agree that it would be nice to have one (potentially sfr) field handle both the power off and prevention of power on. However, I decided to implement it this way to produce the lowest possible risk (no automated signaling of the disable fault, while the To expand on the testing that has been done to date, all testing has involved actively powering off the IMU when it already on, and verifying normal restart as well as downlinking of IMU reports post-deployment. For the most recent tests, this was done with all the relevant commands coming from the GS. Let me know if this addresses your concerns and you guys feel we are good to merge. Appreciate the close look on this! |
Addition of imu_disable fault
Summary of changes
imu_disable
imu_fault (opcode 0x6012), which must not be signaled in order to enable IMU initialization. This allows the IMU to be indefinitely powered off to reduce current consumption with only 2 Rockblock commands (without having to enter low-power mode)Testing
imu_power_setting
to off. Positive effect on power budget verified via power budget logging scripts. IMU toggled back on via Rockblock command, with proper sensor functionality verified after restart. Nominal test completed successfully.imu_disable
fault and setting theimu_power_setting
to off. Positive effect on power budget (35 mA in transmit, IMU on / 27 mA in transmit, IMU off / 22 mA in normal, IMU off) verified via power supply display. Command processing verified via normal report and serial log. IMU toggled back on via Rockblock command to suppressimu_disable
fault, with proper sensor functionality verified after restart. During IMU shutdown, verified that current output to all magnetorquers was zero. All associated faults triggered by IMU shutdown verified reset after IMU restart. Nominal test completed successfully.SFR Changes
None