예제 #1
0
    def setUp(self):
        self.beam_u = antenna.BeamPattern(lambda k, sf: sf.I_0,
                                          az0=0.0,
                                          el0=90.0,
                                          I_0=1.0,
                                          f=1.0,
                                          beam_name='Test')

        self.tx_lst = []

        self.tx_lst.append(
            antenna.AntennaTX(
                name='a tx',
                lat=2.43,
                lon=11.0,
                alt=0.0,
                el_thresh=30.0,
                freq=1e4,
                rx_noise=10e3,
                beam=self.beam_u,
                scan=None,
                tx_power=1.0,
                tx_bandwidth=1.0,
                duty_cycle=1.0,
            ))
        self.tx_lst.append(
            antenna.AntennaTX(
                name='a tx',
                lat=2.43,
                lon=12.0,
                alt=0.0,
                el_thresh=30.0,
                freq=1e4,
                rx_noise=10e3,
                beam=self.beam_u,
                scan=None,
                tx_power=1.0,
                tx_bandwidth=1.0,
                duty_cycle=1.0,
            ))

        self.rx_lst = []
        for of in range(10):
            self.tx_lst.append(
                antenna.AntennaRX(name='a rx',
                                  lat=2.43 + of,
                                  lon=11.0,
                                  alt=0.0,
                                  el_thresh=30.0,
                                  freq=1e4,
                                  rx_noise=10e3,
                                  beam=self.beam_u))
예제 #2
0
    def test_get_scan(self):
        def scan_cont(ant, t):
            if t > 10:
                return ant.extra_scans[0]
            else:
                return ant.scan

        ant = antenna.AntennaTX(
            name='a tx',
            lat=2.43,
            lon=11.0,
            el_thresh=30.0,
            freq=1e4,
            rx_noise=10e3,
            beam=self.beam_u,
            alt=0.0,
            scan='SCAN1',
            tx_power=1.0,
            tx_bandwidth=1.0,
            duty_cycle=1.0,
            pulse_length=1e-3,
            ipp=10e-3,
            n_ipp=20,
        )

        ant.extra_scans = ['SCAN2', 'SCAN3']
        ant.scan_controler = scan_cont

        scn = ant.get_scan(2.3)
        self.assertEqual(scn, ant.scan)

        scn = ant.get_scan(20)
        self.assertEqual(scn, ant.extra_scans[0])
예제 #3
0
def eiscat_uhf():
    uhf_lat = 69.58649229
    uhf_lon = 19.22592538
    uhf_alt = 85.554

    rx_beam = alib.uhf_beam(az0=90.0, el0=75.0, I_0=10**4.81, f=930e6)

    scan = rslib.beampark_model(
        az=90.0,
        el=75.0,
        lat=uhf_lat,
        lon=uhf_lon,
        alt=uhf_alt,
    )

    uhf = antenna.AntennaRX(
        name="UHF Tromso",
        lat=uhf_lat,
        lon=uhf_lon,
        alt=uhf_alt,
        el_thresh=30,
        freq=930e6,
        rx_noise=100,
        beam=rx_beam,
        scan=scan,
        phased=False,
    )

    tx_beam = alib.uhf_beam(az0=90.0, el0=75.0, I_0=10**4.81, f=930e6)

    uhf_tx = antenna.AntennaTX(
        name="UHF Tromso TX",
        lat=uhf_lat,
        lon=uhf_lon,
        alt=uhf_alt,
        el_thresh=30,
        freq=930e6,
        rx_noise=100,
        beam=tx_beam,
        scan=scan,
        tx_power=1.6e6,  # 2 MW?
        tx_bandwidth=1e6,  # 1 MHz
        duty_cycle=0.125,
        n_ipp=10.0,
        ipp=20e-3,
        pulse_length=30.0 * 64.0 * 1e-6,
        phased=False,
    )

    # EISCAT UHF beampark
    tx = [uhf_tx]
    rx = [uhf]

    euhf = RadarSystem(tx, rx, 'Eiscat UHF')
    euhf.set_SNR_limits(14.0, 14.0)
    return euhf
예제 #4
0
 def test_init(self):
     ant = antenna.AntennaTX(
         name='a tx',
         lat=2.43,
         lon=11.0,
         el_thresh=30.0,
         freq=1e4,
         rx_noise=10e3,
         beam=self.beam_u,
         alt=0.0,
         scan=None,
         tx_power=1.0,
         tx_bandwidth=1.0,
         duty_cycle=1.0,
         pulse_length=1e-3,
         ipp=10e-3,
         n_ipp=20,
     )
예제 #5
0
def tromso_space_radar(freq=1.2e9):
    lat = 69.5866115
    lon = 19.221555
    alt = 85.0

    rx_beam = alib.tsr_beam(
        el0=90.0,
        f=freq,
    )

    scan = rslib.beampark_model(
        az=0.0,
        el=90.0,
        lat=lat,
        lon=lon,
        alt=alt,
    )

    tsr_rx = antenna.AntennaRX(
        name="Tromso Space Radar",
        lat=lat,
        lon=lon,
        alt=alt,
        el_thresh=30,
        freq=freq,
        rx_noise=100,
        beam=rx_beam,
        phased=False,
        scan=scan,
    )

    tx_beam = alib.tsr_beam(
        el0=90.0,
        f=freq,
    )

    tsr_tx = antenna.AntennaTX(
        name="Tromso Space Radar TX",
        lat=lat,
        lon=lon,
        alt=alt,
        el_thresh=30,
        freq=freq,
        rx_noise=100,
        beam=tx_beam,
        scan=scan,
        tx_power=500.0e3,
        tx_bandwidth=1e6,
        duty_cycle=0.125,
        n_ipp=10.0,
        ipp=20e-3,
        pulse_length=30.0 * 64.0 * 1e-6,
    )

    # EISCAT UHF beampark
    tx = [tsr_tx]
    rx = [tsr_rx]

    tsr_r = RadarSystem(tx, rx, 'Tromso Space Radar')
    tsr_r.set_SNR_limits(10.0, 10.0)
    return tsr_r
예제 #6
0
def eiscat_svalbard():
    """
    The steerable antenna of the ESR radar, default settings for the Space Debris radar mode.
    """
    uhf_lat = 78.15
    uhf_lon = 16.02
    uhf_alt = 0.0

    rx_beam = alib.uhf_beam(
        az0=90.0,
        el0=75.0,
        I_0=10**4.25,
        f=500e6,
    )
    tx_beam = alib.uhf_beam(
        az0=90.0,
        el0=75.0,
        I_0=10**4.25,
        f=500e6,
    )

    scan = rslib.beampark_model(
        az=90.0,
        el=75.0,
        lat=uhf_lat,
        lon=uhf_lon,
        alt=uhf_alt,
    )

    uhf = antenna.AntennaRX(
        name="Steerable Svalbard",
        lat=uhf_lat,
        lon=uhf_lon,
        alt=uhf_alt,
        el_thresh=30,
        freq=500e6,
        rx_noise=120,
        beam=rx_beam,
        phased=False,
        scan=scan,
    )

    uhf_tx = antenna.AntennaTX(
        name="Steerable Svalbard TX",
        lat=uhf_lat,
        lon=uhf_lon,
        alt=uhf_alt,
        el_thresh=30,
        freq=500e6,
        rx_noise=120,
        beam=tx_beam,
        scan=scan,
        tx_power=0.6e6,  # 600 kW
        tx_bandwidth=1e6,  # 1 MHz
        duty_cycle=0.125,
        pulse_length=30.0 * 64.0 * 1e-6,
        ipp=20e-3,
        n_ipp=10.0,
    )

    # EISCAT UHF beampark
    tx = [uhf_tx]
    rx = [uhf]

    euhf = RadarSystem(tx, rx, 'Eiscat Svalbard Steerable Antenna')
    euhf.set_SNR_limits(14.77, 14.77)
    return euhf
예제 #7
0
def eiscat_3d(beam='interp', stage=1):
    '''The EISCAT_3D system.

    For more information see:
      * `EISCAT <https://eiscat.se/>`_
      * `EISCAT 3D <https://www.eiscat.se/eiscat3d/>`_

    :param str beam: Decides what initial antenna radiation-model to use.
    :param int stage: The stage of development of EISCAT 3D. 

    **EISCAT 3D Stages:**

      * Stage 1: As of writing it is assumed to have all of the antennas in place but only transmitters on half of the antennas in a dense core ,i.e. TX will have 42 dB peak gain while RX still has 45 dB peak gain. 3 Sites will exist, one is a TX and RX, the other 2 RX sites.
      * Stage 2: Both TX and RX sites will have 45 dB peak gain.
      * Stage 3: (NOT IMPLEMENTED HERE) 2 additional RX sites will be added.


    **Beam options:**

      * gauss: Gaussian tapered beam model :func:`antenna_library.planar_beam`.
      * interp: Interpolated array pattern.
      * array: Ideal summation of all antennas in the array :func:`antenna_library.e3d_array_beam_stage1` and :func:`antenna_library.e3d_array_beam`.


    # TODO: Geographical location measured with? Probably WGS84.
    '''
    e3d_freq = 233e6

    if stage == 1:
        e3d_tx_gain = 10**4.3
        a0_tx = 20.0
    elif stage == 2:
        e3d_tx_gain = 10**4.5
        a0_tx = 40.0
    else:
        raise Exception('Stage "{}" not recognized.'.format(stage))

    e3d_rx_gain = 10**4.5

    if beam == 'gauss':
        tx_beam_ski = alib.planar_beam(
            az0=0,
            el0=90,
            I_0=e3d_tx_gain,
            f=e3d_freq,
            a0=a0_tx,
            az1=0.0,
            el1=90.0,
        )
        rx_beam_ski = alib.planar_beam(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
            f=e3d_freq,
            a0=40.0,
            az1=0.0,
            el1=90.0,
        )
        rx_beam_kar = alib.planar_beam(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
            f=e3d_freq,
            a0=40.0,
            az1=0.0,
            el1=90.0,
        )
        rx_beam_kai = alib.planar_beam(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
            f=e3d_freq,
            a0=40.0,
            az1=0.0,
            el1=90.0,
        )

    elif beam == 'array':
        if stage == 1:
            tx_beam_ski = alib.e3d_array_beam_stage1(
                az0=0,
                el0=90,
                I_0=e3d_tx_gain,
                opt='dense',
            )
        elif stage == 2:
            tx_beam_ski = alib.e3d_array_beam(
                az0=0,
                el0=90,
                I_0=e3d_tx_gain,
            )

        rx_beam_ski = alib.e3d_array_beam(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
        )
        rx_beam_kar = alib.e3d_array_beam(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
        )
        rx_beam_kai = alib.e3d_array_beam(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
        )
    elif beam == 'interp':
        if stage == 1:
            tx_beam_ski = alib.e3d_array_beam_stage1_dense_interp(
                az0=0,
                el0=90,
                I_0=e3d_tx_gain,
            )
        elif stage == 2:
            tx_beam_ski = alib.e3d_array_beam_interp(
                az0=0,
                el0=90,
                I_0=e3d_tx_gain,
            )

        rx_beam_ski = alib.e3d_array_beam_interp(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
        )
        rx_beam_kar = alib.e3d_array_beam_interp(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
        )
        rx_beam_kai = alib.e3d_array_beam_interp(
            az0=0,
            el0=90,
            I_0=e3d_rx_gain,
        )
    else:
        raise Exception('Beam model "{}" not recognized.'.format(beam))

    ski_lat = 69.34023844
    ski_lon = 20.313166
    ski_alt = 0.0

    ski = antenna.AntennaRX(
        name="Skibotn",
        lat=ski_lat,
        lon=ski_lon,
        alt=ski_alt,
        el_thresh=30,
        freq=e3d_freq,
        rx_noise=150,
        beam=rx_beam_ski,
    )

    dwell_time = 0.1

    scan = rslib.ew_fence_model(
        lat=ski_lat,
        lon=ski_lon,
        alt=ski_alt,
        min_el=30,
        angle_step=1.0,
        dwell_time=dwell_time,
    )

    ski_tx = antenna.AntennaTX(
        name="Skibotn TX",
        lat=ski_lat,
        lon=ski_lon,
        alt=ski_alt,
        el_thresh=30,
        freq=e3d_freq,
        rx_noise=150,
        beam=tx_beam_ski,
        scan=scan,
        tx_power=5e6,  # 5 MW
        tx_bandwidth=100e3,  # 100 kHz tx bandwidth
        duty_cycle=0.25,  # 25% duty-cycle
        pulse_length=1920e-6,
        ipp=10e-3,
        n_ipp=int(dwell_time / 10e-3),
    )

    kar_lat = 68.463862
    kar_lon = 22.458859
    kar_alt = 0.0

    kar = antenna.AntennaRX(
        name="Karesuvanto",
        lat=kar_lat,
        lon=kar_lon,
        alt=kar_alt,
        el_thresh=30,
        freq=e3d_freq,
        rx_noise=150,
        beam=rx_beam_kar,
    )

    kai_lat = 68.148205
    kai_lon = 19.769894
    kai_alt = 0.0

    kai = antenna.AntennaRX(
        name="Kaiseniemi",
        lat=kai_lat,
        lon=kai_lon,
        alt=kai_alt,
        el_thresh=30,
        freq=e3d_freq,
        rx_noise=150,
        beam=rx_beam_kai,
    )
    # define transmit and receive antennas for a radar network.
    tx = [ski_tx]
    rx = [ski, kar, kai]

    if stage > 1:
        name = 'EISCAT 3D stage {}'.format(stage)
    else:
        name = 'EISCAT 3D'

    e3d = RadarSystem(
        tx_lst=tx,
        rx_lst=rx,
        name=name,
        max_on_axis=15.0,
        min_SNRdb=1.0,
    )

    e3d.set_SNR_limits(10.0, 10.0)
    return e3d
예제 #8
0
    def test_set_scan(self):
        from radar_scans import RadarScan

        def pfun(t, **kw):
            if t < 2.5:
                return 0, 0, 1
            else:
                return 180, 0, 1

        def pfun2(t, **kw):
            return 0, 90, 1

        scan1 = RadarScan(23,
                          123,
                          101,
                          pfun,
                          0.1,
                          pointing_coord='azel',
                          name='a scan')
        scan2 = RadarScan(23,
                          123,
                          101,
                          pfun2,
                          0.1,
                          pointing_coord='azel',
                          name='12 scan')
        scan3 = RadarScan(23,
                          123,
                          101,
                          pfun,
                          0.1,
                          pointing_coord='azel',
                          name='32 scan')

        def scan_cont(ant, t):
            if t > 10:
                return ant.extra_scans[0]
            else:
                return ant.scan

        ant = antenna.AntennaTX(
            name='a tx',
            lat=0.0,
            lon=0.0,
            alt=0.0,
            el_thresh=30.0,
            freq=1e4,
            rx_noise=10e3,
            beam=self.beam_u,
            scan=scan1,
            tx_power=1.0,
            tx_bandwidth=1.0,
            duty_cycle=1.0,
            pulse_length=1e-3,
            ipp=10e-3,
            n_ipp=10,
        )

        ant.set_scan(extra_scans=[scan2, scan3], scan_controler=scan_cont)

        scn = ant.get_scan(2.3)
        assert scn is scan1

        scn = ant.get_scan(20)
        assert scn is scan2

        dec = 3
        p0, k0 = ant.get_pointing(2.3)
        nt.assert_almost_equal(k0[2], 1.0, decimal=dec)

        p0, k0 = ant.get_pointing(7.8)
        nt.assert_almost_equal(k0[2], -1.0, decimal=dec)

        p0, k0 = ant.get_pointing(15.)
        nt.assert_almost_equal(k0[0], 1.0, decimal=dec)
예제 #9
0
def mock_radar():

    lat = 90.0
    lon = 0.0
    alt = 0.0

    rx_beam = alib.planar_beam(
        az0=0,
        el0=90,
        I_0=10**4.5,
        f=233e6,
        a0=40,
        az1=0.0,
        el1=90.0,
    )
    tx_beam = alib.planar_beam(
        az0=0,
        el0=90,
        I_0=10**4.5,
        f=233e6,
        a0=40,
        az1=0.0,
        el1=90.0,
    )

    rx = antenna.AntennaRX(
        name="Top",
        lat=lat,
        lon=lon,
        alt=alt,
        el_thresh=30,
        freq=233e6,
        rx_noise=120,
        beam=rx_beam,
    )

    scan = rslib.beampark_model(
        az=0.0,
        el=90.0,
        lat=lat,
        lon=lon,
        alt=alt,
    )

    tx = antenna.AntennaTX(
        name="Top TX",
        lat=lat,
        lon=lon,
        alt=alt,
        el_thresh=30,
        freq=233e6,
        rx_noise=120,
        beam=tx_beam,
        scan=scan,
        tx_power=5.0e6,
        tx_bandwidth=1e6,  # 1 MHz
        duty_cycle=0.25,
        pulse_length=30.0 * 64.0 * 1e-6,
        ipp=20e-3,
        n_ipp=10.0,
    )

    tx = [tx]
    rx = [rx]

    Mock = RadarSystem(tx, rx, 'Mock radar')
    Mock.set_FOV(max_on_axis=90.0, horizon_elevation=0.0)
    return Mock
예제 #10
0
def mock_radar_mult():

    lat = [85.0, 89.0, 90.0, 89.0, 85.0]
    lon = [0, 90.0, 0, 270.0, 180]
    alt = 0.0
    tx_l = []
    rx_l = []

    for ind in range(5):
        rx_beam = alib.planar_beam(
            az0=0,
            el0=90,
            I_0=10**4.5,
            f=233e6,
            a0=40,
            az1=0.0,
            el1=90.0,
        )
        rx = antenna.AntennaRX(
            name="Top",
            lat=lat[ind],
            lon=lon[ind],
            alt=alt,
            el_thresh=30,
            freq=233e6,
            rx_noise=120,
            beam=rx_beam,
        )
        rx_l.append(rx)

    lat = [90.0, 87.0]
    lon = [0, 0.0]

    for ind in range(2):
        tx_beam = alib.planar_beam(
            az0=0,
            el0=90,
            I_0=10**4.5,
            f=233e6,
            a0=40,
            az1=0.0,
            el1=90.0,
        )

        scan = rslib.beampark_model(
            az=0.0,
            el=90.0,
            lat=lat[ind],
            lon=lon[ind],
            alt=alt,
        )

        tx = antenna.AntennaTX(
            name="Top TX",
            lat=lat[ind],
            lon=lon[ind],
            alt=alt,
            el_thresh=30,
            freq=233e6,
            rx_noise=120,
            beam=tx_beam,
            scan=scan,
            tx_power=5.0e6,
            tx_bandwidth=1e6,  # 1 MHz
            duty_cycle=0.25,
            pulse_length=30.0 * 64.0 * 1e-6,
            ipp=20e-3,
            n_ipp=10.0,
        )
        tx_l.append(tx)

    Mock = RadarSystem(tx_l, rx_l, 'bIG Mock radar')
    Mock.set_FOV(max_on_axis=90.0, horizon_elevation=0.0)
    return Mock