Add support for satellite QSOs. Addresses issue #55.

pull/61/head
Christian T. Jacobs 2017-09-04 15:48:50 +01:00
rodzic 591fe60f87
commit 4550f841f7
4 zmienionych plików z 352 dodań i 42 usunięć

Wyświetl plik

@ -35,6 +35,7 @@ AVAILABLE_FIELD_NAMES_TYPES = {"CALL": "S",
"BAND": "E",
"MODE": "E",
"SUBMODE": "E",
"PROP_MODE": "E",
"TX_PWR": "N",
"RST_SENT": "S",
"RST_RCVD": "S",
@ -48,12 +49,15 @@ AVAILABLE_FIELD_NAMES_TYPES = {"CALL": "S",
"DXCC": "N",
"CQZ": "N",
"ITUZ": "N",
"IOTA": "C"}
"IOTA": "C",
"GRIDSQUARE": "S",
"SAT_NAME": "S",
"SAT_MODE": "S"}
# Note: The logbook uses the ADIF field names for the database column names.
# This list is used to display the columns in a logical order.
AVAILABLE_FIELD_NAMES_ORDERED = ["CALL", "QSO_DATE", "TIME_ON", "FREQ", "BAND", "MODE", "SUBMODE", "TX_PWR",
AVAILABLE_FIELD_NAMES_ORDERED = ["CALL", "QSO_DATE", "TIME_ON", "FREQ", "BAND", "MODE", "SUBMODE", "PROP_MODE", "TX_PWR",
"RST_SENT", "RST_RCVD", "QSL_SENT", "QSL_RCVD", "NOTES", "NAME",
"ADDRESS", "STATE", "COUNTRY", "DXCC", "CQZ", "ITUZ", "IOTA"]
"ADDRESS", "STATE", "COUNTRY", "DXCC", "CQZ", "ITUZ", "IOTA", "GRIDSQUARE", "SAT_NAME", "SAT_MODE"]
# Define the more user-friendly versions of the field names.
AVAILABLE_FIELD_NAMES_FRIENDLY = {"CALL": "Callsign",
"QSO_DATE": "Date",
@ -62,6 +66,7 @@ AVAILABLE_FIELD_NAMES_FRIENDLY = {"CALL": "Callsign",
"BAND": "Band",
"MODE": "Mode",
"SUBMODE": "Submode",
"PROP_MODE": "Propagation Mode",
"TX_PWR": "TX Power (W)",
"RST_SENT": "RST Sent",
"RST_RCVD": "RST Received",
@ -75,7 +80,10 @@ AVAILABLE_FIELD_NAMES_FRIENDLY = {"CALL": "Callsign",
"DXCC": "DXCC",
"CQZ": "CQ Zone",
"ITUZ": "ITU Zone",
"IOTA": "IOTA Designator"}
"IOTA": "IOTA Designator",
"GRIDSQUARE": "Grid Square",
"SAT_NAME": "Satellite Name",
"SAT_MODE": "Satellite Mode"}
# A: AwardList
# B: Boolean
@ -186,6 +194,8 @@ BANDS = ["", "2190m", "630m", "560m", "160m", "80m", "60m", "40m", "30m", "20m",
# The lower and upper frequency bounds (in MHz) for each band in BANDS.
BANDS_RANGES = [(None, None), (0.136, 0.137), (0.472, 0.479), (0.501, 0.504), (1.8, 2.0), (3.5, 4.0), (5.102, 5.4065), (7.0, 7.3), (10.0, 10.15), (14.0, 14.35), (18.068, 18.168), (21.0, 21.45), (24.890, 24.99), (28.0, 29.7), (50.0, 54.0), (70.0, 71.0), (144.0, 148.0), (222.0, 225.0), (420.0, 450.0), (902.0, 928.0), (1240.0, 1300.0), (2300.0, 2450.0), (3300.0, 3500.0), (5650.0, 5925.0), (10000.0, 10500.0), (24000.0, 24250.0), (47000.0, 47200.0), (75500.0, 81000.0), (119980.0, 120020.0), (142000.0, 149000.0), (241000.0, 250000.0)]
PROPAGATION_MODES = ["", "AS", "AUE", "AUR", "BS", "ECH", "EME", "ES", "F2", "FAI", "INTERNET", "ION", "IRL", "MS", "RPT", "RS", "SAT", "TEP", "TR"]
ADIF_VERSION = "3.0.4"

Wyświetl plik

@ -115,6 +115,12 @@ class RecordDialog:
self.sources["SUBMODE"].append_text("")
self.sources["SUBMODE"].set_active(0) # Set an empty string initially. As soon as the user selects a particular MODE, the available SUBMODES will appear.
# PROP_MODE
self.sources["PROP_MODE"] = self.builder.get_object("qso_propagation_mode_combo")
for propagation_mode in PROPAGATION_MODES:
self.sources["PROP_MODE"].append_text(propagation_mode)
self.sources["PROP_MODE"].set_active(0) # Set an empty string as the default option.
# POWER
self.sources["TX_PWR"] = self.builder.get_object("qso_power_entry")
@ -167,6 +173,17 @@ class RecordDialog:
# IOTA
self.sources["IOTA"] = self.builder.get_object("station_iota_entry")
# GRIDSQUARE
self.sources["GRIDSQUARE"] = self.builder.get_object("station_gridsquare_entry")
# SATELLITE INFORMATION
# SAT_NAME
self.sources["SAT_NAME"] = self.builder.get_object("satellite_name_entry")
# SAT_MODE
self.sources["SAT_MODE"] = self.builder.get_object("satellite_mode_entry")
# Populate various fields, if possible.
if(index is not None):
# The record already exists, so display its current data in the input boxes.
@ -191,6 +208,8 @@ class RecordDialog:
elif(field_names[i] == "SUBMODE"):
# Skip, because this has been (or will be) handled when populating the MODE field.
continue
elif(field_names[i] == "PROP_MODE"):
self.sources[field_names[i]].set_active(PROPAGATION_MODES.index(data))
elif(field_names[i] == "QSL_SENT"):
self.sources[field_names[i]].set_active(qsl_sent_options.index(data))
elif(field_names[i] == "QSL_RCVD"):
@ -269,6 +288,8 @@ class RecordDialog:
return self.sources["MODE"].get_active_text()
elif(field_name == "SUBMODE"):
return self.sources["SUBMODE"].get_active_text()
elif(field_name == "PROP_MODE"):
return self.sources["PROP_MODE"].get_active_text()
elif(field_name == "BAND" or field_name == "QSL_SENT" or field_name == "QSL_RCVD"):
return self.sources[field_name].get_active_text()
elif(field_name == "NOTES"):

Wyświetl plik

@ -1759,6 +1759,23 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="visible_fields_submode">
<property name="label" translatable="yes">Submode</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -1774,8 +1791,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkCheckButton" id="visible_fields_submode">
<property name="label" translatable="yes">Submode</property>
<object class="GtkCheckButton" id="visible_fields_prop_mode">
<property name="label" translatable="yes">Propagation Mode</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@ -1875,6 +1892,23 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="visible_fields_notes">
<property name="label" translatable="yes">Notes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -1889,23 +1923,6 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkCheckButton" id="visible_fields_notes">
<property name="label" translatable="yes">Notes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="visible_fields_name">
<property name="label" translatable="yes">Name</property>
@ -1920,7 +1937,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
<property name="position">0</property>
</packing>
</child>
<child>
@ -1937,7 +1954,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
@ -1954,7 +1971,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
<child>
@ -1971,7 +1988,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">4</property>
<property name="position">3</property>
</packing>
</child>
<child>
@ -1984,6 +2001,23 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="visible_fields_cqz">
<property name="label" translatable="yes">CQ Zone</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
@ -1991,6 +2025,23 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="visible_fields_ituz">
<property name="label" translatable="yes">ITU Zone</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -2006,8 +2057,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkCheckButton" id="visible_fields_cqz">
<property name="label" translatable="yes">CQ Zone</property>
<object class="GtkCheckButton" id="visible_fields_iota">
<property name="label" translatable="yes">IOTA Designator</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@ -2023,8 +2074,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
</packing>
</child>
<child>
<object class="GtkCheckButton" id="visible_fields_ituz">
<property name="label" translatable="yes">ITU Zone</property>
<object class="GtkCheckButton" id="visible_fields_gridsquare">
<property name="label" translatable="yes">Grid Square</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@ -2040,8 +2091,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
</packing>
</child>
<child>
<object class="GtkCheckButton" id="visible_fields_iota">
<property name="label" translatable="yes">IOTA Designator</property>
<object class="GtkCheckButton" id="visible_fields_sat_name">
<property name="label" translatable="yes">Satellite Name</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@ -2057,13 +2108,21 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
<object class="GtkCheckButton" id="visible_fields_sat_mode">
<property name="label" translatable="yes">Satellite Mode</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
@ -2903,7 +2962,7 @@ Base64-encoded plain text in the configuration file.</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">2</property>
<property name="position">3</property>
</packing>
</child>
<child>
@ -3273,6 +3332,45 @@ Base64-encoded plain text in the configuration file.</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkBox" id="qso_propagation_mode_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="qso_propagation_mode_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Propagation Mode</property>
<property name="width_chars">15</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="qso_propagation_mode_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">7</property>
</packing>
</child>
<child>
<object class="GtkBox" id="qso_power_hbox">
<property name="visible">True</property>
@ -3310,7 +3408,7 @@ Base64-encoded plain text in the configuration file.</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">7</property>
<property name="position">8</property>
</packing>
</child>
</object>
@ -3914,6 +4012,46 @@ Base64-encoded plain text in the configuration file.</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="station_gridsquare_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="station_gridsquare_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Grid Square</property>
<property name="width_chars">15</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="station_gridsquare_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width_chars">15</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
@ -3940,6 +4078,147 @@ Base64-encoded plain text in the configuration file.</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="satellite_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<child>
<object class="GtkAlignment" id="satellite_frame_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="satellite_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkBox" id="satellite_vbox_left">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkBox" id="satellite_name_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="satellite_name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Satellite Name</property>
<property name="width_chars">15</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="satellite_name_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width_chars">15</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="satellite_vbox_right">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkBox" id="satellite_dxcc_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="satellite_mode_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Satellite Mode</property>
<property name="width_chars">15</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="satellite_mode_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="width_chars">15</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="satellite_frame_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Satellite Information</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<action-widgets>

Plik binarny nie jest wyświetlany.