Earth Radiation Pressure and Planet Radiation Base. Albedo uses PlanetRadiationBase#1351
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6862c1fc00
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6862c1f to
d800bf1
Compare
…edo uses planetRadiationBase
d800bf1 to
7ce5123
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ce51235cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…edo uses planetRadiationBase
7ce5123 to
029a21b
Compare
…edo uses planetRadiationBase
029a21b to
32fed88
Compare
…edo uses planetRadiationBase
32fed88 to
ad1d54c
Compare
…edo uses planetRadiationBase
ad1d54c to
b9a59e1
Compare
…edo uses planetRadiationBase
b9a59e1 to
d285fbf
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d285fbf037
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…edo uses planetRadiationBase
d285fbf to
5b2176a
Compare
…edo uses planetRadiationBase
5b2176a to
4a64bee
Compare
…edo uses planetRadiationBase
4a64bee to
ee1f901
Compare
…edo uses planetRadiationBase
ee1f901 to
ca82e5d
Compare
…edo uses planetRadiationBase
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a8e4666d3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
schaubh
left a comment
There was a problem hiding this comment.
Great work. This is an interesting refactor of albedo and adding new functionality for planet radiation pressure forces in the future.
Question. you have a module called earthRadiationModel. Why is this specific to Earth? Couldn't this be written to be a generic planetRadiationModel where the use then can configure this to be for Earth?
…edo uses planetRadiationBase
6a8e466 to
851c35c
Compare
…edo uses planetRadiationBase
851c35c to
e2bc0d7
Compare
schaubh
left a comment
There was a problem hiding this comment.
One minor documentation changes.
I pushed two commits to address two issues I came across. Let me know if you approve. I pushed the commits to your branch.
Track whether PlanetGrid::initialize() completed successfully and clear cached grid data when initialization is retried. Have direct computePatches() calls raise BasiliskError if the grid is not initialized or cached patch data is inconsistent. Add a Python regression test for the direct PlanetGrid API failure path.
Replace hard-coded solar radiation flux values in the Python and C orbitalMotion solarRad helpers with the shared Basilisk constants. The Python helper now reads astroFunctions.solarFluxEarth, while the C helper uses SOLAR_FLUX_EARTH from astroConstants.h.
6aa1e1d to
0434f53
Compare
Thank you! The commits are ok for me |
…edo uses planetRadiationBase
Track whether PlanetGrid::initialize() completed successfully and clear cached grid data when initialization is retried. Have direct computePatches() calls raise BasiliskError if the grid is not initialized or cached patch data is inconsistent. Add a Python regression test for the direct PlanetGrid API failure path.
Replace hard-coded solar radiation flux values in the Python and C orbitalMotion solarRad helpers with the shared Basilisk constants. The Python helper now reads astroFunctions.solarFluxEarth, while the C helper uses SOLAR_FLUX_EARTH from astroConstants.h.
e457479 to
9c2f4fe
Compare
Description
This PR introduces Earth Radiation Pressure (ERP) support in Basilisk through three changes:
planetRadiationBase- a new base class (_GeneralModuleFiles/planetRadiationBase.{h,cpp,.rst}) that abstracts shared logic for planet radiation models (patch discretisation, solar flux computation, visibility checks). Both the refactoredalbedomodule and the newearthRadiationModelinherit from it.earthRadiationModel- a new environment module (src/simulation/environment/earthRadiationModel/) implementing the Knocke et al. (1988) patch model. It discretises the visible Earth disk into latitude/longitude zones and accumulates shortwave (albedo) and longwave (IR/OLR) fluxes, plus flux-weighted net force direction vectors, into the newEarthRadiationMsgPayloadoutput message. These outputs are intended to feed a DynamicEffector.albedorefactor - the existingalbedomodule is rewritten to derive fromplanetRadiationBase, removing duplicated patch geometry code. The public API is updated (eclipseCaseis now set viasetEclipseCase()). Added a deprecation message and unittest foreclipseCaseas a public member.EarthRadiationMsgPayload.his also added tosrc/architecture/msgPayloadDefC/to define the new output message structure.Verification
test_earthRadiationModel.pycover:BasiliskError).test_albedo.pywas updated by one line to use the newsetEclipseCase()setter; all other albedo tests are unchanged and still pass.Documentation
earthRadiationModel.rst- new module doc.planetRadiationBase.rst- new base class doc.albedo.rst- Added a deprecation message and unittest foreclipseCaseas a public member.Future work
EarthRadiationMsgPayloadand apply the ERP force/torque to spacecraft.earthRadiationModelwith a spacecraft dynamics simulation to validate force magnitudes.