public static List<Long> computeDirectionChanges(double _bearingThreshold, double _accuracyThreshold, List<Bearing> _data_list) throws BearingException {
        if (_bearingThreshold < 0 || _bearingThreshold > 360) {
            throw new BearingException("INVALID_BEARING_THRESHOLD");
        }
        if (_accuracyThreshold <= 0) {
            throw new BearingException("INVALID_ACCURACY_THRESHOLD");
        }
        if (_data_list == null) {
            throw new BearingException("INVALID_DATA_LIST");
        }

        List<Long> filteredBearings = new LinkedList<>();

        if (_data_list.size() < 2) {
            filteredBearings.add(_data_list.get(0).getTimestamp());
        } else {
            for (int i = 1; i < _data_list.size(); i++) {
                if (compareBearings(_bearingThreshold, _accuracyThreshold, _data_list.get(i - 1), _data_list.get(i)) != null) {
                    filteredBearings.add(_data_list.get(i).getTimestamp());
                }
            }
        }
        return filteredBearings;
    }