def _area(kmx, kmy):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("width:"))
            self.e_kmx = myEntry("%.6g" % kmx, 10, False)
            hbox.pack_start(self.e_kmx, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("height:"))
            self.e_kmy = myEntry("%.6g" % kmy, 10, False)
            hbox.pack_start(self.e_kmy, False)
            vbox.pack_start(hbox)
            return myFrame(" Area (km) ", vbox)
Ejemplo n.º 2
0
        def _center(lat0, lon0):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("latitude:"))
            self.e_lat0 = myEntry("%.6f" % lat0, 15, False)
            hbox.pack_start(self.e_lat0, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("longitude:"))
            self.e_lon0 = myEntry("%.6f" % lon0, 15, False)
            hbox.pack_start(self.e_lon0, False)
            vbox.pack_start(hbox)
            return myFrame(" Center ", vbox)
        def _center(lat0, lon0):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("latitude:"))
            self.e_lat0 = myEntry("%.6f" % lat0, 15, False)
            hbox.pack_start(self.e_lat0, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("longitude:"))
            self.e_lon0 = myEntry("%.6f" % lon0, 15, False)
            hbox.pack_start(self.e_lon0, False)
            vbox.pack_start(hbox)
            return myFrame(" Center ", vbox)
Ejemplo n.º 4
0
        def _area(kmx, kmy):
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("width:"))
            self.e_kmx = myEntry("%.6g" % kmx, 10, False)
            hbox.pack_start(self.e_kmx, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("height:"))
            self.e_kmy = myEntry("%.6g" % kmy, 10, False)
            hbox.pack_start(self.e_kmy, False)
            vbox.pack_start(hbox)
            return myFrame(" Area (km) ", vbox)
Ejemplo n.º 5
0
        def _target_sk42():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Latitude:"))
            self._target_sk42_Lat = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_sk42_Lat, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Longitude:"))
            self._target_sk42_Lon = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_sk42_Lon, False)
            vbox.pack_start(hbox)
            return myFrame(" Target sk42", vbox)
Ejemplo n.º 6
0
        def _second_point():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("широта:"))
            self.entry = myEntry("%.6f" % second_point[0], 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("долгота:"))
            self.entry = myEntry("%.6f" % second_point[1], 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            return myFrame("цель", vbox)
Ejemplo n.º 7
0
        def _first_point():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("широта:"))
            self.entry = myEntry("%.6f" % first_point[0], 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("долгота:"))
            self.distance = myEntry("%.6f" % first_point[1], 10, False)
            hbox.pack_start(self.distance, False)
            vbox.pack_start(hbox)

            return myFrame("базовая точка", vbox)
Ejemplo n.º 8
0
        def _angle2():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("angle:"))
            self.angle2 = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self.angle2, False)
            vbox.pack_start(hbox)

            return myFrame(" angle 2", vbox)
Ejemplo n.º 9
0
        def _target_wgs84():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Latitude:"))
            self._target_wgs84_Lat = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_wgs84_Lat, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Longitude:"))
            self._target_wgs84_Lon = myEntry("%.9g" % 0, 10, False)
            hbox.pack_start(self._target_wgs84_Lon, False)
            vbox.pack_start(hbox)

            self._target_wgs84_Lon.connect("changed", _target_wg84_changed)
            self._target_wgs84_Lat.connect("changed", _target_wg84_changed)

            return myFrame(" Target Wgs84", vbox)
Ejemplo n.º 10
0
        def _distance():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("distance:"))
            self._distance = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._distance, False)
            vbox.pack_start(hbox)
            self._distance.connect("changed", _update_target_cb)

            return myFrame(" Distance", vbox)
Ejemplo n.º 11
0
        def _compass():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("compass:"******"%.6g" % 0, 10, False)
            hbox.pack_start(self._compass, False)
            vbox.pack_start(hbox)
            self._compass.connect("changed", _update_target_cb)

            return myFrame(" Compass", vbox)
Ejemplo n.º 12
0
        def _wgs84():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Latitude:"))
            self._wgs84_Lat = myEntry("%.9g" % 39.930474, 10, False)
            hbox.pack_start(self._wgs84_Lat, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Longitude:"))
            self._wgs84_Lon = myEntry("%.9g" % 46.84519, 10, False)
            hbox.pack_start(self._wgs84_Lon, False)
            vbox.pack_start(hbox)

            self._wgs84_Lon.connect("changed", _wg84_changed)
            self._wgs84_Lat.connect("changed", _wg84_changed)

            self._wgs84_Lon.connect("focus_in_event", _wgs84_activated)
            self._wgs84_Lat.connect("focus_in_event", _wgs84_activated)
            return myFrame(" Wgs84", vbox)
Ejemplo n.º 13
0
        def _end_point_height():
            mapElevation = MapElevation()
            height = mapElevation.getHeight(end_point)
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("высота:"))
            self.azimuth = myEntry(str(height), 10, False)
            hbox.pack_start(self.azimuth, False)
            vbox.pack_start(hbox)

            return myFrame("цель", vbox)
Ejemplo n.º 14
0
        def _sk42_full():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("X:"))
            self._sk42_Lat_full = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._sk42_Lat_full, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Y:"))
            self._sk42_Lon_full = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._sk42_Lon_full, False)
            vbox.pack_start(hbox)

            self._sk42_Lon_full.connect("changed", _sk42_full_changed)
            self._sk42_Lat_full.connect("changed", _sk42_full_changed)

            self._sk42_Lon_full.connect("focus_in_event", _sk42_full_activated)
            self._sk42_Lat_full.connect("focus_in_event", _sk42_full_activated)

            return myFrame("SK42 full EPSG:28468", vbox)
Ejemplo n.º 15
0
        def _wgs_to_sk42_start_full():
            height = 900
            # convertedLat = converter.WGS84_SK42_Lat(np.float64(first_point[0]),np.float64(first_point[1]),height)
            # convertedLon = converter.WGS84_SK42_Long(np.float64(first_point[0]),np.float64(first_point[1]),height)
            convertedLon, convertedLat = pyproj.transform(
                self.proj_wgs84, self.proj_sk42, np.float64(first_point[1]),
                np.float64(first_point[0]))

            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("X:"))
            self.entry = myEntry(str("%.0f" % convertedLat), 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Y:"))
            self.entry = myEntry(str("%.0f" % convertedLon), 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            return myFrame("базовая точка ск-42 EPSG:28468", vbox)
Ejemplo n.º 16
0
        def _sk42():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Latitude:"))
            self._sk42_Lat = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._sk42_Lat, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("Longitude:"))
            self._sk42_Lon = myEntry("%.6g" % 0, 10, False)
            hbox.pack_start(self._sk42_Lon, False)
            vbox.pack_start(hbox)

            self._sk42_Lon.connect("changed", _sk42_changed)
            self._sk42_Lat.connect("changed", _sk42_changed)

            self._sk42_Lon.connect("focus_in_event", _sk42_activated)
            self._sk42_Lat.connect("focus_in_event", _sk42_activated)

            # update sk42 just to get right values, otherwise it will be 0
            _wg84_changed(None)
            return myFrame(" Sk42", vbox)
Ejemplo n.º 17
0
        def _area():
            vbox = gtk.VBox(False, 5)
            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("азимут:"))
            self.entry = myEntry("%.6g" % azimuth, 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox.pack_start(lbl("Дирекционный угол:"))
            self.entry = myEntry("%.2f" % float((azimuth - true_north) / 6),
                                 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox.pack_start(lbl("маг. угол с искажением:"))
            self.entry = myEntry("%.2f" % float((azimuth + mag_merid) / 6), 10,
                                 False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("azimuth input:"))
            self.entry = myEntry("%.2f" % distance, 10, False)
            hbox.pack_start(self.entry, False)

            hbox = gtk.HBox(False, 10)
            hbox.pack_start(lbl("encoder:"))
            azimuth_compass_encoder_diff = azimuth + compass_encoder_diff
            # correcting the diff hwen its above 360
            if azimuth_compass_encoder_diff >= 360:
                azimuth_compass_encoder_diff -= 360
            self.entry = myEntry("%.2f" % azimuth_compass_encoder_diff, 10,
                                 False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            hbox.pack_start(lbl("distance:"))
            self.entry = myEntry("%.1f" % distance, 10, False)
            hbox.pack_start(self.entry, False)
            vbox.pack_start(hbox)

            return myFrame(" Calculated Azimuth and Distance", vbox)
Ejemplo n.º 18
0
 def gps_updt_rate(self, gps_update_rate):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Here you can change the GPS update rate: "))
     self.e_gps_updt_rate = myEntry(str(gps_update_rate), 4, False)
     hbox.pack_start(self.e_gps_updt_rate)
     return myFrame(" GPS Update Rate ", hbox)
Ejemplo n.º 19
0
 def gps_updt_rate(self, gps_update_rate):
     hbox = gtk.HBox(False, 10)
     hbox.pack_start(lbl("Here you can change the GPS update rate: "))
     self.e_gps_updt_rate = myEntry(str(gps_update_rate), 4, False)
     hbox.pack_start(self.e_gps_updt_rate)
     return myFrame(" GPS Update Rate ", hbox)