geography : issue 4866 : geoperson animation : rounding problem.

svn: r17309
This commit is contained in:
Serge Noiraud 2011-04-28 07:46:10 +00:00
parent d26db60d21
commit 3117b8ade6

View File

@ -228,10 +228,10 @@ class GeoPerson(GeoGraphyView):
return False
self.osm.gps_add(startlat, startlon, heading)
stepyear += 1
difflat = ( startlat - endlat ) if startlat > endlat else \
( endlat - startlat )
difflon = ( startlon - endlon ) if startlon > endlon else \
( endlon - startlon )
difflat = round(( startlat - endlat ) if startlat > endlat else \
( endlat - startlat ), 8)
difflon = round(( startlon - endlon ) if startlon > endlon else \
( endlon - startlon ), 8)
if ( difflat == 0.0 and difflon == 0.0 ):
i += 1
if ( int(startyear) + stepyear ) > int(endmov) :