<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dan&#039;s Drivelings &#187; Amateur Radio</title>
	<atom:link href="http://www.tntechnohermit.com/category/amateur-radio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tntechnohermit.com</link>
	<description>Random Thoughts of a Techno-Hermit</description>
	<lastBuildDate>Thu, 01 Sep 2011 16:37:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Experimenting with HTML and Javascript development in Adobe AIR</title>
		<link>http://www.tntechnohermit.com/2010/11/01/experimenting-with-html-and-javascript-development-in-adobe-air/</link>
		<comments>http://www.tntechnohermit.com/2010/11/01/experimenting-with-html-and-javascript-development-in-adobe-air/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 14:13:01 +0000</pubDate>
		<dc:creator>Dan Skaggs</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Amateur Radio]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=443</guid>
		<description><![CDATA[This is a rather long post detailing some of the things I learned this weekend while creating my first &#8220;real&#8221; Adobe AIR application that joins my love of programming with another hobby that I have enjoyed for several years. Those of you that know me very well might remember that one of my hobbies is [...]]]></description>
			<content:encoded><![CDATA[<p>This is a rather long post detailing some of the things I learned this weekend while creating my first &#8220;real&#8221; Adobe AIR application that joins my love of programming with another hobby that I have enjoyed for several years.</p>
<p>Those of you that know me very well might remember that one of my hobbies is amateur radio. There are many facets to the ham radio hobby and one of them that I&#8217;ve been involved with over the last few years combines radios and GPS data into a real-time position reporting system called Automatic Position Reporting System (APRS). To make a long story short, people equipped to use this system have specialized radios in their vehicles that read positional data from GPS units and transmit it out over certain frequencies periodically. Usually, these information packets eventually find their way to a series of servers that forward the data to connected clients for display on whatever mapping system the client has available locally.</p>
<p>This weekend, I spent some time creating an Adobe AIR application written in HTML and Javascript that connects to one of these servers and plots the position reports on a Google map. I haven&#8217;t had a chance to do much development with AIR up to now so I thought this would be a good exercise to see if I could create a usable solution.<br />
<span id="more-443"></span></p>
<p>The first hurdle was to create some method of translating the raw packet of information (which is a variable length string of text) into its component parts that I could then use. Below is an example of an APRS position report packet.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">KI4TDG-9&gt;APT407,WIDE1-1,WIDE2-2,qAR,N5AAA-1:!3546.23N/08654.00W&gt;069/000/A=000800</pre></div></div>

<p>This looks like a bunch of gibberish I know, but the data formats (there are multiple different types of packets that can be transmitted over the APRS system) are well documented.  I wound up creating a Javascript object called APRSPacketParser.js (original name I know, but it works) that had a method called parse() that accepted a raw APRS packet like the one above. This method then used other methods such as extractCall(), extractTimeStamp(), extractPosition() and so on to reduce the raw string into a series of values that I stored in another Javascript object called APRSPositionReport.js.  That took about 3 hours or so to write up. Because of the many different types of packet formats, the parser object still needs a lot of work, but for now it works on the 3 most common forms of position reports.</p>
<p>Once that was complete and tested, I created a regular HTML page to get my head around integrating with the Google maps javascript API.  Within no time, I was able to have a Google map in my HTML page, centered on my location with a custom zoom level set. Once the map was there, I began experimenting with parsing sample packets I had hard-coded into the page and using the location data stored in the resulting APRSPositionReport object to insert markers on the Google map.  So far so good and my total time so far was less than 4 hours worth of work. At this point I decided to quit for the night and try to tackle the AIR bits the next day.</p>
<p>Up to this point, all I&#8217;d really accomplished was proving that I could follow the instructions for using the Google maps API and that I could parse some sample packets into position reports.  I still had to make all that work inside AIR.  Upon creating a new AIR project, I put the HTML and javascript code that I&#8217;d been working on into the project and ran it, expecting to see a Google map pop up. Nope!  All I got was a blank screen and a message saying that the variable &#8220;google&#8221; was undefined. </p>
<p>After a couple hours of head scratching and research, I found out about AIR security sandboxes and found some example code on how to successfully use assets in your AIR application that are not part of the project itself. The examples showed how to use the ParentSandboxBridge and ChildSandboxBridge objects to essentially create an &#8220;API&#8221; between pages to allow data to be shared between two sandboxes with different security levels.  At this point, I had my empty Google map displaying inside my AIR application. With a little bit of bug fixing, the javascript code that I had used to create the markers on the map was working and I had 4 sample APRS packets parsed and plotted on the Google map. Total time to this point was somewhere around 7 hours.</p>
<p>Obviously, to be useful, the hard-coded position reports had to go and be replaced with a real-time stream of data from one of the APRS servers.  This part was probably the easiest thing I did all weekend. The socket class in AIR makes it absolutely simple to create a TCP socket connection to a server. To create a socket object, I used the following code. The first line creates the object and the remaining lines assign methods to listen to various events that happen with the socket connection.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//Set up socket object that we'll use later when the connect/disconnect </span>
<span style="color: #006600; font-style: italic;">//buttons are clicked</span>
socket <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> air.<span style="color: #660066;">Socket</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
socket.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>air.<span style="color: #660066;">Event</span>.<span style="color: #000066;">CLOSE</span><span style="color: #339933;">,</span> closeHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
socket.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>air.<span style="color: #660066;">Event</span>.<span style="color: #660066;">CONNECT</span><span style="color: #339933;">,</span> connectHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
socket.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>air.<span style="color: #660066;">IOErrorEvent</span>.<span style="color: #660066;">IO_ERROR</span><span style="color: #339933;">,</span> ioErrorHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
socket.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>air.<span style="color: #660066;">SecurityErrorEvent</span>.<span style="color: #660066;">SECURITY_ERROR</span><span style="color: #339933;">,</span> securityErrorHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
socket.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>air.<span style="color: #660066;">ProgressEvent</span>.<span style="color: #660066;">SOCKET_DATA</span><span style="color: #339933;">,</span> socketDataHandler<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I then created a button labeled &#8220;Connect&#8221; and set the onClick action to run the javascript method named connect().  The code for that method looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> connect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>socket.<span style="color: #660066;">connected</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    socket.<span style="color: #660066;">connect</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;second.aprs.net&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">20157</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    writeln<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;user NOCALL pass -1 vers AirPRS 0.01 filter r/35.625/-86.9847/150&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>			
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In my case I needed to connect to the server named &#8220;second.aprs.net&#8221; on port 20157.  The last line of that method uses the writeln() method to send a string of configuration data to the server over the socket connection telling it about the kind of data I want it to send me. The server sends a new line of data across the socket connection each time it receives a position report from an amateur station. At this point, all I had to do was fill in the body of the socketDataHandler() listener method to forward each packet to another method I created that uses the parser to parse the incoming string and dispatch a message to the map to create a marker with the information contained in the APRSPositionReport javascript object created from the raw packet.  Total time to this point was about 9 hours.</p>
<p>I spent another 3 or 4 hours adding error trapping and a &#8220;console&#8221; area to the application that got updated each time a new packet came in from the server so that I could see data flowing into the application.</p>
<p>All in all, I had around 12 hours or so of actual development time in creating a functional, though not very feature rich, application based on the Adobe AIR platform. If you care to take a look at what I&#8217;ve done or run the application, I&#8217;ve made the <a href="http://dan.skaggsfamily.ws/AirPRS/AirPRS.air">application</a> and the <a href="http://dan.skaggsfamily.ws/AirPRS/AirPRS.src.zip">source code</a> available for download.</p>
<p>Here&#8217;s a screenshot of what the application looks like after it&#8217;s been running for a bit to pull in some position reports (click on the image for the full-sized view).</p>
<p><a href="http://dan.skaggsfamily.ws/wp-content/uploads/2010/10/AirPRS-screenshot.png"><img src="http://dan.skaggsfamily.ws/wp-content/uploads/2010/10/AirPRS-screenshot-300x242.png" alt="" title="AirPRS-screenshot" width="300" height="242" class="aligncenter size-medium wp-image-449" /></a></p>
<p>I already have a list of things that I want to add to this such as a preferences pane so that you can set your own center map point, control the radius around the center that you want reports for and so on.  I want to use the built-in SQLite functions to store those values which will provide me with another learning opportunity with a different feature of AIR.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tntechnohermit.com/2010/11/01/experimenting-with-html-and-javascript-development-in-adobe-air/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ARRL creates and AIR app for generating amateur radio exams</title>
		<link>http://www.tntechnohermit.com/2008/09/26/arrl-creates-and-air-app-for-generating-amateur-radio-exams/</link>
		<comments>http://www.tntechnohermit.com/2008/09/26/arrl-creates-and-air-app-for-generating-amateur-radio-exams/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 19:52:13 +0000</pubDate>
		<dc:creator>Dan Skaggs</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Amateur Radio]]></category>

		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=109</guid>
		<description><![CDATA[As some of you know, one of my other interests besides programming is amateur radio. I am the &#8220;liaison&#8221; or team lead between our local group of volunteer examiners (VEs) and the American Radio Relay League&#8217;s (ARRL) group responsible for overseeing license testing for the FCC. Part of the responsibility of being team lead is [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you know, one of my other interests besides programming is amateur radio.  I am the &#8220;liaison&#8221; or team lead between our local group of volunteer examiners (VEs) and the American Radio Relay League&#8217;s (ARRL) group responsible for overseeing license testing for the FCC. Part of the responsibility of being team lead is ensuring that we have an adequate supply of written exams for the three different license classes.</p>
<p>In the past, the ARRL has provided us with a Windows-based program to generate exams from the question pool. The program worked well, but each time there were any changes to the question pools (which happens on the 1st of July in 3 out of 5 years), they had to create a new Windows installer package to disseminate to all the VE team leaders.  That in of itself was a pain enough, but for those of us who are Mac and/or Linux folks it became a real hassle.</p>
<p>In today&#8217;s newsletter to VEs, I noticed that the ARRL had announced a new version of the exam generations software.  When I went to download it, I was pleasantly surprised to find an AIR badge to install the program.  It&#8217;s an HTML-based AIR application but a lot of thought was put into how it functions.  It takes advantage of AIR&#8217;s built-in database to synchronize its question pools and answer templates with the latest approved versions as well as periodically checks to see if there are any updates to the program itself&#8211;all the things that we love about AIR.  Oh, and since it&#8217;s an AIR app, it obviously runs natively on my Mac!</p>
<p><a href="http://dan.skaggsfamily.ws/wp-content/uploads/2008/09/exammaker.png"><img class="aligncenter size-full wp-image-110" title="ARRL VE Exam Maker" src="http://dan.skaggsfamily.ws/wp-content/uploads/2008/09/exammaker.png" alt="" width="500" height="374" /></a></p>
<p>I&#8217;ve been kind of critical of the ARRL in the past in regard to the applications that they offer for use (some are pretty bad).  This one however, really fits the bill for what those of us responsible for printing exams need to do on a regular basis.  Hopefully, this will be the first of many applications that they develop on the AIR platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tntechnohermit.com/2008/09/26/arrl-creates-and-air-app-for-generating-amateur-radio-exams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s a Ham Radio Contest Weekend</title>
		<link>http://www.tntechnohermit.com/2008/08/16/its-a-ham-radio-contest-weekend/</link>
		<comments>http://www.tntechnohermit.com/2008/08/16/its-a-ham-radio-contest-weekend/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 13:00:56 +0000</pubDate>
		<dc:creator>Dan Skaggs</dc:creator>
				<category><![CDATA[Amateur Radio]]></category>

		<guid isPermaLink="false">http://dan.skaggsfamily.ws/?p=85</guid>
		<description><![CDATA[For the last couple of years, my travel and work schedule have really taken a toll on one of my favorite hobbies. I got my amateur (ham) radio license in 1994 while stationed at Davis-Monthan Air Force Base in Tucson, AZ. Ham radio is kind of like the original geek hobby. Before computers, before cell [...]]]></description>
			<content:encoded><![CDATA[<p>For the last couple of years, my travel and work schedule have really taken a toll on one of my favorite hobbies.  I got my amateur (ham) radio license in 1994 while stationed at Davis-Monthan Air Force Base in Tucson, AZ. Ham radio is kind of like the original geek hobby.  Before computers, before cell phones, before video games the techno-geeky crowd congregated around the ham radio hobby.</p>
<p>There&#8217;s something pretty special about building a radio from a pile of parts and stringing a couple hundred feet of wire out through some trees and being able to carry on a conversation with people half way across the country or half way around the world. Even though today the vast majority of radios are commercially built and there are as many antenna designs as stars in the sky it seems, the magic of being able to fire up that radio, tune through the frequencies and have the possibility of talking to another ham in a country you&#8217;ve never heard before is pretty special.</p>
<p><span id="more-85"></span></p>
<p>There are many &#8220;sub-hobbies&#8221; to ham radio these days&#8211;morse code, computer generated digital modes, satellite operation, GPS-enabled radios and more.  One of my favorites is referred to as &#8220;contesting&#8221;.  On several weekends throughout the year, hams from all over the world set aside anywhere from 1 to sometimes 48 full hours to devote their energies to trying to see just how many people in different states, countries, continents etc they can talk to and exchange some small bit of information within the allotted time frame.</p>
<p>Today there is a contest called the North American QSO Party (QSO is short for a contact or conversation).  Today&#8217;s version is a voice contest only.  Two weeks ago a friend and I made a combined effort in the morse code version of this particular contest and absolutely had a blast.  We didn&#8217;t work the entire 12 hours that this contest covers, but only put in about 6.5 hours.  In that time, we made 178 contacts in 34 different states and 3 Canadian provinces. By comparison, most of the top echelon morse code contesters can make 100 contacts per hour.</p>
<p>So, if you&#8217;re reading this, I&#8217;ll be offline from the &#8220;inter-tubes&#8221; and online riding the airwaves from about 1:00pm CT for maybe as much as 12 hours (depends on how my derriere holds up sitting in that chair that long).</p>
<p>73 (that&#8217;s short for talk to you again soon)<br />
Dan &#8211; Amateur radio station N4EA</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tntechnohermit.com/2008/08/16/its-a-ham-radio-contest-weekend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server migration complete</title>
		<link>http://www.tntechnohermit.com/2007/06/21/server-migration-complete/</link>
		<comments>http://www.tntechnohermit.com/2007/06/21/server-migration-complete/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 22:12:03 +0000</pubDate>
		<dc:creator>Dan Skaggs</dc:creator>
				<category><![CDATA[Amateur Radio]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://dan.skaggsfamily.ws/2007/06/21/server-migration-complete/</guid>
		<description><![CDATA[Just a quick note to mention that my blog is now running off my virtual private server at]]></description>
			<content:encoded><![CDATA[<p style="font: normal normal normal 12px/normal Helvetica; margin: 0px">Just a quick note to mention that my blog is now running off my virtual private server at</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tntechnohermit.com/2007/06/21/server-migration-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

