[GRASS-SVN] r37321 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 21 06:03:09 EDT 2009
Author: hamish
Date: 2009-05-21 06:03:09 -0400 (Thu, 21 May 2009)
New Revision: 37321
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
fix bearing angle (compass convention; merge from devbr6)
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-05-21 09:11:39 UTC (rev 37320)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-05-21 10:03:09 UTC (rev 37321)
@@ -1427,8 +1427,9 @@
if self.Map.projinfo['proj'] == 'xy' or 'degree' not in self.Map.projinfo['unit']:
angle = int(math.degrees(math.atan2(north,east)) + 0.5)
- angle = angle+90
- if angle < 0: angle = 360+angle
+ angle = 180 - angle
+ if angle < 0:
+ angle = 360+angle
mstring = 'segment = %s %s\ttotal distance = %s %s\tbearing = %d deg' \
% (strdist,dunits,strtotdist,tdunits,angle)
More information about the grass-commit
mailing list