Skip to content
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

Loss cone coverage #14

Open
wants to merge 5 commits into
base: fang_ionospheric_precipitation
Choose a base branch
from

Conversation

ursg
Copy link

@ursg ursg commented Aug 16, 2022

Heres' some quickly-hacked-together implementation of a better precipitation sampling, that properly takes cells into account which are only partially inside the loss cone.

The actual cell-cone intersection test is done by formulating the loss cone as a signed distance function and sampling it in the cell centre. If the distance from the cell centre to the cone boundary is large than the cell's spatial diagonal, it is clearly full inside or fully outside, and handled as such.
For cells close to the loss cone boundary, an octree subdivision is performed, until the subcells are either fully inside, outside, or the iteration limit (currently hardcoded to 6 iterations) is reached. In that last case, the cell coverage is approximated by (lossConeBoundaryDistance - cellDiagonal) / cellDiagonal.

This compiles, but is untested in the actual precipitation code.
A miniApp comes along with it, that at least confirms that the coverage routine produces correctly cone-shaped patterns, but I am not 100% sure that there isn't a sign error in the cone direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant