Пример #1
0
 def testSetInstructionsWithNavChallenge(self):
     self.resetGlobVar()
     self.instructions = datatypes.Instructions(
         sVars.NAVIGATION_CHALLENGE,
         [datatypes.Waypoint(datatypes.GPSCoordinate(1, 1), sVars.GO_TO)],
         [datatypes.Boundary(datatypes.GPSCoordinate(1, 1), 1)], "port", 0)
     self.gui_handler.setInstructions(self.instructions)
     self.assertTrue(gVars.instructions, self.instructions)
     self.assertListEqual(gVars.functionQueue, [sVars.NAVIGATION_CHALLENGE])
     self.assertEqual(gVars.queueParameters[0][0].coordinate.lat, 1)
Пример #2
0
 def initControlInstructionsObject(self, instructions):
     waypointsList = []
     boundariesList = []
     for wpt in instructions['waypoints']:
         coordinate = control.GPSCoordinate(wpt[0], wpt[1])
         waypointsList.append(control.Waypoint(coordinate, wpt[2]))
     for bnd in instructions['boundaries']:
         coordinate = control.GPSCoordinate(bnd[0], bnd[1])
         boundariesList.append(control.Boundary(coordinate, bnd[2]))
     controlInstructions = control.Instructions(
         instructions['challenge'], waypointsList, boundariesList,
         instructions['rounding'], instructions['SK_exit_speed'])
     return controlInstructions
Пример #3
0
 def setUp(self):
     self.x = datatype.Waypoint(datatype.GPSCoordinate())
     self.y = datatype.Waypoint(datatype.GPSCoordinate(42, -121),
                                sVars.GO_TO)