Make log_depth() more robust.

The function now revolves around the availability of a GPS
signal. Either 2D or 3D locks should do. Depth data that comes
out as all zeroes implies that no valid GPS signal is available.