Converting to IMMA

Correcting longitude from time zones

A common error in the digitised obs is to have the longitudes (less often the latitudes) out by a factor of 10. Fortunately, there is an alternative source of information on a ship's longitude given by its time zone: the time zone should be approximately the longitude multiplied by (-12/180).
Longitude compared with longitude deduced from time zone
It's clear from the figure above that in most cases the longitude and the time zone have the expected linear relationship, but there are also many obs showing three other linear relationships: longitude 10 times too big, longitude 10 times too small and longitude in wrong hemisphere.

If we assume that the error is always in the longitude and adjust the longitude of any observation where the discrepancy between the given longitude and that deduced from the time zone is more than 30 degrees (2 hours) but where scaling by either 10 or 0.1 will bring the longitude into that range, we can get rid of most of the errors.

Longitude compared with longitude deduced from time zone (after correction).

I tried to do the same with obs in the wrong hemisphere - but this turned out to have too many false positives.

Not all positions are corrected, but many are: the figures below show the track of the Dunedin before and after correction.

Track of the DUNEDIN before and after correction.