@Override
    public void onSaveInstanceState(@NonNull final Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putString(STATE_CALC_STATE_JSON, calcStateString);
        outState.putInt(STATE_LAST_SELECTED_WP_TYPE, CommonUtils.enumToInt(lastSelectedWaypointType));
        outState.putParcelable(STATE_CURRENT_COORD, currentCoords);
        outState.putParcelable(STATE_PREPROJECTED_COORD, preprojectedCoords);

    }
Save the current state of the calculator such that it can be restored after screen rotation (or similar)
main/src/main/java/cgeo/geocaching/EditWaypointActivity.java