Modules reference

satnogsclient

SatNOGS Client module initialization

satnogsclient.main()[source]

Main function

satnogsclient.locator.locator

class satnogsclient.locator.locator.Locator[source]
static show_location(gpsd)[source]
update_location()[source]

satnogsclient.observer.commsocket

satnogsclient.observer.observer

class satnogsclient.observer.observer.Observer[source]
_gnu_proc = None
observe()[source]

Starts threads for rotcrl and rigctl.

plot_waterfall()[source]
poll_gnu_proc_status()[source]
remove_waterfall_file()[source]
rename_data_file()[source]
rename_ogg_file()[source]
run_rig()[source]
run_rot()[source]
setup(observation_id, tle, observation_end, frequency, mode, baud)[source]

Sets up required internal variables. * returns True if setup is ok * returns False if issue is encountered

satnogsclient.observer.orbital

satnogsclient.observer.orbital.pinpoint(observer_dict, satellite_dict, timestamp=None)[source]

Provides azimuth and altitude of tracked object.

args:

observer_dict: dictionary with details of observation point. satellite_dict: dictionary with details of satellite. time: timestamp we want to use for pinpointing the observed object.

returns:

Dictionary containing azimuth, altitude and “ok” for error detection.

satnogsclient.observer.waterfall

satnogsclient.observer.waterfall.plot_waterfall(waterfall_file, waterfall_png)[source]
satnogsclient.observer.waterfall.read_waterfall(waterfall_file)[source]

satnogsclient.observer.worker

class satnogsclient.observer.worker.Worker(ip, port, time_to_stop=None, frequency=None, proc=None, sleep_time=None)[source]

Class to facilitate as a worker for rotctl/rigctl.

_altitude = None
_azimuth = None
_communicate_tracking_info()[source]
_frequency = None
_gnu_proc = None
_observation_end = None
_sleep_time = 0.1
_stay_alive = False
property is_alive

Returns if tracking loop is alive or not.

observer_dict = {}
satellite_dict = {}
send_to_socket(pin, sock)[source]
trackobject(observer_dict, satellite_dict)[source]

Sets tracking object. Can also be called while tracking to manipulate observation.

trackstart()[source]

Starts the thread that communicates tracking info to remote socket. Stops by calling trackstop()

trackstop()[source]

Sets object flag to false and stops the tracking thread.

class satnogsclient.observer.worker.WorkerFreq(ip, port, time_to_stop=None, frequency=None, proc=None, sleep_time=None)[source]
_communicate_tracking_info()[source]

Runs as a daemon thread, communicating tracking info to remote socket. Uses observer and satellite objects set by trackobject(). Will exit when observation_end timestamp is reached.

send_to_socket(pin, sock)[source]
class satnogsclient.observer.worker.WorkerTrack(ip, port, time_to_stop=None, frequency=None, proc=None, sleep_time=None)[source]
_communicate_tracking_info()[source]

Runs as a daemon thread, communicating tracking info to remote socket. Uses observer and satellite objects set by trackobject(). Will exit when observation_end timestamp is reached.

_flip = False
_midpoint = None
static find_midpoint(observer_dict, satellite_dict, start)[source]
static flip_coordinates(azi, alt, timestamp, midpoint)[source]
static normalize_angle(num, lower=0, upper=360)[source]
send_to_socket(pin, sock)[source]
trackobject(observer_dict, satellite_dict)[source]

Sets tracking object. Can also be called while tracking to manipulate observation.

satnogsclient.radio

class satnogsclient.radio.Radio(model=Hamlib.RIG_MODEL_DUMMY, path='', debug=Hamlib.RIG_DEBUG_WARN)[source]

Communicate and interface with radios

Parameters
  • model – Model of Hamlib radio

  • path (str, optional) – Path or address to Hamlib radio device

  • debug (int, optional) – Hamlib rig debug level

close()[source]

Close Hamlib radio device

property frequency

Get radio frequency

Returns

Radio frequency

Return type

float

open()[source]

Open Hamlib radio device

property vfo

Get active VFO

Returns

Active VFO

Return type

int

satnogsclient.rotator

class satnogsclient.rotator.Rotator(model, baud, port)[source]

Communicate and interface with rotators

Parameters
  • model (str) – Model of rotator e.g. “ROT_MODEL_EASYCOMM3” or “ROT_MODEL_DUMMY”

  • baud (int) – The baud rate of serial communication, e.g. 19200

  • port (str) – The port of the rotator, e.g. “/dev/ttyUSB0”

close()[source]

End the communication with rotator

get_conf(cmd)[source]

Return the configuration of a register

Parameters

pos (int) – Number of the register

Returns

Value of register

Return type

str

get_info()[source]

Return information about the rotator

move(direction, speed)[source]

Move the rotator with speed (mdeg/s) to specific direction

Parameters
  • direction (str) – The direction of movent, e.g. ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT

  • speed (int) – The velocity set point in mdeg/s

open()[source]

Start the communication with rotator

park()[source]

Move the rotator to park position and return the current position

property position

Return the position in degrees of azimuth and elevation

Returns

Position in degrees

Return type

tuple(float, float)

reset()[source]

Move the rotator to home position and return the current position

stop()[source]

Stop the rotator and return the current position

satnogsclient.scheduler.tasks

satnogsclient.scheduler.tasks.get_jobs()[source]

Query SatNOGS Network API to GET jobs.

satnogsclient.scheduler.tasks.get_observation(job_id)[source]
satnogsclient.scheduler.tasks.get_observation_list()[source]
satnogsclient.scheduler.tasks.keep_or_remove_file(filename)[source]
satnogsclient.scheduler.tasks.post_data()[source]

PUT observation data back to Network API.

satnogsclient.scheduler.tasks.spawn_observer(**kwargs)[source]
satnogsclient.scheduler.tasks.status_listener()[source]

satnogsclient.settings

SatNOGS Client settings file

satnogsclient.settings._cast_or_none(func, value)[source]
satnogsclient.settings.validate(logger)[source]

Validate the provided settings: - Check for the existance of all required variables - Validate format of the provided value for some required variables

Since this module has to be loaded before the logger has been initialized, this method requires a configured logger to be passed.

Arguments: logger – the output logger

satnogsclient.upsat.gnuradio_handler

satnogsclient.upsat.gnuradio_handler.exec_gnuradio(observation_file, waterfall_file, freq, mode, baud, decoded_data)[source]
satnogsclient.upsat.gnuradio_handler.get_flowgraph_script_name(mode='')[source]

Returns the GNU Radio flowgraph script name that will be executed based on the given mode, or the default one if no mode is specified

satnogsclient.upsat.gnuradio_handler.get_gnuradio_info()[source]