{"action":"created","issue":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1666","repository_url":"https://api.github.com/repos/KSP-KOS/KOS","labels_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1666/labels{/name}","comments_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1666/comments","events_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1666/events","html_url":"https://github.com/KSP-KOS/KOS/issues/1666","id":158801602,"number":1666,"title":"GetPotentialTorque can receive negative values, breaks cooked steering","user":{"login":"Majromax","id":19787224,"avatar_url":"https://avatars.githubusercontent.com/u/19787224?v=3","gravatar_id":"","url":"https://api.github.com/users/Majromax","html_url":"https://github.com/Majromax","followers_url":"https://api.github.com/users/Majromax/followers","following_url":"https://api.github.com/users/Majromax/following{/other_user}","gists_url":"https://api.github.com/users/Majromax/gists{/gist_id}","starred_url":"https://api.github.com/users/Majromax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Majromax/subscriptions","organizations_url":"https://api.github.com/users/Majromax/orgs","repos_url":"https://api.github.com/users/Majromax/repos","events_url":"https://api.github.com/users/Majromax/events{/privacy}","received_events_url":"https://api.github.com/users/Majromax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-06T23:58:38Z","updated_at":"2016-11-01T20:34:15Z","closed_at":null,"body":"As previously mentioned on [Reddit](https://www.reddit.com/r/Kos/comments/4mocue/bad_cooked_steering_with_far/), with FAR integration (v0.15.6.5) aerodynamic control surfaces can apparently return negative values to GetPotentialTorque.  This causes the cooked steering manager to calculate negative raw torque values, which threshold to the don't-divide-by-zero epsilon value.\n\nExample of this problem on a sounding rocket, from CSV steering output (\"lock steering to up.\"): \n![image](https://cloud.githubusercontent.com/assets/19787224/15841611/99309684-2c20-11e6-8c84-6f146fcb5d27.png)\n\nVersus \"correct\" behaviour with FAR disabled: \n![image](https://cloud.githubusercontent.com/assets/19787224/15841621/ae3edb8a-2c20-11e6-93b0-b468de3d4585.png)\n\n(Although bear in mind that the stock control surfaces apparently return extremely erratic values.  This is bad for cooked steering stability, but in a more benign and definitely-not-kOS-bug way.)\n\nThis may be a bug with FAR's specification of those values, but [MechJeb](https://github.com/MuMech/MechJeb2/blob/master/MechJeb2/VesselState.cs#L792) uses the absolute value of returned torques for its own calculations.\n"},"comment":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/comments/257687028","html_url":"https://github.com/KSP-KOS/KOS/issues/1666#issuecomment-257687028","issue_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1666","id":257687028,"user":{"login":"hvacengi","id":2975036,"avatar_url":"https://avatars.githubusercontent.com/u/2975036?v=3","gravatar_id":"","url":"https://api.github.com/users/hvacengi","html_url":"https://github.com/hvacengi","followers_url":"https://api.github.com/users/hvacengi/followers","following_url":"https://api.github.com/users/hvacengi/following{/other_user}","gists_url":"https://api.github.com/users/hvacengi/gists{/gist_id}","starred_url":"https://api.github.com/users/hvacengi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvacengi/subscriptions","organizations_url":"https://api.github.com/users/hvacengi/orgs","repos_url":"https://api.github.com/users/hvacengi/repos","events_url":"https://api.github.com/users/hvacengi/events{/privacy}","received_events_url":"https://api.github.com/users/hvacengi/received_events","type":"User","site_admin":false},"created_at":"2016-11-01T20:34:15Z","updated_at":"2016-11-01T20:34:15Z","body":"@Majromax I don't think FAR is updated officially for KSP 1.2.0 yet, but I actually ended up having to add the absolute value fix to the new implementation because stock was spitting out negative values, and I had to incorporate some averaging (because a part may cause asymmetric torque, and that's an easy way to account for it).  Once you're able to, could you test with the latest FAR to make sure we seem to be working better?"}}
{"actor":{"display_login":"hvacengi"}}