Banded Compass Control

Download BandCompass.ocx Visual Studio Control

The Banded Compass Control is fully resizable, and the internal components have several options for placement and removal. You may have a control span from 6 to 359 degrees (the default is shown here at 60 degrees). As with all the other controls in The NMEA Sage Suite, the Banded Compass Control includes the Night and Twilight Properties that allows the crontrol to be "dimmed" with a single program line.

The length of the ticks may be set from 0% to 1,000% (default is 100%) via the ScaleTicks Property, and the size of the Cardinal letters may be set via the CardinalFontSize Property. In the sample here, the CardinalAlign Property is set to a value of "2" which places it on the bottom of the control. You may turn off the ticks, center line, and lettering using various Properties. You may even turn off some tick marks and leave the others on via the ShowOneTick, ShowFiveTick, and ShowTenTick Properties.

The Twilight and Night Properties allows you, and your end users, to quickly set the Banded Compass Control for twilight and night-time viewing. Other than running out of whiskey and coffee, nothing annoys the Officer On Duty of the 2:00AM watch than to have to stare at a glaringly bright screen, which ruins one's night vision.

The OneTickColor, FiveTickColor, and TenTickColor Properties may be set to different colors. The center line's color may be set using the CenterLineColor Property.

The ShowOneTick, ShowFiveTick, and ShowTenTick Properties turn the tick marks on and off.

There are two ways to set the compass heading: by using The cHeading Property and/or the HDT Method. Degrees may be added that are greater than 359, and the control will modulus the sum (for example, a heading of 370 will reduce to a heading of 10).

Several NMEA devices provide True Heading ($..HDT) sentences. (For example many GPS receivers will send $GPHDT sentences.) You may pass these sentences to the Banded Compass Control via the HDT Method.

Events:

Resize
BandCompassError
Click
DblClick

Methods:

HDT
ResetDefaults

Properties:

cHeading
Night
Twilight
Appearance
BackColor
CardinalAlign
CardinalFontSize
FontColor
BorderStyle
ErrorNumber
ErrorDescription
DegreeSpan
TickAlignment
ScaleTicks
ShowOneTick
ShowFiveTick
ShowTenTick
ShowCardinals
ShowCenterLine
OneTickColor
FiveTickColor
TenTickColor
CenterLineColor

Error Codes

0 - No Current Error
1 - DegreeSpan value out of range. Valid range: from 6 to 359 inclusive.
2 - NMEA sentence appears malformed. $..HDT sentences are valid.
3 - TickAlignment must be 0 (top) or 1 (bottom).
4 - CardinalAlign must be 0 (top), 1 (center), or 2 (bottom).
5 - BorderStyle must be 0 or 1
6 - Appearance must be 0 or 1
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