Mapping XY movement to one physical axis

Hi,

I am looking to modify the Klipper firmware to map the compound movement of X and Y axes to a new, single axis. This new axis needs to move in a way that mirrors the exact combined motion profile of X and Y. Additionally, the new axis should have unlimited “length” (continuous movement in one direction without resetting).

The goal is to implement this mapping in a way that correctly reproduces the speed and acceleration profiles of the original XY movements. Has anyone worked on a similar problem or have suggestions on how to approach this? We are comfortable with custom firmware programming and just need some guidance or ideas for implementation.