diff --git a/software/ros_packages/ground_station/src/Framework/NavigationSystems/WaypointsCoordinator.py b/software/ros_packages/ground_station/src/Framework/NavigationSystems/WaypointsCoordinator.py index 499bb50..c5596ad 100644 --- a/software/ros_packages/ground_station/src/Framework/NavigationSystems/WaypointsCoordinator.py +++ b/software/ros_packages/ground_station/src/Framework/NavigationSystems/WaypointsCoordinator.py @@ -37,7 +37,7 @@ class WaypointsCoordinator(QtCore.QThread): 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 self.nav_set_button_label = (self.left_screen. @@ -221,9 +221,20 @@ class WaypointsCoordinator(QtCore.QThread): self.name_edit_label.setText(name) self.latitude_label.setValue(lat) self.longitude_label.setValue(lng) - self.latitude_degree_label.setValue(int(lat)) - self.latitude_minute_label.setValue(int(lat-(int(lat) * 60))) - self.latitude_second_label.setValue(lat-int(lat)-int(lat-(int(lat) * 60))/60 * 3600) + + lat_d = float(int(lat)) + 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): self.navigation_table_cur_click = row