<?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>Litui.Net &#187; gps infrastructure</title>
	<atom:link href="http://www.litui.net/archives/tag/gps-infrastructure/feed" rel="self" type="application/rss+xml" />
	<link>http://www.litui.net</link>
	<description></description>
	<lastBuildDate>Thu, 19 Aug 2010 22:41:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>GPS Infrastructure Abstractions and Bolt-ons</title>
		<link>http://www.litui.net/archives/656</link>
		<comments>http://www.litui.net/archives/656#comments</comments>
		<pubDate>Wed, 22 Apr 2009 00:50:04 +0000</pubDate>
		<dc:creator>litui</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[abstraction]]></category>
		<category><![CDATA[bolt-on]]></category>
		<category><![CDATA[can-net]]></category>
		<category><![CDATA[cansel]]></category>
		<category><![CDATA[erp]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[gps infrastructure]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[http authentication]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[ntrip]]></category>
		<category><![CDATA[ntrip caster]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[trimble]]></category>
		<category><![CDATA[tshark]]></category>
		<category><![CDATA[vrs]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://76.74.187.200/~litui/blog/?p=656</guid>
		<description><![CDATA[The company I work for, Cansel Survey Equipment runs a network of Trimble GPS base stations across Canada in multiple VRS configurations. This network (Can-Net) is powered on the backend by Trimble Infrastructure software. I&#8217;ve been integrating around this software for about 2 years now. Integration and Abstraction While performing admirably at its intended job [...]]]></description>
			<content:encoded><![CDATA[<p>The company I work for, <a href="http://www.cansel.ca">Cansel Survey Equipment</a> runs a network of Trimble <a href="http://en.wikipedia.org/wiki/Base_station#Land_surveying">GPS base stations</a> across Canada in multiple <a href="http://www.trimble.com/vrs.shtml">VRS</a> configurations.  This network (<a href="http://www.can-net.ca">Can-Net</a>) is powered on the backend by <a href="http://www.trimble.com/infrastructure/vrs_networks.aspx">Trimble Infrastructure</a> software.  I&#8217;ve been integrating around this software for about 2 years now.</p>
<h3>Integration and Abstraction</h3>
<p>While performing admirably at its intended job (many of the details of which still elude me as I&#8217;m no geomatics engineer) the software can be a little monolithic.  It works as advertised, make no mistake, but its UI is a bit clunky and it doesn&#8217;t seem to integrate well into other applications without a great deal of massaging.  [Please Note: I say this with respect for the fact that the software is easily the best available for GPS/GNSS infrastructure and it does seem as though Trimble is making strides towards modernizing their applications.]</p>
<p>One of my main goals with regard to the infrastructure software has been (while working within and around the known limitations of the software) to abstract account management, reporting, and our internal tech support processes from staff access to the actual servers themselves.  There are many reasons why this is necessary in an operation this size:</p>
<dl>
<dt>Automation</dt>
<dd>It can be very difficult for staff to manage sales and account terms in <a href="http://en.wikipedia.org/wiki/Enterprise_resource_planning">ERP</a> software alongside user accounts in the GPS Infrastructure.  Automation is necessary to ensure that customers are getting the accounts and access they paid for and freeloaders are kept out.</dd>
<dt>Accountability</dt>
<dd>Having user access to the database abstracted through a custom management tool means a greater level of logging of historic changes to user access tables and moderation of the types of changes that can be made.</dd>
<dt>Stability</dt>
<dd>More staff accessing the servers means a greater possibility of staff accidentally closing the server applications (much of the software runs windowed) and making problematic changes.  These sorts of things can interrupt end-user access.  Abstraction means greater regulation of what software runs on the servers and the resources used by that software.</dd>
<dt>Security</dt>
<dd>Giving direct access to staff invites unintended use.  Since simply opening a web browser to a questionable page in Windows can result in virus/malware infection it&#8217;s important to keep the list of users with access to the actual servers to a minimum.</dd>
</dl>
<p>This necessity resulted in the ongoing programming of an intranet web application (written primarily in <a href="http://rubyonrails.org/">Ruby on Rails</a>) which I may discuss in more detail in another post.</p>
<h3>Bolt-ons</h3>
<p>One of the roadblocks in the abstraction process has been the lack of useful real-time output from the infrastructure software for monitoring purposes.  Access logging occurs only <em>after</em> a user logs off.  This has made it necessary for our technical support to call the server admins to obtain information on whether or not a station is streaming data or a user is online.  This is not ideal and for reasons stated above, it&#8217;s even less ideal to give them server access simply to check the online users list.</p>
<h4>Bolt-on #1: Google Maps</h4>
<p>While not my idea, this was a good choice for (near) real-time stationary station connectivity status.   Using Google Maps allows not only our staff, but all users and the general public (required by Google&#8217;s terms of use) the ability to check our station connectivity status.</p>
<p>My implementation uses protocols available in the infrastructure software to obtain a list of stations and logs that to a static file on a periodic basis.  This allows me to place the file off the servers (better for security) as well as to provide a very quick-loading source of data for the Google map (the server&#8217;s own protocols for obtaining this data are insanely slow).</p>
<p>I have a plan to implement more up-to-date station statistics to our tech support staff using a means other than Google Maps, but more on that another time.</p>
<h4>Bolt-on #2: Who&#8217;s Online?</h4>
<p>As mentioned earlier, getting a list of the users currently connected to our system requires access to the server.  In particular, access to the User Interface software for Trimble&#8217;s NTRIP Caster service.  The UI provides usernames of connected users, amounts of data transferred, mountpoints (data streams), source IP addresses and source ports. Unfortunately, owing to the fact that many of our accounts have serialized alphanumeric usernames (an important part of our ERP integration) the username itself doesn&#8217;t tell us much about who is connected.  Ideally, we need an approach that allows us to cross-reference the usernames with our ERP to provide customer associations and to view the list of users via a management tool running on a separate machine.</p>
<p>I&#8217;ve heard of some administrators using screen scraping utilities to provide this data to their customers.  This method would require the GUI to be maximized and foremost on the screen at all times.  Additionally, the data would be an image (unsortable, unfilterable and unusable for anything but display).</p>
<p>My method requires a little more diligence but results in the type of data and access we need:</p>
<p>The most important part of this method is the tool <a href="http://www.wireshark.org/docs/wsug_html_chunked/AppToolstshark.html">TShark</a>, part of the <a href="http://www.wireshark.org/">Wireshark</a> package.  TShark and Wireshark are network packet analysis tools.  They (with the help of passive packet capturing tools) can apply filters to network traffic in realtime and output specific information about the data.  For this purpose, I set up TShark to run realtime analysis on the same system running the NTRIP Caster, monitor the same ports, filter out <a href="http://en.wikipedia.org/wiki/HTTP_Authentication">HTTP Authentication</a> data (NTRIP is based on HTTP and uses basic auth) on those ports and produce log files of selected fields (namely: source IP, source port, and username/password).</p>
<p>I then wrote a script on a separate server that obtains these authentication log files, uses <a href="http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol">SNMP</a> to obtain a list of source IPs and ports for current connections to the NTRIP caster, compares the IPs and ports to those in the log files, and loads the most recent matching usernames into an array.  It then does some database magic to match the usernames to customers and outputs the result as a <a href="http://www.json.org/">JSON</a> file which can be parsed using libraries available in most programming languages.  This script is run by <a href="http://en.wikipedia.org/wiki/Cron">Cron</a> every minute.</p>
<p>Using an AJAX intranet web page that reloads and parses the JSON file every minute, I can provide a list of current users to our technical support staff that&#8217;s internal to our company network and does not require direct access to the servers.</p>
<p>[<strong>Edit:</strong> It should be noted that TShark chews up RAM pretty quickly.  I have it restarting on a daily basis so it doesn't eat all the system memory.  There are probably other tools that can do the job, or you could write a custom parser that's more efficient if that's a concern.  I chose TShark because it was the easiest solution to implement out-of-the-box.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.litui.net/archives/656/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
