Jump to content

Plugin as an exercise in scientific computing


Recommended Posts

Hi everyone,

I'm a physics undergrad who is interested in scientific computing, but only has fairly limited experience coding things in C.

I was wondering how hard it would be to use a KSP plugin to practice the application of numerical methods and scientific computing by making autopilot programs similar to MechJeb.

For example, the ultimate aim might be to make a script that would work out an optimized launch trajectory and then execute it, perhaps while also outputting telemetry to be viewed in an external application.

I have messed about with KOS for a while, but I can't help but feel that if I am going to spend a fair amount of time working on a project like this it might as well be in a language with real-world applicability like C#.

I would have no problems with using MechJeb or other mods' source code to get me started, I wouldn't be planning to distribute my creations anyway as it's just supposed to be a personal project.

Any thoughts on the feasibility of this?

Link to comment
Share on other sites

You could start work by improving the rather simplistic function used to calculate launch trajectories in mechjeb, the code is public.

Most of your needed variables should be located in the unity reference un flightglobals.activevessel. And most of the needed math operations are located in Math. I've found it decently easy to program in C#, learning the libraries used by ksp are a bit harder to learn. As there is very little documentation.

Edited by WaveFunctionP
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...