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
92f3da4f
Commit
92f3da4f
authored
10 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Fixed integer overflow in test for large number of sensors.
parent
95b169f5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/test/java/org/orekit/rugged/api/RuggedTest.java
+3
-3
3 additions, 3 deletions
core/src/test/java/org/orekit/rugged/api/RuggedTest.java
with
3 additions
and
3 deletions
core/src/test/java/org/orekit/rugged/api/RuggedTest.java
+
3
−
3
View file @
92f3da4f
...
@@ -576,7 +576,7 @@ public class RuggedTest {
...
@@ -576,7 +576,7 @@ public class RuggedTest {
double
delta
=
FastMath
.
toRadians
(
0.5
);
double
delta
=
FastMath
.
toRadians
(
0.5
);
try
{
try
{
int
size
=
nbSensors
*
dimension
*
dimension
*
2
*
Integer
.
SIZE
/
8
;
long
size
=
nbSensors
*
dimension
*
dimension
*
2
l
*
Integer
.
SIZE
/
8
l
;
RandomAccessFile
out
=
new
RandomAccessFile
(
tempFolder
.
newFile
(),
"rw"
);
RandomAccessFile
out
=
new
RandomAccessFile
(
tempFolder
.
newFile
(),
"rw"
);
MappedByteBuffer
buffer
=
out
.
getChannel
().
map
(
FileChannel
.
MapMode
.
READ_WRITE
,
0
,
size
);
MappedByteBuffer
buffer
=
out
.
getChannel
().
map
(
FileChannel
.
MapMode
.
READ_WRITE
,
0
,
size
);
...
@@ -609,13 +609,13 @@ public class RuggedTest {
...
@@ -609,13 +609,13 @@ public class RuggedTest {
long
t2
=
System
.
currentTimeMillis
();
long
t2
=
System
.
currentTimeMillis
();
out
.
close
();
out
.
close
();
int
sizeM
=
size
/
(
1024
*
1024
);
int
sizeM
=
(
int
)
(
size
/
(
1024
l
*
1024
l
)
);
System
.
out
.
format
(
Locale
.
US
,
System
.
out
.
format
(
Locale
.
US
,
"%n%n%5dx%5d, %d sensors:%n"
+
"%n%n%5dx%5d, %d sensors:%n"
+
" Orekit initialization and DEM creation : %5.1fs%n"
+
" Orekit initialization and DEM creation : %5.1fs%n"
+
" inverse localization and %3dM grid writing: %5.1fs (%.1f px/s, %.1f%% covered)%n"
,
" inverse localization and %3dM grid writing: %5.1fs (%.1f px/s, %.1f%% covered)%n"
,
dimension
,
dimension
,
nbSensors
,
dimension
,
dimension
,
nbSensors
,
1.0
e
-
3
*(
t1
-
t0
),
sizeM
,
1.0
e
-
3
*(
t2
-
t1
),
1.0
e
-
3
*
(
t1
-
t0
),
sizeM
,
1.0
e
-
3
*
(
t2
-
t1
),
(
badPixels
+
goodPixels
)
/
(
1.0
e
-
3
*
(
t2
-
t1
)),
(
badPixels
+
goodPixels
)
/
(
1.0
e
-
3
*
(
t2
-
t1
)),
(
100.0
*
goodPixels
)
/
(
goodPixels
+
badPixels
));
(
100.0
*
goodPixels
)
/
(
goodPixels
+
badPixels
));
}
catch
(
IOException
ioe
)
{
}
catch
(
IOException
ioe
)
{
...
...
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