5
Error: can’t Multiply Sequence by non-int of type 'float'
I am facing this error, I know it involves variable types, but I do not know how to make the entry receive a float type value
#TRANSOFORMAÇÃO DE COORDENADAS GEODÉSICAS EM COORDENADAS PLANAS – SISTEMA UTM
from tkinter import *
import math
class SAD69:
def __init__(self,master):
frame = Frame(master)
frame.grid(row=0)
self.A = 1.0050526248
self.B = 0.0050632321
self.C = 10.628107*pow(10,-6)
self.D = 20.821897*pow(10,-9)
self.E = 3.9327535*pow(10,-11)
self.F = 6.5553406*pow(10,-14)
self.alpha = 111133.3486
self.delta = 0.021986053
self.beta = 16.03895511
self.eps = 3.114475*pow(10,-5)
self.gama = 16.83348972
self.x = 4.1531106*pow(10,-8)
self.pi = 3.141592654
self.a = 6378160
self.k = 0.9996
self.p0 = 57.2957795131
self.e=0.0066945419
self.n = 6382845.536
self. l = 0.0067396609
self.entry1=Entry(frame)
self.entry1.grid(row = 4, column =1)
self.label2 = Label(frame,text='Digite a latitude do ponto >>').grid(row=4,column=0)
self.entry2=Entry(frame,text='LONGITUDE do ponto')
self.entry2.grid(row=4, column =3)
self.label3 =Label(frame,text='Digite a longitude do ponto >>').grid(row=4,column=2)
self.bt1 =Button(frame,text='Converter',fg='blue',command=self.GEOPLAN)
self.bt1.grid(row=3, column=1)
def GEOPLAN(self):
fia =(self.entry1.get())
la = (self.entry2.get())
S = self.a*((1-self.e)*((self.A*(fia*self.pi)/180)-(0.5*self.B*math.sin(2*fia*0.017453292))+(0.25*self.C*math.sin(4*fia*0.017453292))-((1/6)*self.D*math.sin(6*fia*0.017453292))+((1/8)*self.E*math.sin(8*fia*0.017453292))-(0.1*self.F*math.sin(10*fia*0.017453292))))
I = self.k*self.S
dl = 3600*(51-la)
p = dl*0.0001
root = Tk()
root.title='TRANSOFORMAÇÃO DE COORDENADAS GEODÉSICAS EM COORDENADAS PLANAS – SISTEMA UTM'
x=SAD69(root)
root.mainloop()
o Error occurs in GEOPLAN function
– Icaro Amorim