Exemplo n.º 1
0
 def _filter_dist(self, dist):
     # 10cm accuracy is enough for distances
     return round(dist * 10.0) / 10.0
Exemplo n.º 2
0
 def _filter_coordinate(self, coo):
     # 1mm accuracy is enough for distances
     return round(coo * 1000.0) / 1000.0
Exemplo n.º 3
0
 def _filter_alt(self, alt):
     if alt is not None and alt > 0.0:
         # 10cm accuracy is enough for altitudes
         return round(alt * 10.0) / 10.0
     else:
         return None
Exemplo n.º 4
0
 def _filter_coordinate(self, coords):
     # 1mm accuracy is enough for distances
     return round(coords * 1000.0) / 1000.0
Exemplo n.º 5
0
 def _filter_dist(self, dist):
     # 10cm accuracy is enough for distances
     return round(dist * 10.0) / 10.0
Exemplo n.º 6
0
 def _filter_alt(self, alt):
     if alt is not None and alt > 0.0:
         # 10cm accuracy is enough for altitudes
         return round(alt * 10.0) / 10.0
     else:
         return None
Exemplo n.º 7
0
 def test_round(self):
     testnumber = 4.4
     result = round(testnumber)
     self.assertEqual(result, 4)