コード例 #1
0
    def __init__(self,
                 satellite_configuration,
                 groundstation_configuration,
                 channel_configuration,
                 monte_carlo=False,
                 warn=True):

        # store the parameters internally
        self.satellite_configuration = satellite_configuration
        self.groundstation_configuration = groundstation_configuration
        self.channel_configuration = channel_configuration
        self.monte_carlo = monte_carlo
        self.warn = warn

        # if we're doing Monte-Carlo we need to choose an elevation to use
        if self.monte_carlo:

            distribution = channel_configuration['statistical']['geometry'][
                'elevation']

            assert distribution[0] == 'Uniform'

            minimum_elevation = float(distribution[1][0])
            maximum_elevation = float(distribution[1][1])

            self.elevation = (maximum_elevation - minimum_elevation
                              ) * random.random() + minimum_elevation

        else:
            self.elevation = channel_configuration['nominal']['geometry'][
                'elevation']

        # set the components
        self.satellite_init()
        self.groundstation_init()
        self.channel_init()

        # defaults to DVB-S2X
        self.modulation = pylink.Modulation()

        # form the downlink signal chain
        self.downlink = pylink.DAGModel([
            self.geometry, self.gs_rx_antenna, self.sat_transmitter,
            self.sat_tx_antenna, self.gs_receiver, self.downlink_channel,
            self.rx_interconnect, self.tx_interconnect, self.modulation,
            pylink.LinkBudget(name='Downlink', is_downlink=True)
        ])

        # form the downlink signal chain
        self.uplink = pylink.DAGModel([
            self.geometry, self.sat_rx_antenna, self.sat_receiver,
            self.gs_transmitter, self.gs_tx_antenna, self.uplink_channel,
            pylink.LinkBudget(name='Uplink', is_downlink=False)
        ])
コード例 #2
0
def model():
    return pylink.DAGModel([pylink.Geometry(),
                            pylink.Antenna(is_rx=True),
                            pylink.Interconnect(is_rx=True),
                            pylink.Receiver(),
                            pylink.Transmitter(),
                            pylink.Interconnect(is_rx=False),
                            pylink.Antenna(is_rx=False),
                            pylink.Channel(),
                            pylink.Modulation(name='QPSK', perf=perf),
                            pylink.LinkBudget()])
コード例 #3
0
                           center_freq_mhz=8200,
                           atmospheric_loss_db=1,
                           ionospheric_loss_db=1,
                           rain_loss_db=2,
                           multipath_fading_db=0,
                           polarization_mismatch_loss_db=3)

s_channel = pylink.Channel(bitrate_hz=500e3,
                           allocation_hz=5e6,
                           center_freq_mhz=2022.5,
                           atmospheric_loss_db=.5,
                           ionospheric_loss_db=.5,
                           rain_loss_db=1,
                           multipath_fading_db=0,
                           polarization_mismatch_loss_db=3)

# defaults to DVB-S2X
modulation = pylink.Modulation()

DOWNLINK = pylink.DAGModel([
    geometry, gs_rx_antenna, sat_transmitter, sat_tx_antenna, gs_receiver,
    x_channel, rx_interconnect, tx_interconnect, modulation,
    pylink.LinkBudget(name='Example XBand Downlink', is_downlink=True)
])

UPLINK = pylink.DAGModel([
    geometry, sat_rx_antenna, sat_receiver, gs_transmitter, gs_tx_antenna,
    s_channel,
    pylink.LinkBudget(name='Example SBand Uplink', is_downlink=False)
])
コード例 #4
0
Nodes are added to the DAG in the order in which they are received.
So you can, if you wish, override a standard definition.
"""

# Vanilla link budget
m = pylink.DAGModel([
    pylink.Geometry(),
    pylink.Transmitter(tx_power_at_pa_dbw=2),
    pylink.Interconnect(is_rx=False),
    pylink.Antenna(is_rx=False),
    pylink.Receiver(),
    pylink.Antenna(is_rx=True),
    pylink.Interconnect(is_rx=True),
    pylink.Channel(),
    pylink.Modulation('DVB-S2X'),
    pylink.LinkBudget()
])
e = m.enum

print 'Link margin in vanilla example: %s' % m.link_margin_db


# let's override the link_margin_db node in the kwargs
def _evil_margin_db(model):
    return -3.0


m = pylink.DAGModel([
    pylink.Geometry(),
    pylink.Transmitter(tx_power_at_pa_dbw=2),