def testDelta_UpdateRow(self):
     pos = _POS_2.copy()
     delta = basic_geo._Deltas(_POS_1, pos)
     delta.UpdateRow(pos)
     self.assertAlmostEqual(pos['distance_from_prev'], 100000, places=2)
     self.assertEqual(pos['time_from_prev'], 600)
     self.assertAlmostEqual(pos['speed_from_prev'], 100000.0/600, places=2)
Example #2
0
 def testDelta_UpdateRow(self):
     pos = _POS_2.copy()
     delta = basic_geo._Deltas(_POS_1, pos)
     delta.UpdateRow(pos)
     self.assertAlmostEqual(pos['distance_from_prev'], 100000, places=2)
     self.assertEqual(pos['time_from_prev'], 600)
     self.assertAlmostEqual(pos['speed_from_prev'],
                            100000.0 / 600,
                            places=2)
 def testDelta_BasicInfo(self):
     delta = basic_geo._Deltas(_POS_1, _POS_2)
     self.assertAlmostEqual(delta.meters, 100000, places=2)
     self.assertEqual(delta.time, 600)
     self.assertAlmostEqual(delta.rate, 100000.0/600, places=2)
Example #4
0
 def testDelta_BasicInfo(self):
     delta = basic_geo._Deltas(_POS_1, _POS_2)
     self.assertAlmostEqual(delta.meters, 100000, places=2)
     self.assertEqual(delta.time, 600)
     self.assertAlmostEqual(delta.rate, 100000.0 / 600, places=2)