public static void startActivityEditWaypoint(final Context context, final Geocache cache, final int waypointId) {

        final Waypoint wp = cache.getWaypointById(waypointId);
        if (LegacyCalculatedCoordinateMigrator.needsMigration(wp)) {
            LegacyCalculatedCoordinateMigrator.performMigration(context, cache, wp, () -> startActivityEditWaypointInternal(context, cache, waypointId));
        } else {
            startActivityEditWaypointInternal(context, cache, waypointId);
        }
    }
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