@Nullable
    private ActivityData getActivityData() {

        final ActivityData currentState = new ActivityData();

        //projection
        currentState.preprojectedCoords = this.preprojectedCoords;
        currentState.coords = this.currentCoords;
        currentState.projectionType = this.projectionType.get();

        //projection settings
        final ImmutableTriple<FormulaEditText, FormulaEditText, TextSpinner<DistanceUnit>> fields = getFieldsForProjectionType();
        currentState.projectionFormula1 = fields.left == null ? null : fields.left.getFormulaText();
        currentState.projectionFormula2 = fields.middle == null ? null : fields.middle.getFormulaText();
        currentState.projectionUnits = fields.right == null ? DistanceUnit.getDefaultUnit(false) : fields.right.get();

        final String givenName = binding.name.getText().toString().trim();
        currentState.name = StringUtils.defaultIfBlank(givenName, getDefaultWaypointName(cache, getSelectedWaypointType()));
        if (own) {
            currentState.noteText = "";
        } else { // keep original note
            currentState.noteText = waypoint.getNote();
        }
        currentState.userNoteText = ViewUtils.getEditableText(binding.userNote.getText()).trim();
        currentState.type = getSelectedWaypointType();
        currentState.visited = binding.wptVisitedCheckbox.isChecked();
        currentState.calcStateJson = calcStateString;

        return currentState;
    }
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