Ejemplo n.º 1
0
 def testGPSCalc2(self):
     self.test3 = standardcalc.GPSDistAway(self.source, 1000, 1000)
     self.test4 = standardcalc.GPSDistAway(self.source, -1000, -1000)
     self.assertEqual((math.fabs(self.result3.lat - self.test3.lat) <= 0.00004),1)
     self.assertEqual((math.fabs(self.result3.long - self.test3.long) <= 0.00004),1)
     self.assertEqual((math.fabs(self.result4.lat - self.test4.lat) <= 0.00004),1)
     self.assertEqual((math.fabs(self.result4.long - self.test4.long) <= 0.00004),1)
Ejemplo n.º 2
0
 def findLeftBuoyPoint(self, BuoyLoc):
     angleOfCourse = standardcalc.angleBetweenTwoCoords(gVars.currentData.gps_coord, BuoyLoc)
     angleFromEast = 90-angleOfCourse
     
     LongitudalDistBetweenBuoyAndTarget = self.TargetToBuoyDist*math.cos(math.radians(angleFromEast+self.TargetAndBuoyAngle))
     LatitudalDistBetweenBuoyAndTarget = self.TargetToBuoyDist*math.sin(math.radians(angleFromEast+self.TargetAndBuoyAngle))
     
     leftPoint = standardcalc.GPSDistAway(BuoyLoc, LongitudalDistBetweenBuoyAndTarget, LatitudalDistBetweenBuoyAndTarget)
     
     return leftPoint
Ejemplo n.º 3
0
 def testGPSCalc3(self):
     self.test5 = standardcalc.GPSDistAway(self.source, 0, 0)
     self.assertEqual(self.test5.lat, self.source.lat)
     self.assertEqual(self.test5.long, self.source.long)