Guest Posted October 13, 2014 Share Posted October 13, 2014 (edited) This mod is no longer available for download. Edited October 26, 2014 by regex Link to comment Share on other sites More sharing options...
Crzyrndm Posted October 13, 2014 Share Posted October 13, 2014 (edited) Surprisingly, clamp appears to be a general time constant (I would have sworn it was going to be some form of anti-integral windup). That would make the response equation something like: PID_r = (Kp * e + Ki * SumOf(e) - Kd * e') / clamp. (EDIT: Confirming that all factors are linearly related or very close to it. 10:2:2:1 <==> 10k:2k:2k:1k). Decreasing clamp allows more violent responses, increasing it slows responses. Increasing it slightly is likely to be the easiest way of getting rid of the "speed wobbles" (haven't tested that yet, just hypothesising).Note for anyone using this with planes, a small amount of Ki on the pitch axis will resolve the nose drifting up/down after releasing the controls (there will be a small drift down but it will correct itself back to the original point after a while). Don't understand why stock settings have it completely zeroed.if(GUILayout.Button("Commit")) { if(pitch.proper() && roll.proper() && yaw.proper()) { CommitChanges(pitch.buildPIDclamp(), roll.buildPIDclamp(), yaw.buildPIDclamp()); [COLOR="#FF0000"]GUI.FocusControl("Commit"); // Remove focus from textbox which otherwise causes issues GUI.UnfocusWindow(); // Return focus to game[/COLOR] }}Adding these two lines to the commit button function would be a really great help. I found myself adding "wasd" characters very frequently after commiting a tweak since the text box remains focused. Edited October 13, 2014 by Crzyrndm Link to comment Share on other sites More sharing options...
Guest Posted October 13, 2014 Share Posted October 13, 2014 Adding these two lines to the commit button function would be a really great help. I found myself adding "wasd" characters very frequently after commiting a tweak since the text box remains focused.Next version, thanks for the tip! Link to comment Share on other sites More sharing options...
Camacha Posted October 13, 2014 Share Posted October 13, 2014 (edited) Ah, I noticed some people were having trouble with SAS in 0.25. This could be useful, though my experience with PID-controllers tells me that not everyone will be able to get useful results. You might want to warn people about that edit: warn people more Tuning can be a real pain.Surprisingly, clamp appears to be a general time constant (I would have sworn it was going to be some form of anti-integral windup)I would have said to too, that is surprising indeed.(EDIT: Confirming that all factors are linearly related or very close to it. 10:2:2:1 <==> 10k:2k:2k:1k).What do you mean by this? Is this something about PID in general or KSP? Edited October 13, 2014 by Camacha Link to comment Share on other sites More sharing options...
SolarSailor Posted October 13, 2014 Share Posted October 13, 2014 Oh, someone finally did this. Thanks a million! There's no need to use overbloated Mechjeb for such a simple thing anymore. Link to comment Share on other sites More sharing options...
Guest Posted October 13, 2014 Share Posted October 13, 2014 This could be useful, though my experience with PID-controllers tells me that not everyone will be able to get useful results. You might want to warn people about that edit: warn people more Tuning can be a real pain.Why? People can play around all they want and, besides, if 0.24 Windows x64 taught us anything it's that people don't read OPs. Link to comment Share on other sites More sharing options...
Camacha Posted October 13, 2014 Share Posted October 13, 2014 (edited) Why? People can play around all they want and, besides, if 0.24 Windows x64 taught us anything it's that people don't read OPs.Why it can be a pain you mean? The interaction between the different factors can be rather complex and if you start out with full PID, rather than PI or PD it does not make life easier. People can try though, it sure can be educational. It might be useful to know that setting a value to 0 also eliminates it from the PID formula, so folks can create a PI and PD controller with your mod to make it a little easier on themselves. Most controllers in real life don't bother with all three PID terms, as they are often not all needed. It is probably rather telling that correctly tuning controllers is a real business and methods like Ziegler-Nichols and Cohen-Coon have been developed.In respects to the OP remark - fair enough! That leaves me just one question: where did those trees at the end of the runway come from in the OP picture? That looks like another airstrip. Edited October 13, 2014 by Camacha Link to comment Share on other sites More sharing options...
Guest Posted October 13, 2014 Share Posted October 13, 2014 Why it can be a pain you mean?No, I mean regarding warning people more. Anyway, once I get the global and game presets in you'll be able to reset to default when needed, which makes the point a bit moot, IMO.where did those trees at the end of the runway come from in the OP picture? That looks like another airstrip.I'm using a 1.75x Kerbin RSS config with the 6.4x launch sites file. That's the Olemek site, IIRC. Link to comment Share on other sites More sharing options...
Camacha Posted October 13, 2014 Share Posted October 13, 2014 Anyway, once I get the global and game presets in you'll be able to reset to default when needed, which makes the point a bit moot, IMO.Yes, I agree. 'Here be dragons and a reset button, good luck!' Link to comment Share on other sites More sharing options...
Crzyrndm Posted October 14, 2014 Share Posted October 14, 2014 What do you mean by this? Is this something about PID in general or KSP?Just me testing to see if my theory of clamp being a simple general time constant held up. There was always the possibility of it being a non-linear factor of some sort (which would result in a constant scaling factor giving noticeably different results). It doesn't apply to general PID because you don't normally use a general factor like that, or atleast I don't (because it's entirely redundant).On a side note, going to have to see about making the attitude hold less prone to sliding over time (the target getting slowly dragged towards the current heading while under SAS control only). The ability to tune the SAS response just makes it even more obvious... Link to comment Share on other sites More sharing options...
Voculus Posted October 20, 2014 Share Posted October 20, 2014 EDIT: One of these days, I'll learn how to read! You're already working on the the things I was wishing for. Thanks again for this mod. Link to comment Share on other sites More sharing options...
Guest Posted October 20, 2014 Share Posted October 20, 2014 (edited) EDIT: One of these days, I'll learn how to read! You're already working on the the things I was wishing for. I'm hoping sometime this week, no promises.E: Turns out TriggerAu has some fantastic tools that will make my life much easier. Thankfully, he licensed them under an actual "I truly want to share this" license and not a "viral socialism" license! Edited October 20, 2014 by regex Link to comment Share on other sites More sharing options...
Voculus Posted October 21, 2014 Share Posted October 21, 2014 Thankfully, he licensed them under an actual "I truly want to share this" license and not a "viral socialism" license!LOL! Can't wait! Link to comment Share on other sites More sharing options...
Sledge Posted October 22, 2014 Share Posted October 22, 2014 What is the meaning of the default values? The WP article uses much smaller numbers in its examples. I'm trying to understand what the system would call a small change and what is a large change. Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2014 Share Posted October 23, 2014 What is the meaning of the default values? The WP article uses much smaller numbers in its examples. I'm trying to understand what the system would call a small change and what is a large change.Probably just a matter of scale allowing finer tuning. The end result will be the same for a given set of values or 1/10th of that same given set of values, AFAIK. That being said, I just exposed the values for tweaking; I'm no expert on their use. Link to comment Share on other sites More sharing options...
Recommended Posts