# The_Duck

Members

291

## Community Reputation

29 Excellent

• Rank
Sr. Spacecraft Engineer

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## Suicide Burn Code

Hah, this is my code. It took me a whlile to figure out what it's doing. I think this is the idea, if anyone's still interested: The tricky line is double effectiveDecel = 0.5 * (-2 * g * sine + Math.Sqrt((2 * g * sine) * (2 * g * sine) + 4 * (T * T - g * g))); where we defined double sine = Math.Sin(angleFromHorizontal * UtilMath.Deg2Rad); effectiveDecel could be rewritten more simply as double effectiveDecel = -g * sine + Math.Sqrt(T*T - (g*cosine)*(g*cosine)); where cosine = Math.cos(angleFromHorizontal * UtilMath.Deg2Rad) (I wonder why I didn't do that in the

3. ## Documentation for API

Hi guys-- sorry for abandoning the Github documentation project. I haven't spent time on KSP in quite a while. You're of course free to fork it. Let me know if you need explanations of how I built the XML and HTML docs from the .cs files.
4. ## [PART, 1.0.2] Anatid Robotics / MuMech - MechJeb - Autopilot - Historical thread

The reason is the following. Corrective steering tries to control the direction of your velocity so that you fly along the given ascent path. But should it use orbital velocity or surface velocity? It ends up using a weighted average of the two that shifts over the course of the flight, so that it starts out controlling surface velocity and gradually switches over to using orbital velocity. But orbital velocity already starts somewhat "pitched over" so this can cause MJ to seem to delay the pitchover past the given "turn start" altitude, since it feels that it is already somewhat pitched over.
5. ## The official unoffical "help a fellow plugin developer" thread

Probably you need to look for the ModuleCommand PartModule and check its minimumCrew field. Presumably the vessel is controllable if at least one part with a ModuleCommand module has a number of crew greater than or equal to its minimumCrew. See the part.cfg files for the existing command pods.
6. ## [RESOLVED] How to Add Callback for onEditorShipModified

myFunction needs to take a ShipConstruct: private void myFunction(ShipConstruct sc) { } If an argument needs an EventData<T>.OnEvent, what it needs is a function that takes a T and returns void. See the declaration of the EventData<T>.OnEvent delegate type here. See here for some documentation on GameEvents.
7. ## Getting total weight of vehicle in the VAB/SPH

Or, more simply, part.mass + part.GetResourceMass().
8. ## Documentation for the KSP API

Look, what do you think the point of the EULA is? It's not to prevent modders from learning how to write plugins. The EULA clause you are referring to is to protect the private *implementation* of KSP itself. KSP is a game intended to be modded. It's not an accident that KSP loads any assembly you put in the GameData folder; it's a feature that was added so that people could write plugins. Squad originally had some intention of publishing some documentation for the KSP public interface, but never got around to doing so (understandably: it would be a big task and it would take a ton of time awa
9. ## [RESOLVED] How to Get the Part that PartModule is Attached to?

You're probably making this too complicated. Why do you need the "thisPart" field at all? It's not doing anything for you that the "part" field doesn't already do.
10. ## Documentation for the KSP API

This documentation is based on experience and trial and error using the public interfaces available in the KSP assemblies, not decompilation.
11. ## ArgumentOutOfRangeException: Argument is out of range. Parameter name: index

Probably this is off-base, but what if you try to place the maneuver node a bit in the future, instead of right at the present? E.g.: double ut = Planetarium.GetUniversalTime() + 10;
12. ## [PART, 1.0.2] Anatid Robotics / MuMech - MechJeb - Autopilot - Historical thread

So there are other errors. Can you upload the whole log somewhere so we can see what they are?
13. ## [PART, 1.0.2] Anatid Robotics / MuMech - MechJeb - Autopilot - Historical thread

Are there other error messages too? Perhaps you can upload the full log somewhere? I can fix this particular error message but it shouldn't be causing the problems you are reporting. I'm guessing this error message is the result of some other problem, which may or may not be caused by MechJeb.
14. ## The official unoffical "help a fellow plugin developer" thread

Make sure your project targets .NET 3.5 (it's in the project options in VS). Does that method exist in .NET 3.5?
15. ## EditorLogic.SortedShipList, EditorLogic.fetch.ship.parts etc. which one to use?

The forum post for the project was recently stickied: http://forum.kerbalspaceprogram.com/threads/30401-Documentation-for-the-KSP-API
×
×
• Create New...