def getWayPointAtDistanceBearing(self, Name='', DistanceMeters=0.0, BearingDegrees=0.0): ''' returns the latitude and longitude of a point along a great circle located along a radial at a distance from "self" ''' assert (not(DistanceMeters is None) and isinstance(DistanceMeters, float)) assert (not(BearingDegrees is None) and isinstance(BearingDegrees, float)) latitudeDegrees , longitudeDegrees = LatitudeLongitudeAtDistanceBearing([self.LatitudeDegrees,self.LongitudeDegrees], DistanceMeters, BearingDegrees) # if len(Name)==0: # Name = "Way-Point-At-Distance-Bearing-{0}".format(self.Name) return WayPoint(Name , latitudeDegrees, longitudeDegrees )
def getGeoPointAtDistanceHeading(self, DistanceMeters=0.0, HeadingDegrees=0.0): ''' returns the lat long of a point along a great circle located along a radial at a distance from "self" ''' assert (not(DistanceMeters is None) and isinstance(DistanceMeters, float)) assert (not(HeadingDegrees is None) and isinstance(HeadingDegrees, float)) ''' convert heading into bearing ''' BearingDegrees = math.fmod ( HeadingDegrees + 180.0 , 360.0 ) - 180.0 latitudeDegrees , longitudeDegrees = LatitudeLongitudeAtDistanceBearing([self.LatitudeDegrees,self.LongitudeDegrees], DistanceMeters, BearingDegrees) return latitudeDegrees, longitudeDegrees
def getWayPointAtDistanceHeading(self, Name='', DistanceMeters=0.0, HeadingDegrees=0.0): ''' returns the lat long of a point along a great circle located along a radial at a distance from "self" ''' assert (not(DistanceMeters is None) and isinstance(DistanceMeters, float)) assert (not(HeadingDegrees is None) and isinstance(HeadingDegrees, float)) ''' convert heading into bearing ''' BearingDegrees = math.fmod ( HeadingDegrees + 180.0 , 360.0 ) - 180.0 latitudeDegrees , longitudeDegrees = LatitudeLongitudeAtDistanceBearing([self.LatitudeDegrees,self.LongitudeDegrees], DistanceMeters, BearingDegrees) if len(Name)==0: Name = "Way-Point-At-Distance-Heading-{0}".format(self.Name) return WayPoint(Name, latitudeDegrees, longitudeDegrees)