Custom motor frame in ArduCopter for SITL

Hello everyone,

I need to create a custom motor frame in ArduCopter, with specific motor positions and rotation directions — essentially defining my own motor layout rather than using one of the predefined frame types (e.g. X, PLUS, HEXA, etc.).

My goal is to run this custom frame in SITL, so that I can test control algorithms for my vehicle. I would like to know the correct procedure and code locations to define a new frame class or type that is recognized by the firmware and correctly initialized in the simulation.

The documentation on the motor library Copter Motors Library — Dev documentation is not entirely clear what needs to be modified or added (e.g. where to register a new frame class, how to link it to SITL initialization).

Could someone please explain the steps required to properly add a new frame definition so that it appears as a selectable and supported frame in SITL?

Any guidance or example of a custom frame implementation would be appreciated.

Thank you!