Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugged
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
Container Registry
Model registry
Operate
Environments
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
Orekit
Rugged
Commits
32bd35d8
Commit
32bd35d8
authored
2 years ago
by
Guylaine Prat
Browse files
Options
Downloads
Patches
Plain Diff
Improve test coverage
parent
e3adf730
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Custom margin for atmospheric refraction; made exception message clearer
Pipeline
#2123
passed
2 years ago
Stage: verify
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java
+18
-3
18 additions, 3 deletions
...g/orekit/rugged/refraction/AtmosphericRefractionTest.java
with
18 additions
and
3 deletions
src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java
+
18
−
3
View file @
32bd35d8
...
...
@@ -289,17 +289,32 @@ public class AtmosphericRefractionTest {
los
);
builder
.
addLineSensor
(
sensor
);
Rugged
rugged
=
builder
.
build
();
Rugged
rugged
WithDefaultMargin
=
builder
.
build
();
GeodeticPoint
point
=
rugged
.
directLocation
(
sensor
.
getName
(),
1000
)[
500
];
GeodeticPoint
point
=
rugged
WithDefaultMargin
.
directLocation
(
sensor
.
getName
(),
1000
)[
500
];
try
{
final
int
maxLine
=
4999
;
// works with 4980, fails with 4999
rugged
.
inverseLocation
(
sensor
.
getName
(),
point
,
0
,
maxLine
);
rugged
WithDefaultMargin
.
inverseLocation
(
sensor
.
getName
(),
point
,
0
,
maxLine
);
Assert
.
fail
(
"An exception should have been thrown"
);
}
catch
(
RuggedException
re
)
{
Assert
.
assertEquals
(
RuggedMessages
.
SENSOR_PIXEL_NOT_FOUND
,
re
.
getSpecifier
());
}
// Check the default margin is equal to the used one
Assert
.
assertEquals
(
builder
.
getRefractionCorrection
().
getComputationParameters
().
getDefaultInverseLocMargin
(),
builder
.
getRefractionCorrection
().
getComputationParameters
().
getInverseLocMargin
(),
1.0
e
-
10
);
// Change the margin to an admissible one for this case
builder
.
getRefractionCorrection
().
setInverseLocMargin
(
0.81
);
Rugged
ruggedWithCustomMargin
=
builder
.
build
();
point
=
ruggedWithCustomMargin
.
directLocation
(
sensor
.
getName
(),
1000
)[
500
];
final
int
maxLine
=
4999
;
// works with a margin > 0.803
SensorPixel
pixel
=
ruggedWithCustomMargin
.
inverseLocation
(
sensor
.
getName
(),
point
,
0
,
maxLine
);
Assert
.
assertTrue
(
pixel
!=
null
);
}
@Test
...
...
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