2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 01:57:14 +00:00

fine tuning search for SRTM point

This commit is contained in:
2023-11-05 22:59:02 +02:00
parent c0687615a4
commit df79bdb711
2 changed files with 20 additions and 6 deletions

View File

@@ -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