def canLayMarkWithoutTack(self):
     if standardcalc.isWPNoGoAWA(self.AWA, self.hog, self.Dest,self.sog,self.GPSCoord):
         return False
     else:
         windDirection = standardcalc.boundTo180(self.AWA + self.hog)
         bearing = standardcalc.angleBetweenTwoCoords(self.GPSCoord,self.Dest)
         return not standardcalc.isAngleBetween(bearing,windDirection,self.hog)      
Exemple #2
0
 def canLayMarkWithoutTack(self):
     if standardcalc.isWPNoGoAWA(self.AWA, self.hog, self.Dest, self.sog,
                                 self.GPSCoord):
         return False
     else:
         windDirection = standardcalc.boundTo180(self.AWA + self.hog)
         bearing = standardcalc.angleBetweenTwoCoords(
             self.GPSCoord, self.Dest)
         return not standardcalc.isAngleBetween(bearing, windDirection,
                                                self.hog)
Exemple #3
0
 def testIsNotAngleBetween(self):  
     self.assertFalse(standardcalc.isAngleBetween(-100,-50,-70))
     self.assertFalse(standardcalc.isAngleBetween(0,1,0))
     self.assertFalse(standardcalc.isAngleBetween(30,20,50))
     self.assertFalse(standardcalc.isAngleBetween(-45,-170,45))
Exemple #4
0
 def testIsAngleBetween(self):
     self.assertTrue(standardcalc.isAngleBetween(0,10,30))
     self.assertTrue(standardcalc.isAngleBetween(-30,0,30))
     self.assertTrue(standardcalc.isAngleBetween(30,0,-30))
     self.assertTrue(standardcalc.isAngleBetween(-100,-50,-30))