summaryrefslogtreecommitdiffstats
path: root/core/models/survex.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-11-05 22:59:02 +0200
committerPhilip Sargent <philip.sargent@gmail.com>2023-11-05 22:59:02 +0200
commitdf79bdb71158f11c0217243eaaded89499ed7134 (patch)
tree9d5e6fede45e1f9e24644828c8a1218dfe0bb4f3 /core/models/survex.py
parentc0687615a46b45ceb755c1c3df2f6bc8cc5dd3da (diff)
downloadtroggle-df79bdb71158f11c0217243eaaded89499ed7134.tar.gz
troggle-df79bdb71158f11c0217243eaaded89499ed7134.tar.bz2
troggle-df79bdb71158f11c0217243eaaded89499ed7134.zip
fine tuning search for SRTM point
Diffstat (limited to 'core/models/survex.py')
-rw-r--r--core/models/survex.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/models/survex.py b/core/models/survex.py
index a27ed45..cb5c26e 100644
--- a/core/models/survex.py
+++ b/core/models/survex.py
@@ -7,7 +7,7 @@ from pathlib import Path
from django.conf import settings
from django.db import models
from django.urls import reverse
-from troggle.core.utils import height_from_utm
+from troggle.core.utils import height_from_utm, throw
# from troggle.core.models.troggle import DataIssue # circular import. Hmm
@@ -100,8 +100,16 @@ class SurvexStation(models.Model):
weight = "bold"
else:
weight = "normal"
+
diff_str = f"<span style='color:{colour}; font-weight:{weight}'>{sign}{diff:.0f}</span>"
-
+
+ if ref >= throw:
+ colour = "grey"
+ weight = "normal"
+ diff = "XX"
+ ref = float("nan")
+ diff_str = f"<span style='color:{colour}'>XX</span>"
+
return diff_str, ref