Use your personal computer to create a quick, easy and accurate deviation table for your compass.
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.
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.
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).
You should select these instructions and print them out so you can refer to them when running the program.
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.
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
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."
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$
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"