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
GroundStationBaseNote
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.scheduleattribute.track(nid_or_pdata, **kwargs)Track satellite by Norad ID or by specifying an az/el schedule as in libgs_ops.schedulingtransmit(msg[, wait])Send bytes to satellite Should normally be a wrapper for protocols.protocolbase.ProtocolBase.send_bytes()Attributes
FAILED_COMMUNICATIONLog entry for failed communication MAX_TRACK_DTAmount of time before tracking will timeout and the ground station return to idle. RECORD_SPECTRAWhether to record spectra while tracking and attempt to create a waterfall plot at end of pass RECORD_SPECTRA_DTIf RECORD_SPECTRAis True, sets the interval at which to record a spectrum.RECORD_SPECTRA_MAX_LENIf RECORD_SPECTRAis True, sets the maximum number of spectra to record.Inherited from base class
get_azel()Loop through the installed rotatorsand return a list of az/el positions by querying each individual rotator’sget_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 rotatorsstart_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_NOTRACKMONITOR_SAVE_DT_TRACKmonitorSet / Get a Monitor.propagatorSet / Get a propagator. protocolProperty to set/get the current protocol. protocolsA list of protocols (see ProtocolBase) that are installed on the groundstationradiosA list of radios (see RadioBase) that are installed on the groundstationrotatorsA list of rotators (see RotatorBase) that are installed on the groundstationrpcserverAssign an RPCServerto the Ground Station if you want to be able to call its methods remotely over XMLRPC.schedulerThe currently associated Scheduler.