This commit is contained in:
2018-04-12 12:08:30 -07:00

View File

@@ -37,7 +37,7 @@ class WaypointsCoordinator(QtCore.QThread):
self.latitude_second_label = self.left_screen.manual_waypoint_seconds_lattitude_spin_box self.latitude_second_label = self.left_screen.manual_waypoint_seconds_lattitude_spin_box
self.longitude_seccond_label = self.left_screen.manual_waypoint_seconds_longitude_spin_box self.longitude_second_label = self.left_screen.manual_waypoint_seconds_longitude_spin_box
# Nav Table Buttons # Nav Table Buttons
self.nav_set_button_label = (self.left_screen. self.nav_set_button_label = (self.left_screen.
@@ -221,9 +221,20 @@ class WaypointsCoordinator(QtCore.QThread):
self.name_edit_label.setText(name) self.name_edit_label.setText(name)
self.latitude_label.setValue(lat) self.latitude_label.setValue(lat)
self.longitude_label.setValue(lng) self.longitude_label.setValue(lng)
self.latitude_degree_label.setValue(int(lat))
self.latitude_minute_label.setValue(int(lat-(int(lat) * 60))) lat_d = float(int(lat))
self.latitude_second_label.setValue(lat-int(lat)-int(lat-(int(lat) * 60))/60 * 3600) lat_m = float(int((lat - lat_d) * 60))
lat_s = ((lat - lat_d - (lat_m/60.0)) * 3600.)
self.latitude_degree_label.setValue(lat_d)
self.latitude_minute_label.setValue(lat_m)
self.latitude_second_label.setValue(lat_s)
lng_d = float(int(lng))
lng_m = float(int((lng - lng_d) * 60))
lng_s = ((lng - lng_d - (lng_m/60.0)) * 3600.)
self.longitude_degree_label.setValue(lng_d)
self.longitude_minute_label.setValue(lng_m)
self.longitude_second_label.setValue(lng_s)
def _on_nav_clicked(self, row, col): def _on_nav_clicked(self, row, col):
self.navigation_table_cur_click = row self.navigation_table_cur_click = row