def autoCalcFinishMagVar(self): try: if self.parametersPanel.chbAutoFinishMagVar.Checked: finishPt = None finishLat = None finishLon = None degree3 = None num = None result, degree, degree1 = self.parametersPanel.pnlStartPosP.method_3( ) if (result): value = float(self.parametersPanel.txtForwardTP.Value) value1 = float(self.parametersPanel.txtForwardTP.Value) distance = self.parametersPanel.txtDistanceP.Value result1, degree2, degree3, num = Geo.smethod_6( self.parametersPanel.cmbCalculationTypeP.SelectedItem, degree, degree1, value, distance) if (result1): finishPt = Point3D(degree3, degree2) finishLat = degree2 finishLon = degree3 if finishPt != None and self.model != None and self.date != None: # result, degree, degree1 = self.parametersPanel.pnlStartPosP.method_3(); result2, degree2 = Geo.smethod_7(finishLat, finishLon, Altitude(0), self.model, self.date) if (result2): degree2 = round(degree2, 2) self.parametersPanel.pnlVarFinishP.Value = degree2 except: pass
def calculateMVD(self): degree = None degree1 = None degree2 = None result, degree, degree1 = self.parametersPanel.pnlPositionMVD.method_3( ) # position.method_1(out degree, out degree1); altitude = self.parametersPanel.pnlPositionMVD.Altitude() result, degree2 = Geo.smethod_7( degree, degree1, altitude, self.parametersPanel.cmbModel.SelectedIndex, self.parametersPanel.dtpDate.date()) if (result): self.parametersPanel.txtResult.Value = str(round( degree2, 4)) #.method_1(Formats.VariationFormat); date = self.parametersPanel.dtpDate.date() dataList = [] dataList.append([ "Latitude", "Longitude", "Altitude (m)", "Altitude (ft)", "Date", "Magnetic Model", "Magnetic Variation" ]) dataList.append([ str(degree), str(degree1), str(altitude.Metres), str(altitude.Feet), date.toString(), self.parametersPanel.cmbModel.SelectedItem, self.parametersPanel.txtResult.Value ]) GeoDetermineDlg.HistoryDataMV.append(dataList) self.setDataInHistoryModel(dataList)
def method_30_BD(self): degree = None degree1 = None degree2 = None if (self.parametersPanel.pnlFinishPosBD.IsValid()): result, degree, degree1 = self.parametersPanel.pnlFinishPosBD.method_3( ) result, degree2 = Geo.smethod_7(degree, degree1, Altitude(0), self.modelBD, self.dateBD) if (result): degree2 = round(degree2, 2) self.parametersPanel.pnlVarFinishBD.Value = degree2
def method_32_P(self): startPos = self.parametersPanel.pnlStartPosP.Point3d result, self.date, self.model = DlgMagneticVariationParameters.smethod_0( self.date, self.model) if self.parametersPanel.pnlStartPosP.IsValid() and result: result, degree, degree1 = self.parametersPanel.pnlStartPosP.method_3( ) result, degree2 = Geo.smethod_7(degree, degree1, Altitude(0), self.model, self.date) if (result): degree2 = round(degree2, 2) self.parametersPanel.pnlVarStartP.Value = degree2 try: self.parametersPanel.txtForwardMP.Value = MathHelper.smethod_3( float(self.parametersPanel.txtForwardTP.Value) - degree2) except: self.parametersPanel.txtForwardMP.Value = 0.0 self.method_29_P()