-
Notifications
You must be signed in to change notification settings - Fork 173
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
Added intersectSurface to NaifDskShape so the intercept point would b… #4997
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.
Overall this looks good to me but having @KrisBecker and @jessemapel review would be ideal
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 worked with Stuart on the change, so I don't have any input on the functional change. Just the test change.
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 code is difficult to follow, top to bottom.
This looks like a good addition. Note that it costs two ray traces in this mod. One to determine the local radius at the lat/lon location and then a ray trace from observer to the surface point. That looks like a total of three ray traces/point so expect it to be a bit slow.
An alternative would be to call ShapeModel::intersectSurface(lat,lon,obs,backcheck). This costs one ray trace but may result in a different intercept. Not sure it would be a different intercept in this context, but you would not need this update for this approach. Though, it would require a modification to Camera::SetGround().
Also note that the back projection check is ignored in this implementation. It may not be returning the same/valid intercept point as the surface point because of occlusion.
Override NaifDskShape::intersectSurface so the intercept is calculated.
Description
footprintinit segfaulted when setGround was called on the subSpacecraftPoint because the intercept destructor had been called after exiting a scope
Related Issue
#4943
Motivation and Context
Stop the segfault
How Has This Been Tested?
footprintinit no longer segfaults and a test was added to make sure the intercept was being calculated
Screenshots (if appropriate):
Types of changes
Checklist:
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: