-
Notifications
You must be signed in to change notification settings - Fork 2
Opnav integration #126
base: master
Are you sure you want to change the base?
Opnav integration #126
Conversation
| # do not run if global_lock is locked | ||
| with globals.run_camera_cond: | ||
| while globals.want_to_run_camera: | ||
| logging.info("Can to run camera set to TRUE") |
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.
Should this just be "Can run camera set to TRUE"? (no "to"?)
|
So you essentially created another project within our project. Is the |
|
I ran it and it's a great start! I'll need to spend a little more time looking at it, but regardless, I don't think we'll be merging until we also have it working with real flight software. Thoughts, Toby? |
|
|
|
Yeah, it's pretty standard to have all the code in a separate folder. I wanted to restructure the main project, but that obviously isn't going to happen during the school semester when many people are making code changes. So you have Or something. A plus is that all the development code is conglomerated in one place. It makes pathfinding for documentation and testing a lot simpler. Note that the att-adjust mode isn't doing anything right now. However, it made testing camera mode a lot easier. With the use of condition variables, the thread won't be busy waiting (I believe). By the way, you can see with the implementation of Similar stuff can be done for maneuver and attitude adjustment. And radio would be run similarly on a scheduled thread that calls every `y' seconds. |
|
Off first glance, I really really like the new structure and would be extremely happy to overhaul our current implementation with this new framework. |
|
For purposes to clean software engineering, I think we should make a dev branch where all we do is "fill out" this new framework with what we have. Then once that works and has been tested, we can merge into master. Only working code should live on master. I'm a fan of the package organization for purposes of presenting it on github, but while actually coding the extra folder might be a tad annoying (but worth the cleanliness). I haven't dug into this too deeply, but what does this new structure give us that we didn't/couldn't have before? I only wanna completely overhaul FSW if there's a good reason to (I'm sure you have one, I'm just not sure what it is). |
|
I think functionality-wise, the project operates perfectly fine as is. But I was having trouble getting sphinx to document our project. If we think of cislunar as a python package, then I think the structure needs to be like so? for other tools to know where the code is easily (like publishing to PyPI? I could be totally wrong). I haven't been able to find a big project (numpy, pyright, black, etc.) that isn't structured this way. Also, for documentation, reStructuredText is really expressive. Latex is built-in to its syntax as a math block |
|
Link for sessions and theads: https://docs.sqlalchemy.org/en/13/orm/session_basics.html#is-the-session-thread-safe Quote:
It might be fine for one session per thread, but if two threads modify the same data,
|
|
PyRight was failing because the "root" location for the project is |
Summary
This PR addresses Jira ticket CISLUNAR-91
Tests running op-nav as a separate thread, with integration to the database (database as a queue), and also ensure the main satellite is not running during camera operation.
Testing
setup like so:
Notes
Keeping everything separate right now. Just makes testing easier :\
Comments
Figured out a way to not need a separate
.flake8file so I updated pre-commit (Idk if you need to recall pre-commit install). Moved the opnav flight mode out of the flight_mode.py file. Hopefully, I didn't break anything while moving it out. It's not like I changed anything though... All major changes are in the "todo" project.