CoolinHi Posted September 2, 2021 Share Posted September 2, 2021 so im building a sam missile launcher and want to know how to make my sas aim the turret at a target using servos or rotors as when i tried to use pitch and yaw it wouldn't auto aim Link to comment Share on other sites More sharing options...
Vanamonde Posted September 3, 2021 Share Posted September 3, 2021 I think you will need to figure this out and then tell the rest of us how to do it because I haven't seen it done. Link to comment Share on other sites More sharing options...
swjr-swis Posted September 16, 2021 Share Posted September 16, 2021 (edited) Welcome to the forum! On 9/2/2021 at 4:10 AM, CoolinHi said: so im building a sam missile launcher and want to know how to make my sas aim the turret at a target using servos or rotors as when i tried to use pitch and yaw it wouldn't auto aim KSP doesn't offer us a way to map stock SAS pitch/yaw/roll inputs directly to servo/rotor controls. We can however trick KSP into achieving the same result you're after. We start by creating a 'bucket' attached to a probe core (and an extra reaction wheel), which will contain the payload/device that we want to point-and-track targets. This bucket we then suspend in a set of three rotating gimbals, using servos, and taking care to balance it such that the CoM of empty/full bucket always stays precisely in the intersection of the gimbal centers. We can't directly control the servos to do the steering, so we leave them unlocked and unmotorised. BUT: since we have suspended our device with three degrees of freedom, to the probe core it's as if it's floating freely in space, and its SAS can effortlessly point it at any target and keep tracking it. I created a craft as a proof of concept of this: https://kerbalx.com/swjr-swis/SAM1 Spoiler Notes: There is a risk of 'gimbal lock', where axes can become aligned in the same plane, losing you one degree of freedom. In the time I've tested this, it's not happened to me. But it's possible. KSP's SAS code gets confused when switching away and back to the device, causing a deviation to build up from where it should be pointing. I haven't found a way to solve or prevent this. On 9/3/2021 at 11:35 PM, Vanamonde said: I think you will need to figure this out and then tell the rest of us how to do it because I haven't seen it done. As requested. Edited September 16, 2021 by swjr-swis Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now