Satellite Health Control
Download GPSSat.ocx Visual Studio Control

The GPS Satellite Health Control shows the state of the GPS Satellites in the sky: their elevation, azimuth, and decibel levels. Satellites may be added to the control by merely passing the correct NMEA sentences to it, or "manually." The control may also be set to automatically remove satellites if the signal strength of any given satellite falls below a specificed value. The control is fully resizable, and offers three different satellite symbols. Signal strength bars at the bottom of the control may be turned off or on, and other visual componants may be modified by the programmer.

This shows the control's "naked state" as it is placed upon a form by the programmer. Note that throughout all of these sample images, the GPS Satellite Control is shown on a form: the minimize, restore, and close boxes, and the status bar on the bottom of the examples, are not part of the actual control.

This shows the control's "naked state" with the Appearance property set to "3D" (Integer value of 1). (One may also set the BorderStyle to Integer value of 0 to remove the border.) The programmer may modify the control's appearance in several ways using Properties, listed below, so that the end user need never see the control "naked" like this.
One of the Properties is called ShowBars. When this Property is set to False the image on the control loses the bottom grid (that is, satellite signal strength will not be graphed).
This image shows an example of the control populated with some satellites. I will explain the Properties and Methods used to populate the control with satellites below.
Here is the same population, but with the ShowBars Property set to False. I usually use the control's Click Event to swap beween the two ShowBars values. That way, the end use may use her mouse to quickly look at satellite signal strength in the graph form, then click on the control again to hide the graph. Of course, the programmer could allow the Click Event to swap between, for example, satellite styles (via the SatStyle Property), and removing from the control all satellites that are not currently tracking (via the ShowNoTracking Property). The DblClick Event could also be programmed to allow the user more control options.
EVENTS

  • Click
  • DblClick
  • GPSSatError
You will wish to use either the Click Event or the DblClick Event in your program (but not both: In Microsoft Windows, Click trumps DblClick). You could use these Events to program the display to cycle through the default colors to the Day or Twilight displays, or show hollow signal strength bars, or any other activity not even related to the control.

When incorrect data is passed to the control, the error event will be triggered: your program should trap those errors and handle them.

METHODS

  • AddBird
  • BirdCls
  • GPGSV
  • RemoveBird
  • ResetDefaults
The control's Methods allow your program to add satellites to the control and remove them. The AddBird Method adds a satellite one at a time; RemoveBird removes a satellite. To add satellites using a $GPGSV NMEA sentence, one may use the GPGSV Method; BirdCls removes all satellites from the control.

As the programmer, it is up to you to keep track of when to add and remove satellites from the control. You may do this manually by looking at NMEA/GPS data and noticing when a new satellite is detected and when an existing satellite is lost over the horizon; however, there is a Property that allows you to tell the control to remove satellites from the control when the satellite's signal strength drops below a specific decibel threshold (BirdExpireThreshold). Using the GPGSV Method to add satellites instead of AddBird, and using the BirdExpireThreshold Property, the control will add and remove satellites automatically for you.

PROPERTIES

  • BackColor
  • BirdExpireThreshold
  • BorderStyle
  • ErrorDescription
  • ErrorNumber
  • FontColor
  • HollowBars
  • LineColor
  • Night
  • SatStyle
  • ShowBars
  • ShowElevationRings
  • ShowNoTracking
  • Twilight
These Properties allow you, as the programmer, to change how the control looks and behaves. You could expose some or all of these Properties to the end user (and be sure to give the user a "restore to defaults" option), to allow the user to set her own preferences.

One feature you may wish to provide to your end users is a "da " and a "night" option: at night a person on a boat does not like to look at glaring, bright computer screens--- setting the BackColor Property to black, and the FontColor Property and LineColor Property to white will darken the control, and thus make it easier to look at when on the night watch. You may do this by specifying your own colors, or using the built-in Night Property or Twilight Property. Changing one of these Properties turns off the other.

All controls in The NMEA Sage control suite include the same color scheme for the Night and Twilight Properties to give the suite an integreated look.

This image shows the Night Property set to True, the HollowBars Property set to True, and the SatStyle Property set to "2", and the ShowBars Property set to True.
This image shows the Twilight Property set to True. As mentioned above, if the Night Property was already set to True, it will be turned to False when Twilight is set to True.
This image shows the Night Property set to True, the SatStyle Property set to "3", and the ShowBars Property set to False.
ctlGPSSat1.BirdExpireThreshold = 1
ctlGPSSat1.HollowBars = False
ctlGPSSat1.SatStyle = 3
ctlGPSSat1.ShowNoTracking = True
ctlGPSSat1.ShowBars = True
ctlGPSSat1.BorderStyle = 1
ctlGPSSat1.Appearance = 1

ctlGPSSat1.BackColor = QBColor(13)
ctlGPSSat1.FontColor = QBColor(4)
ctlGPSSat1.LineColor = QBColor(7)

The colors you choose can be almost anything, but you will wish to avoid setting the BackColor Property to the same color as a satellite image, since that will make the satellite image dissapear. Most of your end users will want "conservative" colors: a white background with gray lines. (Use the ResetDefaults Method to restore the control to this "conservative" color scheme.)

Satellite signal strength is denoted by three colors. Brown is used to show a satellite that has a signal strength of from 0 to 33; Green is used for satellites with a signal of from 34 to 66; Blue is used for satellites with signal strengths from 67 to 99.
ctlGPSSat1.ShowElevationRings = True

Satellite elevation is shown by how far from the center of the control the image is: in the center is 90 degrees elevation (directly over one's head). The circles are at 30-degree increments.

The control is resizable, and may be smaller than is readable or may fill up the entire screen, by using the control's Height Property. The control automatically adjusts its Width Property to match.
One uses the AddBird Method to add satellites one at a time. The Method takes four arguments:

  1. Satellite Number (1 to 32)
  2. Satellite Elevation (Degrees, 0 to 90)
  3. Satellite Azimuth (Degrees, 0 to 359)
  4. Satellite Signal Strength (Decibel, 0 to 99)
It is usually the NMEA sentence $GPGSV that contains this information.
The GPGSV Method is used to pass the entire NMEA sentence to the control. If the sentence is incorrect or malformed, the control will do its best to place as many satellites as it can and then it will trigger an error.
ctlGPSSat1.RemoveBird 18
ctlGPSSat1.RemoveBird 13
ctlGPSSat1.RemoveBird 29

ctlGPSSat1.BirdCls

The RemoveBird Method will remove a satellite one at a time from the control.

To remove all satellites from the control, use the BirdCls Method.

Note that if one has the ShowNoTracking Property set to True, a satellite with a signal strength of zero will still be displayed even if the BirdExpireThreshold Property is set to a value greater than zero. To prevent weak satellites from being displayed, set the ShowNoTracking Property to False and the BirdExpireThreshold Property to "10" or lower.

ERROR CODES

When the control is passed an invalid value for some of its Properties, the GPSSatError Event will be triggered. The following are the error codes returned by the Properties ErrorNumber and ErrorDescription.

0 - No current error.
1 - Satellite number value was out of bounds.
2 - Satellite elevation value was out of bounds.
3 - Satellite azimuth value was out of bounds.
4 - Satellite signal strength value was out of bounds.
5 - Satellite was not on the display.
6 - NMEA sentence must begin with $GPGSV
7 - Sentence $GPGSV appears malformed.
The demonstration program reads a text file, named OUTPUT.TXT, that contains GPS-gathered NMEA sentences and feeds that data into the control at aproximately three sentences per second.
NMEA Sage Home Page

The Banded Compass Control
The Compass Control
The North Biased Compass Control
The Goto Control
Course and Speed (Ground)
The Position Control
Engine RPM Control
The Rudder Control
The GPS Satellite Health Control
The GPS Satellite Elevation Control
Set and Drift control
The NMEA Talker Control
Depth and Water Temperature Control
The Wind Control
The Cross Track Alarm Control
The Pilot Control
Waypoint Plotter Control
Radar Control
Goto Simple Control