From 2b572a2e05c6c2d15aef41183a3b0970e4b7915f Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Wed, 10 Oct 2012 18:14:53 -0700 Subject: [PATCH] Fix bug in row calculation. There's probably a simpler expression for this. --- python/az_map.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/az_map.py b/python/az_map.py index 02bd41a..62c8c18 100755 --- a/python/az_map.py +++ b/python/az_map.py @@ -63,7 +63,7 @@ class az_map_model(QtCore.QObject): col = self._altitudes.index(min([alt for alt in self._altitudes if alt >= altitude])) #find which bearing row we sit in - row = int(bearing+(180/az_map_model.npoints)) / (360/az_map_model.npoints) + row = int(int(bearing+(180./az_map_model.npoints)) / (360./az_map_model.npoints)) % az_map_model.npoints #set max range for all alts >= the ac alt #this expresses the assumption that higher ac can be heard further update = False