{"action":"created","issue":{"url":"https://api.github.com/repos/Swamp-Ig/ProceduralParts/issues/176","labels_url":"https://api.github.com/repos/Swamp-Ig/ProceduralParts/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/Swamp-Ig/ProceduralParts/issues/176/comments","events_url":"https://api.github.com/repos/Swamp-Ig/ProceduralParts/issues/176/events","html_url":"https://github.com/Swamp-Ig/ProceduralParts/issues/176","id":117624105,"number":176,"title":"Thrust/BurnTime/Fuelflow incorrect when multiple SRBs on vehicle with ModularEngines, also Division by zero","user":{"login":"CorvusCorax","id":569222,"avatar_url":"https://avatars.githubusercontent.com/u/569222?v=3","gravatar_id":"","url":"https://api.github.com/users/CorvusCorax","html_url":"https://github.com/CorvusCorax","followers_url":"https://api.github.com/users/CorvusCorax/followers","following_url":"https://api.github.com/users/CorvusCorax/following{/other_user}","gists_url":"https://api.github.com/users/CorvusCorax/gists{/gist_id}","starred_url":"https://api.github.com/users/CorvusCorax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorvusCorax/subscriptions","organizations_url":"https://api.github.com/users/CorvusCorax/orgs","repos_url":"https://api.github.com/users/CorvusCorax/repos","events_url":"https://api.github.com/users/CorvusCorax/events{/privacy}","received_events_url":"https://api.github.com/users/CorvusCorax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-18T16:26:22Z","updated_at":"2015-11-19T23:11:13Z","closed_at":null,"body":"Hi, I am playing with procedural parts as part of RealismOverhaul in 1.0.4\r\n\r\nI have a bug with Procedural SRBs - to be exact the item named \"Solid Rocket Motor [Procedural]\" when Realism Overhaul (v10.5.0) is installed on top of Procedural parts (1.1.7) (which is a dependency)\r\nThe very same bug can also be reproduces with the item named \"Procedural Real Fuels SRB\" when Real Fuels (rfv10.7.2) + Stockalike RF Configs (v3.0.0) is installed on top of Procedural parts (1.1.7)\r\n\r\nThe bug does not affect the Procedural SRB named \"Procedural SRB\" that is available when Procedural parts only are installed-\r\n\r\nIn the default Procedural SRB the user can specify the engine Thrust in kN. This seems to work for any number of SRBs on the vehicle independenlty.\r\n\r\nIn the Solid Rocket Motor [Procedural] and Procedural Real Fuels SRB the user instead specifies the burn time, which is flawed when more than one SRB is used in the same vehicle\r\n\r\nIf multiple SRB's are stacked with different configured burn times, then they always seem to have the same fuel consumption, usually leading to a massive increase in thrust and decrease in burn time for the upper stage:\r\n\r\nHow to reproduce:\r\n1. Build a two stage rocket with either \"Realism Overhaul\" or \"Real Fuels + Stockalike RF Configs\" and their dependencies installed on top of Procedural parts\r\n2. Have the upper stage with a small (for example 2m x 0.4m cylinder SRB) with a long burn time (for example 120 seconds) (should barely be able to lift a stayputnik core) and optionally some stabilization fins\r\n3. Have the lower stage with a significantly larger SRB ( 3m x 1m cylinder SRB) with a short burn time (for example 15 seconds) and optionally some stabilization fins\r\n4. Put the thing on the launch pad\r\n\r\nExpected outcome:\r\nWhen launching and staging or manually activating any engine in the stack, the lower stage should produce massive thrust for 15 seconds, the upper stage should produce low thrust for 120 seconds\r\n\r\nActual outcome:\r\nEven though correct low thrust forces are displayed in the engine UI in the VAB, the upper stage will actually burn for a very short time (like 2 seconds) with thrust and fuel consumption matching the rates set for the lower stage! Especially when the difference in booster size is significant this can lead to burn times of under 1 second on the smaller one.\r\nA burn time of under 1000 ms on a SRB is IMHO no longer considered a booster - its a shaped explosive charge Especially if it was supposed to last for much longer.\r\n\r\nIs this a bug in Real Fuels or a bug in Procedural parts?\r\n\r\nNo other SRBs seem to be affected, but then again no other SRBs have configurable burn times/thrust\r\n\r\n- - - Updated - - -\r\n\r\nOn having a glance into ProceduralSRB.cs and seeing the mess with the different code branches for \"UsingME\" versus \"!UsingME\" - I am pretty convinced - although of course not certain - that the bug is somewhere here.\r\n\r\nAlso I noticed that when SRBs are assigned to an engine group, one can apparently change their thrust on the fly by altering the modular engines group slider - even though SRB's are supposed to have constant thrust. Is that intended?\r\n\r\n- - - Updated - - -\r\n\r\nIn function UpdateEngineAndBellScale() , part.GetComponent<ModuleEngines>().maxFuelFlow = fuelRate; - even though fuelRate is never set if UsingME is true (all such lines are commented out)\r\n\r\nAlso in function UpdateBurnTime() a division by fuelRate becomes a division by zero - causing \"Infinity\" to be displayed as expected burntime when in flight. "},"comment":{"url":"https://api.github.com/repos/Swamp-Ig/ProceduralParts/issues/comments/158229557","html_url":"https://github.com/Swamp-Ig/ProceduralParts/issues/176#issuecomment-158229557","issue_url":"https://api.github.com/repos/Swamp-Ig/ProceduralParts/issues/176","id":158229557,"user":{"login":"NathanKell","id":5144098,"avatar_url":"https://avatars.githubusercontent.com/u/5144098?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanKell","html_url":"https://github.com/NathanKell","followers_url":"https://api.github.com/users/NathanKell/followers","following_url":"https://api.github.com/users/NathanKell/following{/other_user}","gists_url":"https://api.github.com/users/NathanKell/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanKell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanKell/subscriptions","organizations_url":"https://api.github.com/users/NathanKell/orgs","repos_url":"https://api.github.com/users/NathanKell/repos","events_url":"https://api.github.com/users/NathanKell/events{/privacy}","received_events_url":"https://api.github.com/users/NathanKell/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T23:11:13Z","updated_at":"2015-11-19T23:11:13Z","body":"G does seem to be used (engine.G is 9.80665)."}}