add material, fixups in deg.py
This commit is contained in:
parent
8da4071f7d
commit
60e237afb4
BIN
Karto/material/Poligonometrijos_skaiciavimu_pvz.pdf
Normal file
BIN
Karto/material/Poligonometrijos_skaiciavimu_pvz.pdf
Normal file
Binary file not shown.
@ -7,13 +7,10 @@ class Deg(namedtuple('Deg', ['deg', 'mm', 'ss'])):
|
|||||||
return "%03d-%02d-%.1f" % (self.deg, self.mm, self.ss)
|
return "%03d-%02d-%.1f" % (self.deg, self.mm, self.ss)
|
||||||
|
|
||||||
def guess(inp):
|
def guess(inp):
|
||||||
if isinstance(inp, Dec):
|
|
||||||
return inp
|
|
||||||
|
|
||||||
if isinstance(inp, str) and '-' in inp:
|
if isinstance(inp, str) and '-' in inp:
|
||||||
deg, mm, ss = inp.split('-')
|
deg, mm, ss = inp.split('-')
|
||||||
ddeg, dmm, dss = Dec(deg), Dec(mm), Dec(ss)
|
ddeg, dmm, dss = Dec(deg), Dec(mm), Dec(ss)
|
||||||
return deg + dmm/60 + dss/3600
|
return ddeg + dmm/60 + dss/3600
|
||||||
else:
|
else:
|
||||||
return Dec(instr)
|
return Dec(instr)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user