IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Git Source Tree
Root/
| Source at commit 624caeb00652f6118dc64698b7dad6fa3e5bdcc2 created 6 years 9 months ago. By Werner Almesberger, atusb/: use VR, POWERED, and LED from kicad-libs | |
|---|---|
| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | $PI = atan2(1, 1)*4; |
| 4 | |
| 5 | $d = 25.4/1000*35; |
| 6 | |
| 7 | |
| 8 | sub orig |
| 9 | { |
| 10 | $x0 = $_[0]; |
| 11 | $y0 = $_[1]; |
| 12 | } |
| 13 | |
| 14 | |
| 15 | sub mil |
| 16 | { |
| 17 | return $_[0]/1000*25.4; |
| 18 | } |
| 19 | |
| 20 | |
| 21 | sub cut |
| 22 | { |
| 23 | if (defined $x) { |
| 24 | if ($x == $_[0]+$x0 && $y == $_[1]+$y0) { |
| 25 | shift @_; |
| 26 | shift @_; |
| 27 | } else { |
| 28 | print "\n"; |
| 29 | } |
| 30 | } |
| 31 | while (@_) { |
| 32 | $x = shift @_; |
| 33 | $y = shift @_; |
| 34 | # ($x, $y) = (-$y, $x); |
| 35 | $x += $x0; |
| 36 | $y += $y0; |
| 37 | print "$x $y $z\n"; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | |
| 42 | sub pcb |
| 43 | { |
| 44 | &cut( |
| 45 | &mil( 0), &mil( 0), |
| 46 | &mil( $W), &mil( 0), |
| 47 | &mil( $W), &mil( 490), |
| 48 | &mil( 0), &mil( 490), |
| 49 | &mil( 0), &mil( 0)); |
| 50 | } |
| 51 | |
| 52 | |
| 53 | # |
| 54 | # board width |
| 55 | # |
| 56 | # antenna factor width (mil) |
| 57 | # |
| 58 | # 80% 530 |
| 59 | # 90% 565 |
| 60 | # 100% 605 |
| 61 | # 105% 620 |
| 62 | # 110% 640 |
| 63 | # 115% 658 |
| 64 | # 120% 680 |
| 65 | # |
| 66 | |
| 67 | $W = 658; |
| 68 | |
| 69 | $z = -0.8; # full thickness of board |
| 70 | # x: corner offset, compensation for rotation, array position |
| 71 | # y: corner offet |
| 72 | |
| 73 | &orig(20*0+2, 15*3+2); |
| 74 | |
| 75 | $r = $d/2-0.1; # compensate deflection of board |
| 76 | &pcb; |
| 77 | |
