COMPASS DEVIATION TABLE

Use your personal computer to create a quick, easy and accurate deviation table for your compass.

INTRODUCTION

    How many of us sail with an uncorrected compass and only a vague idea of the magnitude of its errors? The cost of having it adjusted commercially or the complexity of doing it yourself frequently means that we just don't do it, especially in this age of global satellite navigation.

    While we shouldn't go sailing without having a corrected and calibrated compass, if you plan to do so, or do so without planning, then this computer program can provide you with a deviation table which will allow an uncorrected compass to give quite accurate results. Some steel boats may have segments which are so unstable that uniform motion cannot be achieved without some correction and this program may be inadequate. The table is so easy to produce that it can also be used as a tool to evaluate the effectiveness of compass adjustments as they are made.

EQUIPMENT REQUIRED.

    To edit and customize the program, all you need is a personal computer which is able to run BASIC or QBASIC language programs. Since Microsoft is omitting these utilities from later versions of Windows, a compiled file "Compass.exe" is available for download. The compiled version will run in your MSDOS environment. You can print out your table using port LPT1, however if you do not have one available on the boat, it can be readily copied off the screen or you can create a file C:\Compass.txt that can be printed. It is more convenient if the computer will operate on board your vessel, however a technique is described allowing remote generation of the table with your computer on shore.

HOW IT WORKS.

    To use the program you need to sail the vessel in a uniform circle at constant speed. The computer measures the time for a complete clockwise rotation and assumes that equal numbers of degrees are traversed in equal amounts of time, so it is important that the effects of wind or current are minimized. Your compass readings are entered by tapping the "space bar" of the computer keyboard at each 10 degree point of the compass. The difference between the time you tapped the bar and 1/36th of the total circle time, gives the relative deviation for each compass heading. In addition the set of readings is offset to line up with any known correct heading if such information is available. This can allow correction for variation in addition to deviation if desired.

    This program is free. You should verify the results and use them on the understanding that no warranty is given as to the accuracy and you use them at your own risk. (Legal people said to put this in).

    COMPASS DEVIATION TABLE INSTRUCTIONS


    You should select these instructions and print them out so you can refer to them when running the program.

  1. Copy the program very carefully (use copy and paste) into your computer in the BASIC language or download the compiled version. Do some trial runs of the program to check for errors and become familiar with its operation before leaving the dock. If editing the program, refer to your BASIC computer manual to resolve any difficulties, especially relating to minor differences in the particular dialect of your BASIC language.

  2. If you don't already have one, you should determine one deviation angle anywhere on the compass. This could be done using range markers with a known heading, or alignment with a landmark from your dock using a chart. The computer program will ask you for the correct magnetic bearing and then for your compass reading for that heading. The program can be run without this information (enter zero for both) but the resulting table, though better than nothing, may have an offset from its true values. Entering the TRUE bearing instead of the MAGNETIC bearing will produce a chart to correct deviation and variation combined, but it will only be valid for your immediate area.

  3. Pick a calm day and find a clear spot where you can sail in circles without concern for obstructions or other sailors with smart comments. The diameter is not very important except the total time for one rotation should be at least 3 minutes. Power at a constant speed and secure the helm at a fixed angle. The rotation must be clockwise, or turning to starboard.

  4. Have the computer program running and the known deviation (+ variation) already entered. Allow one revolution for conditions to stabilize and then tap the space bar precisely as the North of you compass passes the lubber line. Continue to tap the bar precisely as each 10 degree mark passes the line, finishing at 360 degres (North again). There will be 37 taps total. Nothing appears on the computer screen during this process so keep your eye on the compass and your finger poised over the space bar but have a crew member watching for traffic or obstructions.

  5. The computer will compute the deviation table and display it on the screen.

  6. Use this data as a correction table for using your compass or plot a deviation graph if desired.

    If your personal computer does not like to go to sea, the same result can be achieved with only slight loss of accuracy by having a friend operate the computer on land and press the space bar each time you call out the marks on your VHF radio. This technique will also allow you to produce deviation tables for your friends, while the computer remains on your boat or on land.

SAMPLE RESULT

    This is a peek at the result that will be produced. This is NOT the result from YOUR compass.
This was done with zero variation so North or 360 degrees shows up with no error. If a variation other than zero had been entered at the start, then all these actual bearings would be offset by that amount.

10 ON COMPASS IS ACTUALLY 11
20 ON COMPASS IS ACTUALLY 22
30 ON COMPASS IS ACTUALLY 34
40 ON COMPASS IS ACTUALLY 45
50 ON COMPASS IS ACTUALLY 54
60 ON COMPASS IS ACTUALLY 63
70 ON COMPASS IS ACTUALLY 72
80 ON COMPASS IS ACTUALLY 81
90 ON COMPASS IS ACTUALLY 89
100 ON COMPASS IS ACTUALLY 98
110 ON COMPASS IS ACTUALLY 106
120 ON COMPASS IS ACTUALLY 115
130 ON COMPASS IS ACTUALLY 122
140 ON COMPASS IS ACTUALLY 133
150 ON COMPASS IS ACTUALLY 142
160 ON COMPASS IS ACTUALLY 153
170 ON COMPASS IS ACTUALLY 165
180 ON COMPASS IS ACTUALLY 177
190 ON COMPASS IS ACTUALLY 191
200 ON COMPASS IS ACTUALLY 206
210 ON COMPASS IS ACTUALLY 218
220 ON COMPASS IS ACTUALLY 229
230 ON COMPASS IS ACTUALLY 242
240 ON COMPASS IS ACTUALLY 252
250 ON COMPASS IS ACTUALLY 262
260 ON COMPASS IS ACTUALLY 272
270 ON COMPASS IS ACTUALLY 283
280 ON COMPASS IS ACTUALLY 294
290 ON COMPASS IS ACTUALLY 304
300 ON COMPASS IS ACTUALLY 315
310 ON COMPASS IS ACTUALLY 324
320 ON COMPASS IS ACTUALLY 331
330 ON COMPASS IS ACTUALLY 338
340 ON COMPASS IS ACTUALLY 346
350 ON COMPASS IS ACTUALLY 353
360 ON COMPASS IS ACTUALLY 360


COMPASS DEVIATION PROGRAM LISTING



USE COPY AND PASTE TO MOVE THIS PROGRAM TO YOUR BASIC OR QBASIC SOFTWARE.

100 DIM C(36), M(36) AS DOUBLE : COMMON T AS DOUBLE
120 PRINT "YOU MUST READ THE SEPARATE INSTURCTIONS BEFORE PROCEEDING."
110 PRINT "YANDINA COMPASS DEVIATION TABLE."
130 INPUT "CORRECT MAGNETIC BEARING (ENTER 1 TO 3 DIGITS)"; TM
140 INPUT "HAS A COMPASS READING OF "; CR
150 PRINT "WE ARE READY TO TIME THE SWING WHEN YOU TAP THE SPACE BAR."
160 PRINT "FIRST TAP WILL BE WHEN BOAT PASSES THROUGH NORTH."
170 PRINT "TAP THE SPACE BAR PRECISELY AT EACH 10 DEGREE POINT."
180 PRINT "NOTHING ELSE APPEARS ON THE SCREEN"
190 PRINT "UNTIL THE LAST TAP OF THE SPACE BAR."
200 PRINT
210 PRINT "BE PRECISE, TIMING IS IMPORTANT.";
220 FOR D = 0 TO 36
230 IF INKEY$ = "" THEN T = T + 1: GOTO 230
240 C(D) = T: T = 0
250 NEXT D
260 CLS : PRINT "COMPUTING DEVIATIONS."
270 FOR D = 1 TO 36: T = T + C(D): NEXT D
280 FOR D = 1 TO 36
290 M(D) = (R + C(D)) * 360 / T
300 R = R + C(D)
310 IF D * 10 < CR OR (D - 1) * 10 > CR THEN 330
320 E = (CR - (D - 1) * 10) * (M(D) - M(D - 1)) / 10 + M(D - 1) - TM
330 NEXT D
340 FOR D = 1 TO 36
350 M(D) = M(D) - E
360 IF M(D) < 0 THEN M(D) = M(D) + 360
370 IF M(D) > 360 THEN M(D) = M(D) - 360
380 NEXT D
390 FOR D = 1 TO 36
400 PRINT USING "####"; D * 10;
410 PRINT " ON COMPASS IS ACTUALLY";
420 PRINT USING "####"; M(D)
IF D MOD 20 = 0 THEN
INPUT "HIT RETURN KEY TO CONTINUE"; W$
END IF
430 NEXT D
440 INPUT "NEED OUTPUT AGAIN (Y/N)"; W$
450 IF UCASE$(W$) <> "N" THEN 390
460 INPUT "NEED PRINTOUT (Uses LPT1) (Y/N)"; W$
470 IF UCASE$(W$) = "N" THEN 540
480 FOR D = 1 TO 36
490 LPRINT USING "####"; D * 10;
500 LPRINT " ON COMPASS IS ACTUALLY";
510 LPRINT USING "####"; M(D)
520 NEXT D
530 GOTO 460
540 INPUT "CREATE (OVERWRITE) TEXT FILE C:\COMPASS.TXT? (Y/N)"; W$
550 IF UCASE$(W$) = "N" THEN 640
560 IF UCASE$(W$) <> "Y" THEN 540
570 OPEN "C:\COMPASS.TXT" FOR OUTPUT AS #1
580 FOR D = 1 TO 36
590 PRINT #1, USING "####"; D * 10;
600 PRINT #1, " ON COMPASS IS ACTUALLY";
610 PRINT #1, USING "####"; M(D)
620 NEXT D
630 PRINT "FILE C:\COMPASS.TXT CREATED"
640 END