You're right that would be a much cleaner option. If possible, it might even be able to be varied between multiple options with a slider, or circuit controlled. Unfortunately.... I have absolutely no idea how to do that.
This mod just copy/paste mashups the attack_parameters.turn_range parameter that the flamethrower uses, onto a duplicate of the rocket turret.