Exemplo n.º 1
0
    def azibazis_to(self, receiver):
        if self.same_origin(receiver):
            azis = r2d * num.arctan2(receiver.east_shift - self.east_shifts,
                                     receiver.north_shift - self.north_shifts)
            bazis = azis + 180.
        else:
            slats, slons = self.effective_latlons
            rlat, rlon = receiver.effective_latlon
            azis = orthodrome.azimuth_numpy(slats, slons, rlat, rlon)
            bazis = orthodrome.azimuth_numpy(rlat, rlon, slats, slons)

        return azis, bazis
Exemplo n.º 2
0
    def azibazi_to(self, other):
        '''
        Compute azimuth and backazimuth to and from other location object.
        '''

        if self.same_origin(other):
            azi = r2d * math.atan2(other.east_shift - self.east_shift,
                                   other.north_shift - self.north_shift)
            bazi = azi + 180.
        else:
            slat, slon = self.effective_latlon
            rlat, rlon = other.effective_latlon
            azi = orthodrome.azimuth_numpy(slat, slon, rlat, rlon)
            bazi = orthodrome.azimuth_numpy(rlat, rlon, slat, slon)

        return azi, bazi
def get_theoretical_backazimuth(event, stations, center_station):
    return (ortho.azimuth_numpy(
        event.lat, event.lon, center_station.lat, center_station.lon)
            + 180.) % 360.
Exemplo n.º 4
0
def get_theoretical_backazimuth(event, stations, center_station):
    return (ortho.azimuth_numpy(event.lat, event.lon, center_station.lat,
                                center_station.lon) + 180.) % 360.