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 return False
self.osm.gps_add(startlat, startlon, heading) self.osm.gps_add(startlat, startlon, heading)
stepyear += 1 stepyear += 1
difflat = ( startlat - endlat ) if startlat > endlat else \ difflat = round(( startlat - endlat ) if startlat > endlat else \
( endlat - startlat ) ( endlat - startlat ), 8)
difflon = ( startlon - endlon ) if startlon > endlon else \ difflon = round(( startlon - endlon ) if startlon > endlon else \
( endlon - startlon ) ( endlon - startlon ), 8)
if ( difflat == 0.0 and difflon == 0.0 ): if ( difflat == 0.0 and difflon == 0.0 ):
i += 1 i += 1
if ( int(startyear) + stepyear ) > int(endmov) : if ( int(startyear) + stepyear ) > int(endmov) :