summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2005-07-30 19:49:01 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2005-07-30 19:49:01 +0100
commitfeee5525398160280fbb12d8fb340ceef20c67d3 (patch)
treee3d7e6391f49f5856d54bbe8ff807bd0a46d5840
parent306a3865d4874417df3ce35e5a1792d194a0a1c6 (diff)
exclude track points from computations
-rw-r--r--src/GipfelWidget.cxx2
-rw-r--r--src/Hill.cxx14
2 files changed, 11 insertions, 5 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx
index 9f9d10a..9cfbdb6 100644
--- a/src/GipfelWidget.cxx
+++ b/src/GipfelWidget.cxx
@@ -232,7 +232,7 @@ GipfelWidget::set_labels(Hills *v) {
for (j=0; j<v->get_num() && j < i; j++) {
n = v->get(j);
- if (n->flags & HILL_DUPLICATE) {
+ if (n->flags & (HILL_DUPLICATE | HILL_TRACK_POINT)) {
continue;
}
diff --git a/src/Hill.cxx b/src/Hill.cxx
index 35c7ada..9c9329b 100644
--- a/src/Hill.cxx
+++ b/src/Hill.cxx
@@ -125,14 +125,20 @@ void Hills::mark_duplicates(double dist) {
for(i=0; i<get_num();i++) {
m = get(i);
+ if (m->flags & HILL_TRACK_POINT) {
+ continue;
+ }
+
if (m) {
j = i + 1;
n = get(j);
while (n && fabs(n->phi - m->phi) <= dist) {
- if (fabs(n->lam - m->lam) <= dist &&
- fabs(n->height - m->height) <= 50.0 ) {
- n->flags |= HILL_DUPLICATE;
- }
+ if (! n->flags & HILL_DUPLICATE) {
+ if (fabs(n->lam - m->lam) <= dist &&
+ fabs(n->height - m->height) <= 50.0 ) {
+ n->flags |= HILL_DUPLICATE;
+ }
+ }
j = j + 1;
n = get(j);
}