-
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
Adding Support for OSIRIS-REx TagCams Instruments #5427
Merged
Kelvinrr
merged 37 commits into
DOI-USGS:dev
from
kledmundson:enhancement/orexTagcamsSupport
Apr 4, 2024
Merged
Changes from 23 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
48e4de1
Add new IrregularBodyCameraGroundMap class
KrisBecker 41e4141
Update documentation and app/unit tests
KrisBecker cc1ebcc
Merge branch 'ocams_support' of http://orgit:7990/scm/isis/enhancemen…
KrisBecker a93659d
Initial version of tagcams2isis
KrisBecker 8e0c8c2
Initial version of OREX TAGCAMS Camera Model
KrisBecker e7c0400
Improved import of TAGCAMS image data
KrisBecker fd27ef1
Add complete version of OpenCV distortion model
KrisBecker b6c96f1
Modified OpenCV distortion model
KrisBecker 161070d
Update TAGCAMS OpenCV distortion model parameters
KrisBecker 67a2225
Removed unused variables to suppress warnings
KrisBecker 39398a9
Typo in iTime.h include
KrisBecker 1e0dacb
Removed apostrophe that causes problems on Linux
KrisBecker f84d6f9
Update tagcams2isis temperature computation
KrisBecker 0fbbbb8
Update TAGCAMS camera model
KrisBecker dc67506
New version of TAGCAMS camera model parameters
KrisBecker 7869994
Updates to TAGCAMS IAK
KrisBecker 2ff7fe0
Added LT and target/observer swap parameters
KrisBecker de20570
Properly initialize distorted/undistorted parms
KrisBecker db79996
tagams2isis.xml fix already happened
KrisBecker 791c59b
Fixed merge issue
KrisBecker 97bdc17
Correct typo
KrisBecker d867bb4
Minor documentation change
KrisBecker 79ae1bb
Merge UofA branch 'main' into USGS ISIS repo for 1) isis/src/osirisre…
kledmundson 91e111e
Merge branch 'dev' of https://github.com/kledmundson/ISIS3 into dev
kledmundson 233c2c6
Modified for easy development of derived classes
KrisBecker f6074cb
Added translations for OSIRIS-REx TagCams instruments NFTCam, NAVCam,…
kledmundson 2626786
Committing test data for OsirisREx TagCams support. Addresses #5424.
kledmundson 5e7751c
Initial commit of Osiris-REx Tagcams ingestion program tagcams2isis a…
kledmundson f5dd8c0
Adding support for intersections with irregular bodies, in particular…
kledmundson ec8ef50
Unit test and truth data for OsirisREx tagcams instruments. Addresses…
kledmundson 9ec9fa0
Support for OsirisREx tagcams instruments. Addresses #5424.
kledmundson 26f13c9
CHANGELOG entry for Osiris-REx tagcams instrument support. Addresses …
kledmundson acac69f
Merge branch 'DOI-USGS:dev' into enhancement/orexTagcamsSupport
kledmundson 80fd22f
Merge branch 'DOI-USGS:dev' into enhancement/orexTagcamsSupport
kledmundson 39a4ca0
Per review comments 2024-03-18: 1) fixed typo in IrregularBodyGroundM…
kledmundson ea82895
Per Adam's suggestion 2024-03-19, modified second tagcams2isis method…
kledmundson 7d8e904
Merge branch 'dev' into enhancement/orexTagcamsSupport
Kelvinrr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
127 changes: 127 additions & 0 deletions
127
isis/src/base/objs/IrregularBodyCameraGroundMap/IrregularBodyCameraGroundMap.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
/** | ||
* @file | ||
* $Revision: 1.7 $ | ||
* $Date: 2010/03/27 06:36:41 $ | ||
* | ||
* Unless noted otherwise, the portions of Isis written by the USGS are | ||
* public domain. See individual third-party library and package descriptions | ||
* for intellectual property information, user agreements, and related | ||
* information. | ||
* | ||
* Although Isis has been used by the USGS, no warranty, expressed or | ||
* implied, is made by the USGS as to the accuracy and functioning of such | ||
* software and related material nor shall the fact of distribution | ||
* constitute any such warranty, and no responsibility is assumed by the | ||
* USGS in connection therewith. | ||
* | ||
* For additional information, launch | ||
* $ISISROOT/doc//documents/Disclaimers/Disclaimers.html | ||
* in a browser or see the Privacy & Disclaimers page on the Isis website, | ||
* http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on | ||
* http://www.usgs.gov/privacy.html. | ||
*/ | ||
#include "IrregularBodyCameraGroundMap.h" | ||
|
||
#include <iostream> | ||
|
||
#include <QDebug> | ||
|
||
#include <SpiceUsr.h> | ||
|
||
#include "IException.h" | ||
#include "Latitude.h" | ||
#include "Longitude.h" | ||
#include "NaifStatus.h" | ||
#include "SurfacePoint.h" | ||
#include "Target.h" | ||
|
||
using namespace std; | ||
|
||
namespace Isis { | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param parent Pointer to camera to be used for mapping with ground | ||
*/ | ||
IrregularBodyCameraGroundMap::IrregularBodyCameraGroundMap(Camera *parent, | ||
const bool isIrregular) : | ||
CameraGroundMap(parent), m_isBodyIrregular(isIrregular) { | ||
} | ||
|
||
|
||
/** | ||
* Compute undistorted focal plane coordinate from ground position using current Spice | ||
* from SetImage call | ||
* | ||
* This method will compute the undistorted focal plane coordinate for | ||
* a ground position, using the current Spice settings (time and kernels) | ||
* without resetting the current point values for lat/lon/radius/x/y. The | ||
* class value for m_pB and m_lookJ are set by this method. | ||
* | ||
* @param point Surface point (ground position) | ||
* @param cudx [out] Pointer to computed undistored x focal plane coordinate | ||
* @param cudy [out] Pointer to computed undistored y focal plane coordinate | ||
* | ||
* @return @b bool If conversion was successful | ||
*/ | ||
bool IrregularBodyCameraGroundMap::GetXY(const SurfacePoint &point, | ||
double *cudx, double *cudy) { | ||
|
||
// Check to determine if the body is irregular. If not, go ahead and | ||
// use CameraGroundMap implementation | ||
if ( !m_isBodyIrregular ) { | ||
return ( CameraGroundMap::GetXY(point, cudx, cudy) ); | ||
} | ||
|
||
|
||
// Do everything CameraGroundMap::GetXY does but the emission angle check. | ||
|
||
vector<double> pB(3); | ||
pB[0] = point.GetX().kilometers(); | ||
pB[1] = point.GetY().kilometers(); | ||
pB[2] = point.GetZ().kilometers(); | ||
|
||
// Check for Sky images | ||
if (p_camera->target()->isSky()) { | ||
return false; | ||
} | ||
|
||
// Should a check be added to make sure SetImage has been called??? | ||
|
||
// Get spacecraft vector in j2000 coordinates | ||
SpiceRotation *bodyRot = p_camera->bodyRotation(); | ||
SpiceRotation *instRot = p_camera->instrumentRotation(); | ||
vector<double> pJ = bodyRot->J2000Vector(pB); | ||
vector<double> sJ = p_camera->instrumentPosition()->Coordinate(); | ||
|
||
// Calculate lookJ | ||
vector<double> lookJ(3); | ||
for (int ic = 0; ic < 3; ic++) { | ||
lookJ[ic] = pJ[ic] - sJ[ic]; | ||
} | ||
|
||
// Save pB for target body partial derivative calculations NEW *** DAC 8-14-2015 | ||
m_pB = pB; | ||
|
||
// Ok, this is where the emission angle check would be but we will assume | ||
// it is always visible until a better solution can be identified. This | ||
// method is primarily use in BundleAdjust and returning false will cause | ||
// an abort. This must be fixed! | ||
|
||
|
||
// Get the look vector in the camera frame and the instrument rotation | ||
m_lookJ.resize(3); | ||
m_lookJ = lookJ; | ||
vector<double> lookC(3); | ||
lookC = instRot->ReferenceVector(m_lookJ); | ||
|
||
// Get focal length with direction for scaling coordinates | ||
double fl = p_camera->DistortionMap()->UndistortedFocalPlaneZ(); | ||
|
||
*cudx = lookC[0] * fl / lookC[2]; | ||
*cudy = lookC[1] * fl / lookC[2]; | ||
return true; | ||
} | ||
|
||
} |
66 changes: 66 additions & 0 deletions
66
isis/src/base/objs/IrregularBodyCameraGroundMap/IrregularBodyCameraGroundMap.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* @file | ||
* $Revision: 1.7 $ | ||
* $Date: 2010/03/27 06:36:41 $ | ||
* | ||
* Unless noted otherwise, the portions of Isis written by the USGS are | ||
* public domain. See individual third-party library and package descriptions | ||
* for intellectual property information, user agreements, and related | ||
* information. | ||
* | ||
* Although Isis has been used by the USGS, no warranty, expressed or | ||
* implied, is made by the USGS as to the accuracy and functioning of such | ||
* software and related material nor shall the fact of distribution | ||
* constitute any such warranty, and no responsibility is assumed by the | ||
* USGS in connection therewith. | ||
* | ||
* For additional information, launch | ||
* $ISISROOT/doc//documents/Disclaimers/Disclaimers.html | ||
* in a browser or see the Privacy & Disclaimers page on the Isis website, | ||
* http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on | ||
* http://www.usgs.gov/privacy.html. | ||
*/ | ||
|
||
#ifndef IrregularBodyCameraGroundMap_h | ||
#define IrregularBodyCameraGroundMap_h | ||
|
||
#include "Camera.h" | ||
#include "CameraDistortionMap.h" | ||
#include "CameraGroundMap.h" | ||
#include "SpicePosition.h" | ||
#include "SurfacePoint.h" | ||
|
||
namespace Isis { | ||
/** | ||
* Convert between undistorted focal plane and ground coordinates | ||
* | ||
* This class is derived from CameraGroundMap to support the special case of | ||
* irregular bodies. Particularly, only the GetXY() method is reimplemented here | ||
* because it uses the ellipsiod to validate ground point visibility along the | ||
* look vector to the surface. This is not adequate for most irregular bodies. | ||
* | ||
* @ingroup Camera | ||
* | ||
* @see CameraGroundMap | ||
* | ||
* @author 2018-07-26 UA/OSIRIS-REx IPWG Team | ||
* | ||
* @internal | ||
* @history 2018-07-26 UA/OSIRIS-REx IPWG Team - Developed to support control | ||
* of irregular bodies | ||
*/ | ||
class IrregularBodyCameraGroundMap : public CameraGroundMap { | ||
public: | ||
IrregularBodyCameraGroundMap(Camera *parent, const bool isIrregular = true); | ||
|
||
//! Destructor | ||
virtual ~IrregularBodyCameraGroundMap() {}; | ||
|
||
virtual bool GetXY(const SurfacePoint &spoint, double *cudx, double *cudy); | ||
|
||
protected: | ||
bool m_isBodyIrregular; /**! Is the body irregular */ | ||
|
||
}; | ||
}; | ||
#endif |
1 change: 1 addition & 0 deletions
1
isis/src/base/objs/IrregularBodyCameraGroundMap/IrregularBodyCameraGroundMap.truth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This class will be tested by the applications and the individual Camera models. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ifeq ($(ISISROOT), $(BLANK)) | ||
.SILENT: | ||
error: | ||
echo "Please set ISISROOT"; | ||
else | ||
include $(ISISROOT)/make/isismake.objs | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <iostream> | ||
#include "Preference.h" | ||
|
||
using namespace std; | ||
int main() { | ||
Isis::Preference::Preferences(true); | ||
cout << "This class will be tested by the applications and the individual Camera models." << endl; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ifeq ($(ISISROOT), $(BLANK)) | ||
.SILENT: | ||
error: | ||
echo "Please set ISISROOT"; | ||
else | ||
include $(ISISROOT)/make/isismake.apps | ||
endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why even include it then? We really rather have more Makefile based tests.
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.
Removed.