Z Technology, Inc.

GPS Compatible
Control Software

Application note

By: John Purdy

Z Technology, Inc.

December 18, 1997

Version 2

Table of Contents


Understanding the Quick Basic Control Software

Getting Set Up

Running the GP_SING Control Software Program

Running the GP_PLOT Control Software Program


Welcome to the world of capturing recording, and plotting signal strength measurements with your Z Technology Field Strength Meter, and a Global Positioning System (GPS.)

In this application note you will see an example of using your Field Strength Meter, a GPS, a laptop computer, and software to make your own signal coverage plot.

You will learn to use the Z Technology GPS compatible Control Software program GP_SING to remotely via the serial port, control the Field Strength Meter, and monitor the GPS while recording signal strength measurements, with Latitude and Longitude data tags. You will watch as the Z Technology GP_PLOT program automatically interprets and plots the data according to its Latitude and Longitude. You'll be able to Zoom, Pan, Scale, and change the color/signal strength thresholds of the plot.

For information about GPS, how it works, GPS serial port communication protocol, and how to connect a GPS to your laptop, see the Z Technology Application Note: Global Positioning System Receivers. It also gives a comparison of two different GPS receivers reviewed by Z Technology, that have been found to work well with the GP_SING Control Software program. Also included are specifications for the two reviewed units.

Understanding the Quick Basic Control Software

Your Field Strength Meter is a smart precision receiver capable of many built in functions. To learn about these functions you will need to use the Control Software that came with your Field Strength Meter. See the included Quick Basic Control Software diskette, and the Application Note: R-500 Series Quick Basic Control Software. In that application note you will learn how to use the Field Strength Meter Serial Communications port, and how to run the following Control Software programs.

Stat.bas -- The very simplest of all the Control Software programs. It simply interrogates the Status of the Meter and reports the results. There is no error checking in this program, so user input must be correct.

Menu.exe-- Shows you the many features of the R-500 Series Field Strength Meter that are available via the Serial port.

Meas_now -- Shows you how to interactively take field strength measurements at a frequency you chose, then add a comment for each measurement. The results can be displayed to the laptop's screen and saved to a file on the laptop's disk.

Single.exe -- Shows you how to continually take field strength readings of a single frequency. Readings can be displayed to the laptop screen, and recorded to a file on the laptop's disk. Measurements can be spaced in time from 0 seconds, to several hours.

Scan.exe -- Shows you how to continually take field strength readings of a band of evenly spaced contiguous of frequencies. You set the time between scans, the start frequency, step size, and number of steps. Readings can be displayed to the laptop screen, and recorded to the laptop's disk.

Fil_ctl.exe -- Shows you how to create your own control file with your own frequencies of interest. In the control file you set the frequencies to be measured, the time interval between measurements, and the number of times to run the measurements.

Be sure you have a good understanding of the Quick Basic Control Software programs before moving on using the Field Strength Meter with a GPS unit.

Getting Set Up

Before using the GPS Control Software, you need to connect and configure the Field Strength Meter, the GPS, and Laptop computer. See the Z Technology Application Note: Global Positioning System Receivers for instructions on connecting all these devices together.

Configuration consists of copying the GPS compatible files on the R-500 Series Quick Basic Control Software diskette to a new directory on your laptop computer.

Using your Windows95 Explorer, Windows 3.1 File Manager, or DOS mkdir command, create a new directory on your laptop computer to load your GPS Control Software in. The GPS Compatible programs are located in the GPS directory of the Quick Basic Control Software diskette. You will find the following files:






Copy all these files into the new directory on your PC or Laptop.

GP_SING.BAS is the SINGLE program mentioned above with GPS capability added.

GP_PLOT.BAS uses the text data file created by GP_SING to make a plot of your collected data.

GP_PDX.TXT is an example plot of data that was collected by doing a test drive on all the major freeways in the Portland Oregon area while the Field Strength Meter was tuned to a local FM radio broadcast station.

The .BAS source code files run in interpreted mode with QBASIC which comes with DOS 6.2 or earlier. If you want to make changes to the program and save the changes as a .EXE file you will need a copy of Microsoft Quick BASIC 4.5. To simply run the .EXE executable files, enter the file name at the DOS prompt. If you named the directory you copied the files into C:\ZTECH, then enter:


Running the GP_SING Control Software Program

The GP_SING program runs best in a DOS system. It will run in a DOS window in a Window system however it is not recommended.

The following section is a screen by screen description of what you will see when you run the GP_SING program.

Change to your new directory and start the GP_SING program as described above.

The first screen you see, shown below, is the sign-on screen. It is a similar to the sign-on screens you've become accustomed to by running the other Z Technology Control Software programs on the Quick Basic Control Software diskette. It displays the title of the program, its version number, and a short description of what it does. It instructs you to connect the Meter to the laptop, press the FUNCtion button and rotate the TUNE knob to function 93 then press the TUNE knob. (You will want to have the GPS connected to the laptop as well.)

Next is the communications interrogation screen. Default settings are in square brackets. Pressing ENTER selects the default. Default settings follow factory defaults. Note that the meter and the GPS use COM1 and/or COM2 only. The Latitude, and Longitude data defaults to Decimal Degrees, the same format used by many mapping programs, (for instance Microsoft AUTOMAP Streets Plus) and by the GP_PLOT program which we will cover later in this appnote. The default GPS sentence type is $GPGGA. This is generally included in most NMEA compliant GPS default sentence broadcast groups. Two other types of sentences are supported for the odd case that $GPGGA is not a default of your NMEA compliant GPS unit.

For more information about NMEA see the Z Technology Application Note: Global Positioning System Receivers.

The Meter is normally shipped with the following settings:

Address = 1

Baud rate = 9600

Choose Meter settings. (Default values are in brackets)

Address of Meter? ([1] - 255)?

Baud rate? (1200, 2400, or [9600])?

COM ports 1 and 2 to be used.

GPS will be assigned to the remaining port

Example: Meter connected to COM port 1

GPS will connect to COM port 2

Meter connected to COM port, ([1], or 2) ?

Latitude and Longitude in Decimal Degrees? [Y] , N ?

NMEA GPS Sentence to be parsed? [1] $GPGGA, 2 $GPGLL, 3 $GPRMC ?

The third screen, shown below, asks for the frequency to measure, in this example a local FM radio station 106.7 has been entered.

Next, enter the time interval between readings. Pressing ENTER here sets no time delay between readings, The instrument will take continuous readings at a rate of about 5 per second. Entering a number of seconds that is less than the update rate of your GPS unit will result in some of the measurements in the data log file not having associated GPS Latitude and Longitude data tags. The GP_SING program logs only one the most current GPS update with each reading. To change this so every reading gets the most current GPS Latitude and Longitude data tag, comment out the following lines of code in the GP_SING:Read.Meter sub routine.

latlon$ = ""

flatlon$ = ""

In this example 2 seconds was selected.

Finally enter the letter f if you want to save the data to a file. Data must be saved to a file if you want to use the GP_PLOT program to later plot the data on the laptop screen. If you don't press f here, the measurement data will only be displayed on the screen.

Enter Frequency (3.000 to 1000.000) MHz , [0] to exit 106.7

Time interval between samples (in seconds)? 2

Enter <F> to save results to a file f

The next screen asks if you would like to save the file in the current directory, make a new directory, move to a different directory, or name the file to be created. Here we have chosen the name sample.txt in the current directory. NOTE: In order to plot the file later, assign it a .txt extension. PLOT recognizes only .txt file extensions.

Enter file name, DIR, CD, or MD sample.txt

Next, the program commands the meter to take measurements at the time interval requested, displays the measurement results on the screen, and to a file if that has been requested.

Below is an example of what the screen looks like while making measurements. Notice it displays the time of the measurement, the Field Strength, and the Latitude, and Longitude in decimal degrees (the default format.) When the measurement session is completed the user presses the ENTER key and is asked to press the ENTER key once more to continue. The program then returns to the third screen. One more ENTER exits the program.

Press [ENTER] to restart

Test start date: 11-20-1997

Time Reading

10:24:02 62.1 dBuV

10:24:04 61.7 dBuV 45.594666 -123.009366

10:24:06 61.8 dBuV 45.594166 -123.008166

10:24:08 61.1 dBuV 45.593916 -123.007500

10:24:10 61.7 dBuV 45.593700 -123.006900

10:24:13 61.6 dBuV 45.593483 -123.006350

10:24:15 61.6 dBuV 45.593250 -123.005733

10:24:17 61.7 dBuV 45.593000 -123.005083

10:24:19 61.8 dBuV 45.592766 -123.004500

10:24:21 61.2 dBuV 45.592533 -123.003950

10:24:24 61.6 dBuV 45.592083 -123.002783

10:24:26 61.2 dBuV 45.591850 -123.002200

10:24:28 61.0 dBuV 45.591633 -123.001616

10:24:30 61.2 dBuV 45.591450 -123.001066

10:24:32 60.9 dBuV 45.591266 -123.000533

Press [ENTER] to continue

SAMPLE.TXT the recorded text file is shown below. Note, it includes the Time, Frequency, Field Strength, Latitude, and Longitude. This is the standard Z Technology file format the PLOT program expects to see. In this example the first field, of each record is actually blank. Note, there is nothing before the first comma. The first field is reserved for the date, this program does not record the date, however other Z Technology programs do use the date field.

The first record has no LAT, LON data, because the reading was taken before the program got its first GPS location.

Running the GP_PLOT Control Software Program

The GP_PLOT program will run equally well in a DOS system, or in a DOS window of a WINDOWS system. Start the GP_PLOT program by double clicking on its GP_PLOT.EXE icon from Windows 3.1 File Manager, or Windows 95 Explorer, or from a DOS prompt enter GP_PLOT.

The first PLOT screen lists the .TXT files it finds in the current directory, and asks for a file number to be selected. In this case we have selected #1 which is the GP_PDX.TXT file. Zero exits the program.

The following Text (.txt) Data files are available:

<1> GP_PDX


Make Selection.....[0] to exit .....1

Following this selection will be a short message advising that the file records are being moved to a temporary file. The temporary file contains only records with GPS Latitude and Longitude information. The plot will include only records with Latitude and Longitude data tags. The ' (apostrophe) symbol at the beginning of a line in the plot data file is used to denote a comment line. Using a text editor you can add notes to the data file by making the first character or each note or comment line an apostrophe. These notes will have to be filtered out if you wish to import the data to a spread sheet or similar application. When the plot program completes, the temporary file is deleted.

Moving records LAT, LON info into .tmp file

The statistics screen shown below informs you of what it found in the selected .TXT file. In this case it found 3950 records which contained Latitude and Longitude information. It sees that the Frequency being monitored was 106.7 MHz. It displays the low and high values for Field Strength, Longitude (the horizontal component of a plot screen) and Latitude (the vertical component of a plot screen.) Finally it divides the field strength readings into four ranges according to magnitude, and assigns a color to each range.

The program allows a user to adjust the thresholds to change the magnitudes assigned to each color. The default choice is to use the four equally divided threshold ranges.

The colors PLOT uses are:

Blue Low Range

Cyan Next

Yellow Next

Red High Range

Colors other than BLUE, CYAN, YELLOW, and RED can be used by modifying the QBASIC source code in the GP_PLOT.BAS:ChangeRanges, GP_PLOT.BAS.PrintLegend, and GP_PLOT.BAS:plotFS sub routines.

Statistics for this data set are:

Low High Delta

Degrees Miles Km

Field Strength 32.40 90.00

LONGITUDE -123.06215 -122.29456 0.76759 37.314 60.039

LATITUDE 45.30297 45.77647 0.47350 32.726 52.656

Freq. 106.700 MHz # of good records 3950

Dividing Field Strength Readings in to four color ranges

BLUE Low range 32.4 TO 46.8

CYAN Next 46.9 TO 61.2

YELLOW Next 61.3 TO 75.6

RED High range 75.7 TO 90.0

Change these range values Y/[N] ?

Below is the final output of PLOT. It shows a color plot of Field Strength measurements plotted according to their GPS locations. At the top of the screen is a legend displaying the ranges and the associated colors, and the frequency. The lower left and upper right corners display the Longitude and Latitude of the south west and north east plus marks of the plot. PLOT automatically sets the corners to be 10 percent larger than the area covered, and a square aspect ratio.

The left margin shows some functions that allow the user to visually analyze data. The DISPLAY functions toggle, that is, press the key once the function is enabled, press again and it is disabled.

The bottom and right margins display the scope of the area covered by the plot in both Miles and Kilometers. The Scale of the plot is also calculated and displayed based on using a standard 300 dot/inch printer.

Display: Dots [Default is disabled] enabling DOTS leaves a pixel dot path. Dots update much faster if doing multiple Zooms or Pans on a large data set.

Tails [Default is disabled] enabling adds scaled "tails" to each dot. The tail length for a maximum reading is 1/10th the horizontal screen width.

Zoom: PgUp [no Default] Zooms out, effectively taking the user to a higher view point.

PgDn [no Default] Zooms in, effectively taking the user to a lower view point.

Home [no Default] Restores the view to the original settings.

Pan: Up-Arrow [no Default] moves the view port up.
Dn-Arrow [no Default] moves the view port down.
Right-Arrow [no Default] moves the view port to the right.
Left-Arrow [no Default] moves the view port to the left.
Changes: F File moves back to the first GP_PLOT screen. A new file can be selected, or one more ENTER exits the GP_PLOT program.

R Ranges moves back to the statistics screen and allows, allows the user to adjust the thresholds to change the magnitudes assigned to each color.

S Scale Allows user to select a specific scale to view the plot. This is useful for sending the plot to a transparency in a printer, to overlay on a paper map. Set the scale to the same scale as the map. You may have to print sections of the plot individually.

C Color Allows the user to select the text color and background color. This is useful for printing transparency map overlays. Set the background color to white, the text color to something dark. Such a print can also be FAXed easier than a print with a dark background. Of course on a FAX the color information is lost.

Z Technology: GPS Plot

The screen images you see in this document were captured with a publicly available shareware program called VGSCAP. It is available from the ZiffDavis Web site. Go to http://www.hotfiles.com/utilities.html in the search field enter screen capture click on the SEARCH button, select VGA Screen Capture to download.