projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a7dc3b
)
AltosSiteMap: explain tile size better
author
Anthony Towns
<aj@erisian.com.au>
Sun, 21 Nov 2010 00:55:22 +0000
(10:55 +1000)
committer
Anthony Towns
<aj@erisian.com.au>
Sun, 21 Nov 2010 00:55:22 +0000
(10:55 +1000)
ao-tools/altosui/AltosSiteMap.java
patch
|
blob
|
history
diff --git
a/ao-tools/altosui/AltosSiteMap.java
b/ao-tools/altosui/AltosSiteMap.java
index 72a65b1529721d57f389c01b70914bcfb73319a1..e222e2c8cc88e592a8f90627d24c2986a33b54b8 100644
(file)
--- a/
ao-tools/altosui/AltosSiteMap.java
+++ b/
ao-tools/altosui/AltosSiteMap.java
@@
-33,8
+33,10
@@
import java.awt.geom.Point2D;
import java.awt.geom.Line2D;
public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
import java.awt.geom.Line2D;
public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
- // max vertical step in a tile in naut. miles
- static final double tile_size_nmi = 2.0;
+ // preferred vertical step in a tile in naut. miles
+ // will actually choose a step size between x and 2x, where this
+ // is 1.5x
+ static final double tile_size_nmi = 1.5;
static final int px_size = 512;
static final int px_size = 512;
@@
-117,7
+119,7
@@
public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
scale_x = 256/360.0 * Math.pow(2, zoom);
scale_y = 256/(2.0*Math.PI) * Math.pow(2, zoom);
locn = pt(lat, lng);
scale_x = 256/360.0 * Math.pow(2, zoom);
scale_y = 256/(2.0*Math.PI) * Math.pow(2, zoom);
locn = pt(lat, lng);
- north_step = pt(lat+tile_size_nmi/60.0, lng);
+ north_step = pt(lat+tile_size_nmi
*4/3
/60.0, lng);
if (locn.y - north_step.y > px_size)
break;
} while (zoom < 22);
if (locn.y - north_step.y > px_size)
break;
} while (zoom < 22);