summaryrefslogtreecommitdiff
path: root/src/Panorama.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-05-28 22:04:50 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-05-28 22:04:50 +0200
commitbd63503cae5b51fe83e90d732b4317136cc38a0f (patch)
tree945d7b92d154de22f48aaeddc169fb14b3c18526 /src/Panorama.cxx
parent83699b53de7288b1ffb5a4c901730bee32524f4d (diff)
move nick computation from to Panorama::update_close_mountains()
Diffstat (limited to 'src/Panorama.cxx')
-rw-r--r--src/Panorama.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Panorama.cxx b/src/Panorama.cxx
index 5f59103..a072fd0 100644
--- a/src/Panorama.cxx
+++ b/src/Panorama.cxx
@@ -303,7 +303,6 @@ Panorama::update_angles() {
if (m->phi != view_phi || m->lam != view_lam) {
m->alph = alpha(m);
- m->a_nick = nick(m);
}
}
@@ -372,6 +371,7 @@ Panorama::update_close_mountains() {
(m->height / (m->dist * EARTH_RADIUS)
> height_dist_ratio))) {
+ m->a_nick = nick(m);
close_mountains->add(m);
}
}
@@ -441,6 +441,7 @@ Panorama::refraction(const Hill *m) {
return c * get_real_distance(m) / (2000.0 * (1.0 + a));
}
+
double
Panorama::nick(const Hill *m) {
double b, c, theta = refraction(m);
@@ -448,9 +449,6 @@ Panorama::nick(const Hill *m) {
b = m->height + get_earth_radius(m->phi);
c = view_height + get_earth_radius(view_phi);
-if (get_real_distance(m) < 100000)
-fprintf(stderr, "=== %s, %g, %g\n", m->name, get_real_distance(m), theta / deg2rad);
-
return atan((cos(m->dist) * b - c) / (sin(m->dist) * b)) - theta;
}