-
Notifications
You must be signed in to change notification settings - Fork 5
add second ODS capture + delayed first capture #214
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
Conversation
btw, any idea how to get rid of these formatting fails? there seems to be conflict between clang-format and the pipeline format task |
Was thinking about this some more, and wondering if the delay threshold that triggers photo capture should just be a sfr value, so we can change it by uplink if we are able to refine our predictions for sail deployment mechanics/timing before mission operations? If so, how much testing would you guys be comfortable with to verify that the extra byte in the normal report doesn't cause any issues (or do we just leave it out)? |
Pushed a new commit, made the executive decision to include in SFR. Think the benefit to the mission justifies not having a hardcoded reference that we can't change, while it doesn't justify modifying the normal report to include this value (that while useful, does not change operations if can't verify its value). But curious for your input. This has been tested with GS in the loop on a flatsat nominal test, including overriding the default value (two control cyles). One question I have, is it a problem to have a uint8_t SFR field at the end of a bunch of uint32_t SFRFields (for reasons besides formatting). Didn't want to have to change all the uint32 opcodes.. |
I think if we had this it should be included in the normal report. And I agree- totally fine to just tack it onto the end instead of changing the opcodes. |
I did initially test with it included in the normal report, as I thought from my look at it that doing so would just involve adding a |
What version of clang-format do you have locally? The pipeline seems to be using version 13 with default LLVM formatting - guessing your local version is configured different |
Sorry that I'm late to the discussion here - personally, I don't think its a hard requirement to add the field to the NR if we make it an SFR field, but it would be highly ideal - Not having it in NR does make it difficult to gauge what the current value is set to (The only verification that your change was actually accepted correctly would be through the command history telem, but if we sent multiple commands to the same field, we wouldn't know which one stuck) Also of note, we would need to update any SFR related eeprom constants - Should just be looking back at Eric's report, he calculated mission time metrics off of 97 SFR fields, so adding one more should not be a problem (same amount of eeprom shards regardless) |
The change makes sense to me - I'd be okay adding the SFR as long as we update eeprom constant. Would be ideal to add to NR, but I don't know that this is realistic to get figured out and verified before final upload |
Looking through the code, I can't seem to see why this would have caused it to be corrupt - did you place the new field at the complete end? or between the sfr fields and command history section -also did you update the ground software side as well for the test? |
Thanks for the thoughts, Duncan. In terms of the issue with the normal report, the extra field was added at the end of the other sfr fields and before the command history. With that being said, I'm sure that the issue was a mismatch between the update and what was reflected in the ground station - Jonathan is currently in Denmark so making updates to the GS software is not super easy on a short timescale. In any case I agree with your assessment that even if we made the relatively simple changes to the normal report and GS side, I don't know that it is practical or wise to make such significant changes on the day of final upload. I think based on the feedback I am inclined to keep the camera::delay_count value as an SFR field (and update the eeprom constant, thanks for catching that!) without adding to the NR, although I agree this is not ideal. Just considering the benefit to the mission, the non-critical nature of this value, and the fact that it is already incorporated and testing with GS in the loop while a retest is not practical. However if you or Lauren feel differently, I am happy to move this to constants before merging, assuming there are no concerns about the rest of the changes. |
Oh and in terms of the clang version, looks like I have version 16. Updating the version the pipeline uses didn't seem to fix the issue, are we fine just ignoring this? |
Yeah fine to ignore - possible they using different format rules still but not worth the extra effort tbh |
Alright I concur, I think this is the correct path forward given the time left and the value the ability to change the field gives The rest of the changes look good to me |
ODS Capture Changes
Summary of changes
Motivation of this PR is to increase the likelihood of a successful capture of the lightsail after deployment via the ODS. This involves tweaking the timing of the first photo, as well as taking a supplemental backup photo shortly after the first, in the event that the timing/spin of the CubeSat does not produce a good first image.
CameraControlTask.cpp
modified to automatically trigger a second photo capture during deployment, ~4.6 seconds after the first. This capture occurs after the first photo is written to the SD card, and involves resuming and recapturing the camera frame before ultimately powering off the camera and SD.sfr::camera::take_photo
before capturing photo. This is accomplished by continuing to increment thesfr::camera::start_progress
field (used to monitor camera initialization progress) from 6 to 8 before callingadaCam.takePicture()
. Consider renaming sfr field if this variable reuse justifies changes to sfr references and GS, but would like to avoid this, since the SFR field is still being used for its original purpose of incrementally triggering camera operations. This change was precipitated by testing on the flight unit in February 2025 that revealed Spring 2022 testing (which had indicated no additional delay was necessary between button depress and photo capture for exposure or framing purposes) did not match results on the flight unit. Potentially due to hardware differences in button responsiveness, camera exposure adjustment speed, or speed of light sail deployment with the flight sail vs dummy.sfr::camera::start_progress
reset to 0 after ODS shutdown. In current flight software, if operators attempted to command a supplemental camera capture at some point after deployment, camera initialization would not be successful without the progress counter being reset.Testing
resumeVideo()
must be called before callingtakePicture()
again in order to avoid rereading the same image data as a "second photo" when writing to the SD card.constants::camera::content_length
value. Validation of both the report size change and addition of a second photo was accomplished with the following configurations: flatsat with Rockblock simulator, flatsat with ground Rockblock/ground station in the loop, EDU with rockblock simulator, flight unit with rockblock simulator. This testing occurred largely after nominal testing on the flight unit with GS in the loop, as the acceptance-tested CubeSat can no longer be used for deployment tests. Formal test summaries haven't been compiled yet due to timeline constraints, but can be produced if concerns exist about any of this testing.SFR Changes
constants::camera::content_length
changed from 64 to 80 to increase the size of the camera report by 16 bytescamera::delay_count
SFR field, to enable flexibility in sail deployment timing should additional testing reveal an alternate value should be used