Pwm mapping for thruster


i need better understanding on the pwm mapping in the thrusters programming code.

how is it calculated.
what is the ‘range’ of input value to the code (what does this value represent (trg_throttle & trg_yaw/trg_turn)? is it like keystroke duration?)
and what is the final value (range) for the pwm to esc…

hope my questions is understandable…