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
fee054d1
Commit
fee054d1
authored
11 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Work In Progress on duvenhage algorithm.
parent
02f12f5d
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
rugged-core/src/main/java/org/orekit/rugged/core/duvenhage/DuvenhageAlgorithm.java
+34
-6
34 additions, 6 deletions
.../org/orekit/rugged/core/duvenhage/DuvenhageAlgorithm.java
with
34 additions
and
6 deletions
rugged-core/src/main/java/org/orekit/rugged/core/duvenhage/DuvenhageAlgorithm.java
+
34
−
6
View file @
fee054d1
...
...
@@ -99,12 +99,12 @@ public class DuvenhageAlgorithm implements IntersectionAlgorithm {
// find where line-of-sight exit tile
final
LimitPoint
exit
=
findExit
(
tile
,
ellipsoid
,
position
,
los
);
final
Deque
<
GeodeticPoint
>
splitPoints
Queue
=
new
ArrayDeque
<
GeodeticPoint
>();
splitPoints
Queue
.
addFirst
(
exit
.
getPoint
());
final
Deque
<
GeodeticPoint
>
lineOfSight
Queue
=
new
ArrayDeque
<
GeodeticPoint
>();
lineOfSight
Queue
.
addFirst
(
exit
.
getPoint
());
while
(!
splitPoints
Queue
.
isEmpty
())
{
while
(!
lineOfSight
Queue
.
isEmpty
())
{
final
GeodeticPoint
next
=
splitPoints
Queue
.
removeFirst
();
final
GeodeticPoint
next
=
lineOfSight
Queue
.
removeFirst
();
final
int
nextLatIndex
=
tile
.
getLatitudeIndex
(
next
.
getLatitude
());
final
int
nextLonIndex
=
tile
.
getLontitudeIndex
(
next
.
getLongitude
());
if
(
currentLatIndex
==
nextLatIndex
&&
currentLonIndex
==
nextLonIndex
)
{
...
...
@@ -124,7 +124,7 @@ public class DuvenhageAlgorithm implements IntersectionAlgorithm {
}
else
{
// find the largest level in the min/max kd-tree at which entry and exit share a sub-tile
int
level
=
tile
.
getMergeLevel
(
currentLatIndex
,
currentLonIndex
,
nextLatIndex
,
nextLonIndex
);
final
int
level
=
tile
.
getMergeLevel
(
currentLatIndex
,
currentLonIndex
,
nextLatIndex
,
nextLonIndex
);
if
(
level
<
0
)
{
// TODO: push intermediate points at sub-tiles boundaries on the queue
throw
RuggedException
.
createInternalError
(
null
);
...
...
@@ -137,7 +137,35 @@ public class DuvenhageAlgorithm implements IntersectionAlgorithm {
// the line-of-sight segment has at least some undecided parts which may
// intersect the Digital Elevation Model, we need to refine the
// search by using a finer-grained level in the min/max kd-tree
// TODO: split line-of-sight
// push the point back into the queue
lineOfSightQueue
.
addFirst
(
next
);
// increase level to have a more fine-grained min/max raster
// (we go closer to individual pixels, or un-merge the merged min/max)
// this un-merging implies finding the boundary between sub-tiles that
// are merged at level l and not merged at level l+1. This boundary is
// an iso-latitude if the merge is a row merging and is an iso-longitude
// if the merge is a column merging. We therefore first identify the
// row/column corresponding to the merging, then find the intersection of
// the line-of-sight with the iso-surface, then insert this new intermediate
// point in the queue
final
Vector3D
mergePoint
;
if
(
tile
.
isColumnMerging
(
level
+
1
))
{
final
double
longitudeMerge
=
tile
.
getLongitudeAtIndex
(
tile
.
getMergingColumn
(
currentLonIndex
,
level
+
1
));
mergePoint
=
ellipsoid
.
pointAtLongitude
(
position
,
los
,
longitudeMerge
);
}
else
{
final
double
latitudeSplit
=
tile
.
getLatitudeAtIndex
(
tile
.
getMergingRow
(
currentLatIndex
,
level
+
1
));
mergePoint
=
ellipsoid
.
pointAtLatitude
(
position
,
los
,
latitudeSplit
);
}
// push the intermediate point at sub-tile split into the queue
lineOfSightQueue
.
addFirst
(
ellipsoid
.
transform
(
mergePoint
,
ellipsoid
.
getBodyFrame
(),
null
));
// the current point remains the same
}
}
...
...
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