public Disposable start(final int flags, final long windowDuration, final TimeUnit unit) {
        final CompositeDisposable disposables = new CompositeDisposable();
        final boolean lowPower = (flags & LOW_POWER) != 0;
        final LocationDataProvider locationDataProvider = LocationDataProvider.getInstance();

        if ((flags & UPDATE_GEODATA) != 0) {
            disposables.add(throttleIfNeeded(locationDataProvider.geoDataObservable(lowPower).observeOn(AndroidSchedulers.mainThread()), windowDuration, unit).subscribe(this::updateGeoData));
        }
        if ((flags & UPDATE_DIRECTION) != 0) {
            disposables.add(throttleIfNeeded(locationDataProvider.directionDataObservable().observeOn(AndroidSchedulers.mainThread()), windowDuration, unit).subscribe(this::updateDirectionData));
        }
        if ((flags & UPDATE_GEODIR) != 0) {
            // combineOnLatest() does not implement backpressure handling, so we need to explicitly use a backpressure operator there.
            disposables.add(throttleIfNeeded(Observable.combineLatest(locationDataProvider.geoDataObservable(lowPower), locationDataProvider.directionDataObservable(), ImmutablePair::of).observeOn(AndroidSchedulers.mainThread()), windowDuration, unit).subscribe(geoDir -> updateGeoDirData(geoDir.left, geoDir.right)));
        }
        return disposables;
    }
Register the current GeoDirHandler for GeoData and direction information (if the preferences allow it).

@param flags          a combination of UPDATE_GEODATA, UPDATE_DIRECTION, UPDATE_GEODIR, and LOW_POWER
@param windowDuration if greater than 0, the size of the window duration during which no new value will be presented
@param unit           the unit for the windowDuration
@return a disposable which can be used to stop the handler
main/src/main/java/cgeo/geocaching/sensors/GeoDirHandler.java