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

CSM Naif Radii #5414

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

acpaquette
Copy link
Collaborator

@acpaquette acpaquette commented Jan 24, 2024

Description

Allows CSMCamera to pickup naif target radii if they exist on the cube

Related Issue

#5385

How Has This Been Validated?

Validated locally

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation change (update to the documentation; no code change)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Infrastructure change (changes to things like CI or the build system that do not impact users)

Checklist:

  • I have read and agree to abide by the Code of Conduct
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have added myself to the .zenodo.json document.
  • I have added my user impacting change to the CHANGELOG.md document.

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:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

Copy link
Collaborator

@Kelvinrr Kelvinrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needs a changelog entry.

Comment on lines +663 to +786
if (target->radii().size() == 0) {
// get radii from CSM
csm::Ellipsoid targetEllipsoid = csm::SettableEllipsoid::getEllipsoid(m_model);
std::vector<Distance> radii = {Distance(targetEllipsoid.getSemiMajorRadius(), Distance::Meters),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the same as: if no camera model, default to ellipsoid?

Copy link
Collaborator Author

@acpaquette acpaquette Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhat, the difference here is in the Target changes where we try to read the radii from the naifwords first. If we can't, we never set the radii so we should pull the radii off the CSM model

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how often are those different?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The isds generated by ALE produce the same semi-major and semi-minor radii but don't capture a third radii if present. For our more common targets (Moon and Mars), the radii are often just a single radii, or a bi-axial ellipsoid. For less common targets, specifically small bodies, we often use a tri-axial radii and that third radii would not be captured by the CSM model

@Kelvinrr
Copy link
Collaborator

From the issue, the problem is that CSMCamera doesn't use a system shapemdoel (DEM), I dont see where in this code it addresses that? Probably missing something though.

@acpaquette
Copy link
Collaborator Author

@Kelvinrr I related it to that issues but it doesn't fix it. This is a related but separate issue as CSM only stores a bi-axial ellipsoid while ISIS has the potential to use a tri-axial ellipsoid. For the Moon and Mars this isn't an issue but it may be an issue when interacting with small bodies that often define an A, B, and C radii

@Kelvinrr
Copy link
Collaborator

tests look good, add a changelog entry and I'll approve this.

@amystamile-usgs
Copy link
Contributor

Unable to run tests until merge conflicts have been handled.

@amystamile-usgs
Copy link
Contributor

The following tests FAILED:

4966 | 1350 - CSMCameraFixture.SetImage (Failed)
4967 | 1351 - CSMCameraFixture.SetImageNoIntersect (Failed)
4968 | 1352 - CSMCameraFixture.SetGround (Failed)
4969 | 1375 - CSMCameraFixture.SetRightAscensionDeclination (Failed)
4970 | 1381 - CSMCameraDemFixture.SetImage (Failed)
4971 | 1383 - CSMCameraSetFixture.Resolution (Failed)
4972 | 1384 - CSMCameraSetFixture.InstrumentBodyFixedPosition (Failed)
4973 | 1385 - CSMCameraSetFixture.SubSpacecraftPoint (Failed)
4974 | 1386 - CSMCameraSetFixture.SlantDistance (Failed)
4975 | 1387 - CSMCameraSetFixture.TargetCenterDistance (Failed)
4976 | 1388 - CSMCameraSetFixture.PhaseAngle (Failed)
4977 | 1389 - CSMCameraSetFixture.IncidenceAngle (Failed)
4978 | 1390 - CSMCameraSetFixture.EmissionAngle (Failed)
4979 | 1391 - CSMCameraSetFixture.GroundPartials (Failed)
4980 | 1392 - CSMCameraSetFixture.SensorPartials (Failed)
4981 | 1393 - CSMCameraSetFixture.SerialNumber (Failed)
4983 | 1776 - CSMCubeFixture.FunctionalTestCamptCSMCamera (Failed)
4984 | 1984 - CSMNetwork.FunctionalTestJigsawCSM (Failed)

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.

3 participants