DMS convert to var and int/float issues

This commit is contained in:
Chris Pham
2018-04-12 11:22:17 -07:00
parent 9c69967be1
commit 443cc5dd83

View File

@@ -222,8 +222,10 @@ class WaypointsCoordinator(QtCore.QThread):
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_degree_label.setValue(int(lat))
self.latitude_minute_label.setValue(int(lat-(int(lat) * 60))) lat_minute = (lat - float(int(lat))) * 60
self.latitude_second_label.setValue(lat-int(lat)-int(lat-(int(lat) * 60))/60 * 3600) self.latitude_minute_label.setValue(lat_minute)
lat_seconds = (lat - float(int(lat)) - lat_minute/60.) * 3600
self.latitude_second_label.setValue(lat_seconds)
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