libgs.groundstation.GroundStation

class libgs.groundstation.GroundStation(name, propagator=None, protocols=[], radios=[], rotators=[], commslog=<libgs.database.CommsLog object>, passlog=<libgs.database.PassDb object>, monlog=None, rpcserver=None)[source]

Main class for the Ground Station

Performs the function of interfacing with the hardware and user and ensuring everything is logged appropriately. It is built by deriving from GroundStationBase

Note

propagator, protocols, radios, rotators, rpcserver can also be set via their properties. The databases have to be specified in this constructor.

Parameters:
  • name (str) – Descriptive name of the ground station
  • propagator (Propagator, optional) – A propagator to allow tracking by Norad ID
  • protocols (ProtocolBase, optional) – List of protocols to make available to ground station
  • radios (RadioBase, optional) – List of radios to make available to ground station
  • rotators (RotatorBase, optional) – List of rotators to make available to ground station
  • commslog (CommsLog, optional) – A database to use for storing communications. If omitted an sqlite file in local direcotry will be used.
  • passlog (PassDb, optional) – A database to use for storing information about passes during a track. If omitted an sqlite file in local direcotry will be used.
  • monlog (MonitorDb, optional) – A database to use for storing monitoring data. If omitted no data is stored.
  • rpcserver (RPCServer, optional) – If an rpcserver is specified, it will be possible to control the Ground Station remotely via XMLRPC.

Methods

do_action(desc, *args, **kwargs) Perform an Action.
receive(msg) Callback that is invoked whenever data is received.
set_rangerate(range_rate) Set the range_rate for all installed radios.
set_schedule_msg(msg) Interface method to set the GSState.schedule attribute.
track(nid_or_pdata, **kwargs) Track satellite by Norad ID or by specifying an az/el schedule as in libgs_ops.scheduling
transmit(msg[, wait]) Send bytes to satellite Should normally be a wrapper for protocols.protocolbase.ProtocolBase.send_bytes()

Attributes

FAILED_COMMUNICATION Log entry for failed communication
MAX_TRACK_DT Amount of time before tracking will timeout and the ground station return to idle.
RECORD_SPECTRA Whether to record spectra while tracking and attempt to create a waterfall plot at end of pass
RECORD_SPECTRA_DT If RECORD_SPECTRA is True, sets the interval at which to record a spectrum.
RECORD_SPECTRA_MAX_LEN If RECORD_SPECTRA is True, sets the maximum number of spectra to record.

Inherited from base class

get_azel() Loop through the installed rotators and return a list of az/el positions by querying each individual rotator’s get_azel() method.
init_rx() Wrapper for protocols.protocolbase.ProtocolBase.init_rx()
init_rxtx() Wrapper for protocols.protocolbase.ProtocolBase.init_rxtx()
power_down() This method is called when class destroys and can be overloaded to perform tasks such as powering down amplifiers etc.
power_up() This method is called when class initialises and can be overloaded to perform tasks such as powering on amplifiers etc.
set_azel(az, el[, block]) Set the az/el pointing for each installed rotators
start_track(nid_or_pdata, **kwargs) Non-blocking tracking.
stop_track([block]) Stop tracking satellite.
stow([block]) Stow all installed rotators.
terminate() Wrapper for protocols.protocolbase.ProtocolBase.terminate()
MONITOR_SAVE_DT_NOTRACK
MONITOR_SAVE_DT_TRACK
monitor Set / Get a Monitor.
propagator Set / Get a propagator.
protocol Property to set/get the current protocol.
protocols A list of protocols (see ProtocolBase ) that are installed on the groundstation
radios A list of radios (see RadioBase ) that are installed on the groundstation
rotators A list of rotators (see RotatorBase ) that are installed on the groundstation
rpcserver Assign an RPCServer to the Ground Station if you want to be able to call its methods remotely over XMLRPC.
scheduler The currently associated Scheduler.