Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Usgscsm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Usgscsm
Commits
48936755
Commit
48936755
authored
1 year ago
by
Oleg Alexandrov
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix for radtan
parent
0917cec8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/UsgsAstroFrameSensorModel.cpp
+16
-1
16 additions, 1 deletion
src/UsgsAstroFrameSensorModel.cpp
with
16 additions
and
1 deletion
src/UsgsAstroFrameSensorModel.cpp
+
16
−
1
View file @
48936755
...
...
@@ -172,8 +172,12 @@ csm::ImageCoord UsgsAstroFrameSensorModel::groundToImage(
// Apply the distortion to the line/sample location and then convert back to
// line/sample
double
distortedX
,
distortedY
;
// Divide by focal length
undistortedx
/=
f
;
undistortedy
/=
f
;
applyDistortion
(
undistortedx
,
undistortedy
,
distortedX
,
distortedY
,
m_opticalDistCoeffs
,
m_distortionType
);
// Apply multiplication by focal length
distortedX
*=
f
;
distortedY
*=
f
;
MESSAGE_LOG
(
spdlog
::
level
::
trace
,
...
...
@@ -268,10 +272,17 @@ csm::EcefCoord UsgsAstroFrameSensorModel::imageToGround(
m_detectorLineSumming
,
m_startingDetectorSample
,
m_startingDetectorLine
,
&
m_iTransS
[
0
],
&
m_iTransL
[
0
],
x_camera
,
y_camera
);
// divide x_camera and y_camera by focal length
x_camera
/=
m_focalLength
;
y_camera
/=
m_focalLength
;
// Apply the distortion model (remove distortion)
double
undistortedX
,
undistortedY
;
removeDistortion
(
x_camera
,
y_camera
,
undistortedX
,
undistortedY
,
m_opticalDistCoeffs
,
m_distortionType
);
// Multiply by focal length
undistortedX
*=
m_focalLength
;
undistortedY
*=
m_focalLength
;
MESSAGE_LOG
(
spdlog
::
level
::
trace
,
"Found undistortedX: {}, and undistortedY: {}"
,
...
...
@@ -394,9 +405,13 @@ csm::EcefLocus UsgsAstroFrameSensorModel::imageToRemoteImagingLocus(
// Distort
double
undistortedFocalPlaneX
,
undistortedFocalPlaneY
;
// divide by focal length
focalPlaneX
/=
m_focalLength
;
focalPlaneY
/=
m_focalLength
;
removeDistortion
(
focalPlaneX
,
focalPlaneY
,
undistortedFocalPlaneX
,
undistortedFocalPlaneY
,
m_opticalDistCoeffs
,
m_distortionType
);
// Multiply by focal length
undistortedFocalPlaneX
*=
m_focalLength
;
undistortedFocalPlaneY
*=
m_focalLength
;
MESSAGE_LOG
(
spdlog
::
level
::
trace
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment