Sourcing from wikipedia https://en.wikipedia.org/wiki/Motor_constants
Km = T / sqrt(P)
Km = "Motor size constant"
T = Motor Torque, Nm (Newton-Meters)
P = Resistive Power Loss in motor, W (Watts)
Or alternatively
Km = Kt / R^0.5
Kt = Torque constant, Nm / Ia (Newton-Meter per Armature current)
R = Motor winding resistance, Ohms
Torque constant, defined by motor torque divided by armature current.
Kt = T / Ia
Now the question. Can't the Kt and Km be derived from the motor ID variables flux_VpHz and Rs_ohm?
electromagnetic torque = flux_VpHz * (1 / 2pi) * Ia * poles * (3/4) = torque at given current, without mechanical losses (*)
But don't we just get the Kt = torque constant if we set our armature current as constant 1? And then Km can be calculated with the ID'd winding resistance and with the Kt? Of course as noted before this is a theoretical value that doesn't account in mechanical and other losses.
Here's an example calculation with a larger size RC hobby motor, I also calculated the Kv in RPM/V, since that it the way the back emf constant is defined in majority of RC motors.
flux_VpHz = 0.0325
Rs_ohm = 0.0168
Kt = 0.0325 * (1/2pi) * 1 A * 14 * 0.75 = 0.0543 Nm/Ia
(From wikipedia) Kv = 60 / (2pi * Kt) = 175 RPM / V (Motor is spec'd at 149, but accounting in the losses it's close enough)
Km = 0.0543 / sqrt(0.0168) = 0.419 Nm/sqrt(W)
And I will still note it one more time, these calculations are ideal, since no losses are accounted into them.
Reference thread (*):
https://e2e.ti.com/support/microcontrollers/c2000/f/902/t/298101