Esempio n. 1
0
 def testClosestPointIsIndex1(self):
     gVars.currentData.gps_coord = datatypes.GPSCoordinate(2.0,2.0)
     self.assertEqual(standardcalc.returnClosestWaypointIndex(self.coords),2)  
Esempio n. 2
0
 def getStartDirection(self, boxCoords):
     index = standardcalc.returnClosestWaypointIndex(boxCoords)
     return self.getNextWptIndex(index)
Esempio n. 3
0
 def getStartDirection(self, wayPtCoords):
     index = standardcalc.returnClosestWaypointIndex(wayPtCoords)
     index = (index+2)%4
     return index
Esempio n. 4
0
 def getStartDirection(self, boxCoords):
     index = standardcalc.returnClosestWaypointIndex(boxCoords)
     return self.getNextWptIndex(index)