<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Notes on stuff that is useful to me.</description><title>@Kiwibrew's Tools &amp; Tips</title><generator>Tumblr (3.0; @kiwibrew)</generator><link>http://kiwibrew.tumblr.com/</link><item><title>Let's Build a Little UFB ISP</title><description>&lt;p&gt;For an NZTelco &lt;a target="_blank" href="http://nztelco.com/"&gt;post&lt;/a&gt; on the economics of Ultrafast Broadband CIRs, I put together a straw-man ISP. I pulled together what I thought was the minimum an ISP could spend to satisfy a thousand 50mbps full-duplex UFB customers with a 2.5mbps CIR.&lt;/p&gt;
&lt;p&gt;In this ISP, we don&amp;#8217;t have any real provisioning, OSS, or active traffic management systems. Those things are expensive, and we&amp;#8217;re a low-cost operation. It&amp;#8217;s all Ethernet, so we&amp;#8217;ll have a single /22 of address space, a single gateway (also functioning as our BGP router), and we&amp;#8217;ll add vlans and queues to the switches by hand, keeping track of everything in a wiki.&lt;/p&gt;
&lt;p&gt;The lowest data cap will be 150GB/month, so we&amp;#8217;ll run a Nagios process on our NMS server to alert the helpdesk on any particular queue counting more than 150GB of aggregate traffic. When that happens, we&amp;#8217;ll ring up the subscriber to have a whinge about changing plans (to 250GB) or buggering off to Xtra. This saves a lot of time and money, as long as we assume our customers are little old ladies who don&amp;#8217;t know anything about bittorrent or Usenet.&lt;/p&gt;

&lt;p&gt;&lt;img height="632" width="730" alt="UFB ISP Elements" src="http://www.telco2.co.nz/images/UFB_ISP_Elements.png"/&gt;&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve stuck a Packeteer capable of 620mbps in between the BGP router and the international transit. It&amp;#8217;s too expensive to buy one that will be nice to all traffic, and buying more national bandwidth should be cheaper than buying a higher capacity shaper. International traffic is still punitively priced, bittorrent does exist, and we don&amp;#8217;t want a few punters killing the experience for the rest, so the shaper is still a must have.&lt;/p&gt;
&lt;p&gt;The router only supports Gig ports, so we&amp;#8217;ll bond three 1gbps connections between the switch at Sky Tower and the router, which will have a total of 8&amp;#160;1gbps ports.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve put in OOB management with a Telecom stick in case we do something stupid like drop vlan1 and create a spanning tree loop, thus taking down half the Internet with 700,000 packets per second of rubbish. It could happen, you know.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m assuming a three-man band, using a UFB tail for access and admin, again falling back to a T-Stick if it all goes horribly wrong. These three guys each get a cheap and nasty laptop, and they use Wifi in the office already built in to their Access Router. No price for that, it&amp;#8217;s included free with the install.&lt;/p&gt;
&lt;p&gt;All the gear is cold spared, including the UPS (they do blow up occasionally) so we&amp;#8217;re not completely screwed if something breaks. Only if it breaks at 3AM on a weekend when we&amp;#8217;re all too drunk to drive to the POP with the spares.&lt;/p&gt;
&lt;p&gt;Bits and pieces are assumed to have fallen off the back of a truck, and we&amp;#8217;ll assume someone at NHR has accidentally shipped some 10gbps optics with the Ciscos. Everything else has come from Ebay. Here&amp;#8217;s the damage:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Cisco 3750E-24TD (used) three units: $16,740&lt;/li&gt;
&lt;li&gt;Juniper M7i Router (repossessed) two units: $16,834&lt;/li&gt;
&lt;li&gt;OpenGear CM4008 (new) three units: $3108&lt;/li&gt;
&lt;li&gt;HP DL380 Rack Servers (ex-lease) three units: $7350&lt;/li&gt;
&lt;li&gt;Packeteer PS1000-L620M (used): two units: $22,520&lt;/li&gt;
&lt;li&gt;Compaq CQ57-104TU Notebook (new) four units: $2796&lt;/li&gt;
&lt;li&gt;Libert 10kVA UPS (new) four units: $27,000&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Total price for this ISP adventure: $96,348&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you have a little equity in your house, UDC may help you out with a finance lease. Their number is 0800&amp;#160;500&amp;#160;832, tell them Jon sent you &amp;amp; I may get some rugby tickets out of it. Have fun!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;P.S. No whining about the UPS cost, unless you want to walk 48 floors up Sky Tower the next time the power goes out.&lt;/em&gt;&lt;/p&gt;</description><link>http://kiwibrew.tumblr.com/post/8326185035</link><guid>http://kiwibrew.tumblr.com/post/8326185035</guid><pubDate>Sun, 31 Jul 2011 23:50:58 -0400</pubDate></item><item><title>Calculating An Accidental Passive Reflector</title><description>&lt;p&gt;Every once in a while, radio folk come up with strange, seemingly inexplicable problems. This week I was asked by a colleague how one of his ultra low-power general user licensed radios could be interfering with a 5.6GHz licensed service around 25 kilometers away. A quick look at the problem yielded a real mystery.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;There&amp;#8217;s a mountain between his antennas and the victim service&lt;/li&gt;
&lt;li&gt;His link transmits at an angle to the receiving antenna&lt;/li&gt;
&lt;li&gt;The power is so low (only one watt after antenna gain) that even with line of sight, there shouldn&amp;#8217;t be a problem - due to the angle offset&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;img width="600" src="http://www.telco2.co.nz/images/PassiveInterferenceGraphic1.png"/&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s do the calculations to see what sort of havoc he could be causing by pointing his transmitter at the victim with direct line of sight over a 25km path.&lt;/p&gt;
&lt;p&gt;&lt;img width="600" alt="Link Budget Calculations" src="http://www.telco2.co.nz/images/link_budget_calcs.png"/&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;PTx&lt;/strong&gt; = Power of the Transmitter: &lt;strong&gt;18dBm&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LTx&lt;/strong&gt; = Loss at the Transmit End: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GTx&lt;/strong&gt; = Transmit Antenna Gain: &lt;strong&gt;16dBi&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LFS&lt;/strong&gt; = Free Space Loss 20*log[4∏*distance/wavelength]&amp;#160;: -&lt;strong&gt;135dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LM&lt;/strong&gt; = Miscellaneous Loss: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GRx&lt;/strong&gt; = Receive Antenna Gain: &lt;strong&gt;45dBi&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LRx&lt;/strong&gt; = Loss at the Receive End: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PRx&lt;/strong&gt; = Power received at the victim: -&lt;strong&gt;60dB&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;That&amp;#8217;s a pretty decent signal, one that would definitely cause an issue - so if the antennas were in line, and if there wasn&amp;#8217;t a mountain in the way, he could be making a mess of things.&lt;/p&gt;
&lt;p&gt;Still assuming line of sight (i.e. no mountain), let&amp;#8217;s correct the antenna gains for the angle offset and see what we get. Since antennas concentrate transmit power and receive gain in a directional beam, taking them out of alignment rapidly decreases their gain.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;PTx&lt;/strong&gt; = Power of the Transmitter: &lt;strong&gt;18dBm&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LTx&lt;/strong&gt; = Loss at the Transmit End: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GTx&lt;/strong&gt; = Transmit Antenna Gain: &lt;strong&gt;6dBi&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LFS&lt;/strong&gt; = Free Space Loss 20*log[4∏*distance/wavelength]&amp;#160;: -&lt;strong&gt;135dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LM&lt;/strong&gt; = Miscellaneous Loss: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GRx&lt;/strong&gt; = Receive Antenna Gain: &lt;strong&gt;9dBi&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LRx&lt;/strong&gt; = Loss at the Receive End: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PRx&lt;/strong&gt; = Power received at the victim: -&lt;strong&gt;108&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;At this level, even with no mountain in the way, there wouldn&amp;#8217;t be any interference to the licensed service. -108 is so low it&amp;#8217;s considered background noise.&lt;/p&gt;
&lt;p&gt;With all that taken in to account, he still worked with the MED on resolving the issue. A change in transmit frequency from him resolved the problem immediately. So what was happening?&lt;/p&gt;
&lt;p&gt;My best guess is that his link had an accidental passive reflector, by way of an office building about 5km from his transmitter facing away from the victim service. The diagram below illustrates how this can work.&lt;/p&gt;
&lt;p&gt;&lt;img width="600" src="http://www.telco2.co.nz/images/PassiveInterferenceGraphic2.png"/&gt;&lt;/p&gt;
&lt;p&gt;Passive reflector systems take some effort to design, so accidents like this are pretty uncommon. Angle tolerances are tight, and the reflector surface has to be really big to overcome the two independent free space radio paths that occur when they&amp;#8217;re used. We&amp;#8217;ve now got a first path of 5km and a second path of 30km. The passive reflector system calculation - if the angles for the main lobes of both transmitters are at just the right angle - looks like below.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;PTx&lt;/strong&gt; = Power of the Transmitter: &lt;strong&gt;18dBm&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LTx&lt;/strong&gt; = Loss at the Transmit End: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GTx&lt;/strong&gt; = Transmit Antenna Gain: &lt;strong&gt;16dBi&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LFS1&lt;/strong&gt; = Free Space Loss 20*log[4∏*distance/wavelength]&amp;#160;: -&lt;strong&gt;121dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GP&lt;/strong&gt; = Gain of Passive Gp 20*log [(4pA cosα)/l2]: &lt;strong&gt;107dBi&lt;/strong&gt; (8x10M surface)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LFS2&lt;/strong&gt; = Free Space Loss 20*log[4∏*distance/wavelength]&amp;#160;: -&lt;strong&gt;137dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LM&lt;/strong&gt; = Miscellaneous Loss: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GRx&lt;/strong&gt; = Receive Antenna Gain: &lt;strong&gt;45dBi&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LRx&lt;/strong&gt; = Loss at the Receive End: -&lt;strong&gt;2dB&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PRx&lt;/strong&gt; = Power received at the victim: -&lt;strong&gt;78&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;It works! Even with a double path loss, a reflector as small as 8x10M in the path could be causing the interference.&lt;br/&gt;&lt;br/&gt;With the frequency changed, the problem was solved, but still a mystery. A passive reflector is assumed to be the cause of the mystery, but it would take a couple of days with a spectrum analyzer to prove it out. In the meantime, I&amp;#8217;ve had a new look in to passive reflectors and have some neat ideas to play with.&lt;/p&gt;</description><link>http://kiwibrew.tumblr.com/post/6576565193</link><guid>http://kiwibrew.tumblr.com/post/6576565193</guid><pubDate>Wed, 15 Jun 2011 23:20:22 -0400</pubDate></item><item><title>Wellington Panorama, 3 May 2011 09:00 NZST</title><description>&lt;p&gt;I woke up this morning to a stunning view of Wellington and quickly grabbed the &lt;a target="_blank" href="http://www.dpreview.com/reviews/PanasonicGF1/"&gt;camera&lt;/a&gt;. I couldn&amp;#8217;t be bothered getting dressed and heading to the roof, and my brain was too fuzzy to remember the tripod in the closet, so I stuck the camera out the living room and bedroom windows to snap a few shots.&lt;/p&gt;
&lt;p&gt;My first go at a panorama was using Photoshop Elements 9 for the Mac. I let &lt;a target="_blank" href="http://www.adobe.com/designcenter/photoshop/articles/phs8ppphotomerge.html"&gt;Photomerge&lt;/a&gt; fly and came up with a huge jpg. Unfortunately I&amp;#8217;d shot in &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Raw_image_format"&gt;RAW&lt;/a&gt;, and Photomerge had ignored all the metadata in the accompanying &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Extensible_Metadata_Platform"&gt;XMP&lt;/a&gt; files, so the first pass didn&amp;#8217;t come out too hot. I compounded the problem by uploading to &lt;a href="http://twitpic.com/4sj55s"&gt;twitpic&lt;/a&gt; and the result was less than stunning. The preview was too small, and the &amp;#8220;full size&amp;#8221; image was too large to be useful. (15025 × 2647)&lt;/p&gt;
&lt;p&gt;This evening I had another crack at it. I converted all the RAW files to Photoshop psd files, thus embedding the metadata from the XMPs. I then threw Photomerge at the stitching task again and was a lot happer with the result. I still had a huge photo, and so set about trying to find out how to make a zoomable panorama. Google delivered me to the perfect blog post, aptly entitled &lt;a href="http://http://fallenempires.net/how-to-create-a-panorama-and-display-it-using-the-google-maps-api-using-free-software/"&gt;How to create a panorama and display it using the Google maps API using free software&lt;/a&gt;. Yep, that&amp;#8217;s what I was looking for.&lt;/p&gt;
&lt;p&gt;Since I&amp;#8217;d already taken the photos (oops on the blogger&amp;#8217;s great photography suggestions) and stitched them together, all I had left to do was create a Google Maps Panorama. The entailed using a Java program called &amp;#8220;&lt;a href="http://www.casa.ucl.ac.uk/software/googlemapimagecutter.asp"&gt;GMapImageCutter&lt;/a&gt;&amp;#8221;, published by a nice man at the &lt;a target="_blank" href="http://www.casa.ucl.ac.uk/"&gt;UCL Centre for Advanced Spatial Analysis&lt;/a&gt;. He helpfully suggested replacing his contact details in the completed HTML file before uploading to the web, so I no longer know his name. Once I set the shell script that starts the java app to chmod +x, the application popped up and was ready to go. Accepting default settings, I was within a minute or two presented with an HTML file and an image directory with 5,461 small jpg tiles.&lt;/p&gt;
&lt;p&gt;Once uploaded to a friendly web server (not tumblr), I had to generate a &lt;a target="_blank" href="http://Sign%20Up%20for%20the%20Google%20Maps%20API%20-%20Google%20Maps%20API%20Family%20-%20Google%20Code"&gt;Google Maps API&lt;/a&gt; key. This is because the generated panorama uses the Google Maps API (&lt;a target="_blank" href="http://code.google.com/apis/maps/documentation/javascript/v2/reference.html"&gt;v2&lt;/a&gt; in this case) for all the neat zooming and panning over the tiles. I then inserted an iframe into my Tumblr post (directly below) and it was all go.&lt;/p&gt;
&lt;p&gt;&lt;iframe src="http://www.telco2.co.nz/panorama.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="480" width="800"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;This is probably not the end of the line for me with panoramas. I like them, and I&amp;#8217;d like to do them better, so watch this space.&lt;/p&gt;</description><link>http://kiwibrew.tumblr.com/post/5157802485</link><guid>http://kiwibrew.tumblr.com/post/5157802485</guid><pubDate>Tue, 03 May 2011 06:11:00 -0400</pubDate></item><item><title>ESRI Shapefile (Points) to Google Fusion Tables</title><description>&lt;p&gt;Task of the day is to open an &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Shapefile"&gt;ESRI shapefile&lt;/a&gt; containing point data, clean the data, and upload it to a &lt;a target="_blank" href="http://tables.googlelabs.com/"&gt;Google Fusion Table&lt;/a&gt;. I&amp;#8217;ll be doing this in MacOS, but the tools in use are also available on Windows and Linux.&lt;/p&gt;
&lt;p&gt;First step is to convert the data to a format that can be read by &lt;a target="_blank" href="http://code.google.com/p/google-refine/"&gt;Google Refine&lt;/a&gt;. Open the ESRI .dbf file (from your shapefile folder) in &lt;a target="_blank" href="http://www.openoffice.org/"&gt;OpenOffice 3&lt;/a&gt;, and then save as CSV.&lt;/p&gt;
&lt;p&gt;Open with Google Refine to start processing. A quick glance at the data shows that fifteen rows have no location data. A numeric facet on the X coordinate allows me to find the offending rows, and &amp;#8220;remove all matching rows&amp;#8221; gets rid of them.&lt;/p&gt;
&lt;p&gt;Another look at the data shows that all the location data is in &lt;a target="_blank" href="http://www.linz.govt.nz/geodetic/datums-projections-heights/projections/new-zealand-map-grid/index.aspx"&gt;NZMG&lt;/a&gt; - the New Zealand Map Grid format. This format isn&amp;#8217;t useful to applications like Google Fusion Tables, so we&amp;#8217;ll have to convert it via &lt;a target="_blank" href="http://www.linz.govt.nz/geodetic/conversion-coordinates/online-conversion-service/converter/index.aspx"&gt;LINZ&lt;/a&gt; conversion tools.&lt;/p&gt;
&lt;p&gt;The LINZ conversion tool requires location data to be a coordinate set per line separated by a comma, and the existing data has the coordinates in columns, so we&amp;#8217;ll make a new single column with both x &amp;amp; y coordinates in it.&lt;/p&gt;
&lt;p&gt;In Refine, we choose &amp;#8220;add a column based on this column&amp;#8221; from the menu above our x coordinates. Then concatenate the columns with this command: &amp;#8220;&lt;span&gt;cells[&amp;#8220;y-coords&amp;#8221;].value + &amp;#8221; &amp;#8221; + cells[&amp;#8220;x-coords&amp;#8221;].value&amp;#8221;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For simplicity of converting the data using the LINZ web page, I exported a new CSV from refine, opened in OpenOffice, then copied the column to convert. After pasting the converted coordinates back into the CSV file, it&amp;#8217;s ready to upload into Fusion Tables - as a CSV. Once in, it looks like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="http://media.tumblr.com/tumblr_lkch17EqGd1qi93mv.png"/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A couple of quick tweaks to columns are required in Fusion Tables. Firs set place name column type to &amp;#8220;text&amp;#8221; to prevent Google trying to geo-code city names, then set location column type to &amp;#8220;location&amp;#8221; so that Google places marks via lat/long.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;With these two steps done, the data is ready to visualize!&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lkch1qVvZJ1qi93mv.png"/&gt;&lt;/p&gt;</description><link>http://kiwibrew.tumblr.com/post/5004331827</link><guid>http://kiwibrew.tumblr.com/post/5004331827</guid><pubDate>Thu, 28 Apr 2011 00:03:00 -0400</pubDate></item></channel></rss>
