-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright 2020 by Bdale Garbee <bdale@gag.com>. GPLv3
#
# Program to emit PCB footprint for U-Blox ZOE-8 GPS receiver
PadSpacing = 0.5
PadDiam = 0.27
-Clearance = 0.010 * 25.4
-Mask = (0.010 * 25.4) + PadDiam
+Clearance = 0.254
+Mask = (2* 0.05) + PadDiam
ValidPin = ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'B1', 'B9',
'C1', 'C3', 'C4', 'C5', 'C6', 'C7', 'C9', 'D1', 'D3', 'D4', 'D6',
def mm2mils100( mm ):
return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
-print '# author: Bdale Garbee'
-print '# email: bdale@gag.com'
-print '# dist-license: GPL 3'
-print '# use-license: unlimited'
+print('# author: Bdale Garbee')
+print('# email: bdale@gag.com')
+print('# dist-license: GPL 3')
+print('# use-license: unlimited')
-print 'Element[0x0 "UBLOX-ZOE" "" "" 0 0 11000 0 0 100 0x0]'
-print "("
+print('Element[0x0 "UBLOX-ZOE" "" "" 0 0 11000 0 0 100 0x0]')
+print("(")
rows = ['A','B','C','D','E','F','G','H','J']
for row in rows:
for col in range (1,10): # col wil run 1..9
ThisPin = row+str(col)
if ThisPin in ValidPin:
- print ' Pad[',\
+ print(' Pad[',\
mm2mils100((col-5) * PadSpacing), \
mm2mils100((rownum-4) * PadSpacing), \
mm2mils100((col-5) * PadSpacing), \
mm2mils100(PadDiam), \
mm2mils100(Clearance), \
mm2mils100(Mask), \
- '"%s"' % ThisPin, '"%s"' % ThisPin, '""]'
+ '"%s"' % ThisPin, '"%s"' % ThisPin, '""]')
-print ' ElementLine[',\
+print(' ElementLine[',\
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
- '1000 ]'
+ '1000 ]')
-print ' ElementLine[',\
+print(' ElementLine[',\
mm2mils100(-BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
- '1000 ]'
+ '1000 ]')
-print ' ElementLine[',\
+print(' ElementLine[',\
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
- '1000 ]'
+ '1000 ]')
-print ' ElementLine[',\
+print(' ElementLine[',\
mm2mils100( BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
mm2mils100(-BodySize/2), \
- '1000 ]'
+ '1000 ]')
-print ' ElementArc[',\
+print(' ElementArc[',\
mm2mils100(-5 * PadSpacing), \
mm2mils100(-5 * PadSpacing), \
- '500 500 0 360 1000 ]'
+ '500 500 0 360 1000 ]')
-print ")"
+print(")")