In Marlin there is Z-Safe Homing it does not set the nozzle in the center of the bed on my 3D Printer though it move it fairly close.


#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
#endif

I believe would have to change the calculations to get it to the center. Though do not need a perfect center location.