Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MUG
visad
Commits
65a06613
Commit
65a06613
authored
Oct 04, 2018
by
rink
Browse files
snapshot
parent
fe9814af
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/src/visad/XTrackScanLatLonSet.java
View file @
65a06613
...
...
@@ -25,10 +25,9 @@ public class XTrackScanLatLonSet extends GriddedLatLonSet {
scanSets
=
new
GriddedLatLonSet
[
numOfScans
];
int
scanLen
=
linesPerScan
*
lengthX
;
float
[]
scanLonArray
=
new
float
[
linesPerScan
*
lengthX
];
float
[]
scanLatArray
=
new
float
[
linesPerScan
*
lengthX
];
for
(
int
k
=
0
;
k
<
numOfScans
;
k
++)
{
float
[]
scanLonArray
=
new
float
[
linesPerScan
*
lengthX
];
float
[]
scanLatArray
=
new
float
[
linesPerScan
*
lengthX
];
System
.
arraycopy
(
lons
,
k
*
scanLen
,
scanLonArray
,
0
,
scanLen
);
System
.
arraycopy
(
lats
,
k
*
scanLen
,
scanLatArray
,
0
,
scanLen
);
...
...
@@ -88,6 +87,8 @@ public class XTrackScanLatLonSet extends GriddedLatLonSet {
float
[][]
lonlat
=
new
float
[
2
][
1
];
int
[]
guess_set
=
new
int
[
2
];
guess_set
[
0
]
=
gx
;
guess_set
[
1
]
=
linesPerScan
/
2
;
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
...
...
@@ -119,7 +120,9 @@ public class XTrackScanLatLonSet extends GriddedLatLonSet {
lonlat
[
latI
][
0
]
=
targetLat
;
float
[][]
gxgy
;
while
(
lastSetIdx
>=
0
&&
lastSetIdx
<
numOfScans
)
{
int
cnt
=
0
;
int
dir
=
0
;
while
((
lastSetIdx
>=
0
&&
lastSetIdx
<
numOfScans
)
&&
cnt
<
numOfScans
)
{
GriddedLatLonSet
scanSet
=
scanSets
[
lastSetIdx
];
gxgy
=
scanSet
.
valueToGrid
(
lonlat
,
guess_set
);
...
...
@@ -131,15 +134,24 @@ public class XTrackScanLatLonSet extends GriddedLatLonSet {
lastSetIdx
-=
1
;
guess_set
[
0
]
=
gx_set
;
guess_set
[
1
]
=
linesPerScan
-
1
;
if
(
dir
==
1
)
{
break
;
}
dir
=
-
1
;
}
else
if
(
gy_set
==
linesPerScan
-
1
)
{
lastSetIdx
+=
1
;
guess_set
[
0
]
=
gx_set
;
guess_set
[
1
]
=
0
;
if
(
dir
==
-
1
)
{
break
;
}
dir
=
1
;
}
else
if
(
gx_set
==
0
||
gx_set
==
LengthX
-
1
)
{
break
;
}
cnt
++;
}
else
{
grid
[
0
][
i
]
=
gxgy
[
0
][
0
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment