Finding Your Way with GpsDrive
The Egyptians invented geometry, the mathematical basis of surveying. The Nile's annual floods removed markers and forced those tidy bureaucrats to re-measure roads, fields and other features of the landscape.
Gunpowder came to western hands, and long-range artillery was invented. This required precisely locating naval and artillery guns, as well as their targets. So, the military has had a longtime interest in the art of locating things, and they have refined the techniques that the Egyptians first pioneered.
In the 1970s, the US Department of Defense (DoD) started work on the Global Positioning System (GPS). This put a constellation of 24 satellites in low-Earth orbit. GPS allowed instantaneous fixes accurate to within a few tens of meters. The Soviets launched a similar system, Glonass, which Russia still maintains. And, the EU has begun work on an improved system of its own, Galileo, to be deployed in 2008.
The military is happy; they now can locate targets with much greater accuracy. However, as with another DoD project, the Internet Protocol, the civil spinoffs may far outweigh any military benefits. We can now use GPS to locate errant hikers, help distressed vessels and search for oil wells far more precisely and cheaply than with previous techniques. Indeed, the EU sees Galileo primarily as a commercial venture.
All three systems are based on atomic clocks aboard the satellites. The receiver uses time signals to tell its distance from each satellite. Spherical geometry tells us that three satellites give a fix in two dimensions. A fix in three dimensions requires a minimum of four satellites. Modern GPS receivers can track as many as 12 satellites, the most they can see at any one time.
Because of the frequencies and signal strengths at which GPS operates, the major constraint on GPS receivers these days is that one must be outdoors, or nearly so, or have a remote antenna, in order to track satellites.
GpsDrive is a program licensed under the GNU General Public License (GPL) for displaying one's position in real time. It operates on most laptops running Linux, and on Linux-driven PDAs, such as the Yopy and Zaurus. Currently, 12 languages are supported.
Before we begin, a word of warning: never consider GPS as anything but an adjunct or supplement to other tools of navigation. The advent of GPS is not occasion to dump your copy of Bowditch.
GpsDrive requires the Gnome Toolkit plus (GTK+), version 2.2 or higher, which comes with most Linux distributions. Anti-aliasing fonts are nice but not required.
MySQL can store waypoints, and GpsDrive will automatically use it if possible.
Kismet is a wireless sniffer, a tool for detecting Wi-Fi access points. As Kismet detects them, GpsDrive automatically turns the contact information into waypoints and stores them in MySQL. This turns GpsDrive into an excellent tool for wardriving.
Festival is a voice output program for Linux. GpsDrive uses it for voice delivery of comments as you approach waypoints. It is an excellent safety feature for mobile GpsDrive users. Flite is a stripped-down version of Festival.
Installing GpsDrive is straightforward for those familiar with typical package installation.
Get GpsDrive from its home page or mirrors indicated on its Web site (see the on-line Resources). You can get tarballs, md5sums and RPM packages for the latest stable versions. You also can get the latest work-in-progress quality version from anonymous CVS. The tarball version is the more flexible, as you can remove some of the components you don't plan to use.
To install a tarball, copy it to a suitable location. Then do the following:
tar -xvzf gpsdrive*tar.gz cd gpsdrive ./configure make
If you are using only the NMEA protocol and don't need the GARMIN protocol, configure GpsDrive with:
You can append --enable-auto-optimization for optimized compiler flags.
Then, as root, install the program, the gpsd dæmon and the language files. Run:
RPM installation is the usual:
rpm -ivh gpsdrive*.rpm
Once installation is complete, you should be able to read the man page, which has the latest information.
The first thing to do is to see if GpsDrive works with your GPS receiver. To test the system, fire up gpsd, a dæmon that serves the raw GPS data. It will listen on /dev/gps, unless you tell it otherwise on the command line with the -p option:
gpsd -p /dev/ttyS1
Because you should run GpsDrive and gpsd as a non-root user, make sure that user has read and write permission on the device.
Once gpsd is running, run:
telnet localhost 2947
When you get the connect message, press the R key, and gpsd will start feeding you raw NMEA sentences, like so:
[ccurley@charlesc ccurley]$ telnet teckla 2947 Trying 192.168.1.32... Connected to teckla. Escape character is '^]'. r GPSD,R=1 $PRWIRID,12,01.05,07/29/96,0003,*46 $GPRMC,235947,V,4333.1694,N,10812.0068,W,0.000,0.0,120895,13.3,E*42 $PRWIZCH,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0,00,0*4D ASTRAL ASTRAL $GPRMC,235949,V,4333.1694,N,10812.0068,W,0.000,0.0,120895,13.3,E*4C .... GPSD,R=0 ^] telnet> quit Connection closed.
This works even when the receiver can't get any signal, because the receiver will send data indicating that it doesn't have any signal.
Once you know which device your GPS receiver is on, make a symlink (as root) to /dev/gps so that gspd or gpsdrive can use the default:
ln -s /dev/ttyS0 /dev/gps
You can set the device name in the GpsDrive GUI, but gpsd won't use that setting.
If you are going to use MySQL for waypoint storage, which is required for Kismet, see the file README.SQL. You need to feed the file create.sql into MySQL's command-line client, so you must have appropriate permissions in MySQL. You can use any reasonable MySQL client to edit your waypoints, including OpenOffice.org.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Paranoid Penguin - Building a Secure Squid Web Proxy, Part IV
- SUSE LLC's SUSE Manager
- Google's SwiftShader Released
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- SourceClear Open
- SuperTuxKart 0.9.2 Released
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide