MaverickWoe
Members-
Posts
21 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by MaverickWoe
-
Why gravity is offseted in KSP ?
MaverickWoe replied to MaverickWoe's topic in Science & Spaceflight
Oh ! I think I get it. Wouldn't "g" be an expression of the gravity in the rotating frame of reference ? so that all coriolis, centripetal and Euler Forces would be inserted in this fake gravity coefficient ? So you have m * angularVelocity² x radiusToAxis for the the centrifugal force you already mentioned RCgothic but also other terms like: coriolis : m * 2 * angularVelocity x speed Euler : m * angularAcceleration x radiusToAxis So all the silly variations I see must be Coriolis and Euler expressed into g, hence why g is a vector and may not point toward the center of Kerbin in the game. Eureka Nice -
Why gravity is offseted in KSP ?
MaverickWoe replied to MaverickWoe's topic in Science & Spaceflight
you might find this graph interesting. I compared the theoretical g computation given g = KerbinGravParameter / (KerbinRadius + Altitude)² with the one the game was outputing directly. And I absolutely cannot understand why there is such a complex difference... Why would the gravity in the game be affected my the behaviour of the rocket ?! Oh, thanks for doing the computation again. I thought the days were 24h on Kerbin. Thanks for double checking. Though, it still doesn't explain the weird graph above. Why would apparent gravity change depending on the direction of fall or the thrust ? -
Hey all I'm working with a student on KSP as a sandbox for controls because it's a rather complete simulator. Though, I just discovered that the game was outputting a gravity of roughly 9.75 m²/s near the launch pad ( 5 - 6 meters above sea level). Whereas, when I calculate the gravity at the same location, using the game's data of Kerbin, I will find roughly 9.80 m²/s. Does anyone know why the gravity is lower than expected. It doesn't look like much but I need to be precise for something. I could be reducing the mass or increasing the radius in the formula but I'm not sure why there is this offset. g = KerbinGravParameter / (KerbinRadius + Altitude)² Those are directly extracted from the Kerbin celestial object within the game, so I assume they are supposedly accurate. I initially thought that this could maybe come from the centripetal acceleration but a quick computation shows me it would only be 0.0031 m²/s with Kerbin's dimensions, far from the 0.05 I'm looking for. I also checked if it could be an influence of the Mun. But similarly, it would only account for 0.0004 m²/s in KSP. Any idea would be nice to hear or if you know anything about that in the game.
-
Hey all Just wanted to share the reproduction of SpaceX's Starship mission, including the bellyflop. Just in time after the first succesful mission of yesterday night. Congrats SpaceX !
- 1 reply
-
- 1
-
Hi I've been successfully adjusting lift coefficient of wings while running a mod I've been working on by using ModuleControlSurface.deflectionLiftCoeff = float and I'm now looking to change the drag of the part in the same way. Up to now, I fail to find any property that works the same way and, maybe I'm wrong, but it looks like I would need to update all the drag cubes associated with the part ? Am I correct ? Did anyone previously modified the drag in a mod and could confirm the method ? The drag cubes look a bit painful to use and I was hoping I missed an obvious property. Thanks for the help
-
Ah, damnit. Despite the wing being at the right angle. It seems that the aero forces are not following / not taking in account the modified angle. I wonder what I forgot. Do you know if I need to reimplement something so that the angle is taken into consideration ? I thought the rotation would suffice
-
Thanks wasml. Sorry, I didn't see your notification. I couldn't get access to the control surface when using the part. It was not accessible from outside. So, I think I found out and it's much more indirect than I thought. I have to implement a new class inheriting from ModuleControlSurface. By doing so, you can overwrite the method CtrlSurfaceUpdate(Vector3 velocity) inside which you have access to the vector ctrlSurface.localRotation At the game loading, you have to replace all Parts that implement ModuleControlSurface so that they implement this new class instead and now I can now change the angle of the wings at will with my own laws. So indirect, but finally found out.
-
Hey people. First, sorry for the wing vocabulary, I'm not entirely sure I'm using it right. I'd like to understand if it is possible to take control, through the API, of the angle of a controllable air surface without using the Flight control Pitch / Yaw / Roll inputs. Is there a way to directly set an angle on any controllable flap/wing ? I see that I can fetch the result of the drag and lift vectors (liftForce & dragForce of ModuleLiftingSurface) which is great, but can't see any input. (It is not the deploy feature I think) I'm also slightly confused between the class ModuleLiftingSurface, ModuleControlSurface and ModuleAeroSurface and not sure if one of those three allows to do what I'm looking for. Anyone is familiar with what I'm looking for ?
-
Question on GUILayout Repaint Event
MaverickWoe replied to MaverickWoe's topic in KSP1 C# Plugin Development Help and Support
Thanks Hebaru You were right, I was focusing on the wrong problem, the update of the array was broken. My bad I'll also look into the DialogGUI if its easier on the CPU, thanks for pointing it out. -
Hi all. I'm new in the KSP modding and Unity hooks too and I was hoping you could help on something I cannot understand. I'm trying to build a layout window using GUILayout class on which I want to draw a simple graph / curve. public void OnGUI() { // Register the window. Notice the 3rd parameter logWindowPos = GUILayout.Window(GetType().FullName.GetHashCode(), logWindowPos, WindowGUI, "Landing Control", GUILayout.Width(logWindowPos.width), GUILayout.Height(logWindowPos.height)); } protected void WindowGUI(int windowID) { GUILayout.BeginVertical(); GUILayout.Box(Texture2D.blackTexture, GUILayout.Width(200), GUILayout.Height(200)); Rect graphBoxRect = GUILayoutUtility.GetLastRect(); GUILayout.EndVertical(); GUI.DragWindow(); if (Event.current.type == EventType.Repaint) { if (graphData.Length > 1) for (int i = 0; i < graphData.Length - 1; i++) { Drawing.DrawLine( new Vector2(graphBoxRect.xMin + graphData[i].x , graphBoxRect.yMax - graphData[i].y ), new Vector2(graphBoxRect.xMin + graphData[i + 1].x , graphBoxRect.yMax - graphData[i + 1].y ), Color.white, 2, true); } } } It draws what I want and I can see the white lines as expected. The window is dragable etc. Though the thing that eludes me is that I don't know how to force a redraw / repaint of the window when I add a dot to the curve. How do you force a redraw of a GUILayout window ? I suppose clicking on a toggle button in it may call a repaint but what if there is no control and you want it to refresh from outside ? I've been unable to find a method or a variable to set to let the engine know. Support greatly appreciated, thanks.