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
62d3a746
Unverified
Commit
62d3a746
authored
5 years ago
by
acpaquette
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #241 from AustinSanders/dev
Fixed matrix inversion in computeDistortedFocalPlaneCoordinates
parents
85887e1c
9cf090a0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Utilities.cpp
+2
-2
2 additions, 2 deletions
src/Utilities.cpp
tests/UtilitiesTests.cpp
+16
-0
16 additions, 0 deletions
tests/UtilitiesTests.cpp
with
18 additions
and
2 deletions
src/Utilities.cpp
+
2
−
2
View file @
62d3a746
...
...
@@ -87,10 +87,10 @@ void computeDistortedFocalPlaneCoordinates(
double
t1
=
detLine
-
lineOrigin
-
iTransL
[
0
];
double
t2
=
detSample
-
sampleOrigin
-
iTransS
[
0
];
double
determinant
=
m11
*
m22
-
m12
*
m21
;
double
p11
=
m
11
/
determinant
;
double
p11
=
m
22
/
determinant
;
double
p12
=
-
m12
/
determinant
;
double
p21
=
-
m21
/
determinant
;
double
p22
=
m
22
/
determinant
;
double
p22
=
m
11
/
determinant
;
distortedX
=
p11
*
t1
+
p12
*
t2
;
distortedY
=
p21
*
t1
+
p22
*
t2
;
...
...
This diff is collapsed.
Click to expand it.
tests/UtilitiesTests.cpp
+
16
−
0
View file @
62d3a746
...
...
@@ -81,6 +81,22 @@ TEST(UtilitiesTests, computeDistortedFocalPlaneCoordinatesSumming) {
EXPECT_DOUBLE_EQ
(
undistortedFocalPlaneY
,
0
);
}
TEST
(
UtilitiesTests
,
computeDistortedFocalPlaneCoordinatesAffine
)
{
double
iTransS
[]
=
{
-
10.0
,
0.0
,
0.1
};
double
iTransL
[]
=
{
10.0
,
-
0.1
,
0.0
};
double
undistortedFocalPlaneX
,
undistortedFocalPlaneY
;
computeDistortedFocalPlaneCoordinates
(
11.0
,
-
9.0
,
0.0
,
0.0
,
1.0
,
1.0
,
0.0
,
0.0
,
iTransS
,
iTransL
,
undistortedFocalPlaneX
,
undistortedFocalPlaneY
);
EXPECT_NEAR
(
undistortedFocalPlaneX
,
-
10.0
,
1e-12
);
EXPECT_NEAR
(
undistortedFocalPlaneY
,
10.0
,
1e-12
);
}
TEST
(
UtilitiesTests
,
computeDistortedFocalPlaneCoordinatesStart
)
{
double
iTransS
[]
=
{
0.0
,
0.0
,
10.0
};
double
iTransL
[]
=
{
0.0
,
10.0
,
0.0
};
...
...
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