private int getVNode(final int i) {
        final MessageData m1 = i + 1 < nodes.size() ? nodes.get(i + 1).message : null;
        final MessageData m0 = i < nodes.size() ? nodes.get(i).message : null;
        final int vnode0 = m1 == null ? 999 : m1.vnode0;
        final int vnode1 = m0 == null ? 999 : m0.vnode1;
        return Math.min(vnode0, vnode1);
    }
writes the track in binary-format to a file

@param filename the filename to write to
main/src/main/java/cgeo/geocaching/brouter/core/OsmTrack.java