How to determine spindle speed on Makita RT0701C router

I am going to modify my Fusion360 post processor to tell me which dial to set the router too.
Here is the simple formula,

X is RPM speed
Y is Makita Router Setting
Y = 0.000231X−1.0338

Probably also want to round the result to the nearest 0.5.

Might have to go polynomial, but I think for simplicity and starters this works.

Though as @Festdewalkita pointed out, if you drop the first and last values (unlikely values to be used anyway), it’s very linear.

Y = 0.0002X - 0.4

image

Here is the post processor modification,

Find this line,

writeBlock(
            sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4)
        );

Replace with,

writeBlock(
            sOutput.format(spindleSpeed),
            mFormat.format(tool.clockwise ? 3 : 4),
            mFormat.format(0),
            formatComment("MSG, Spindle speed " + spindleSpeed + " RPM, Set Dial to " + ((0.0002*spindleSpeed) - 0.4))
        );

You will then get messages like this,
image