kerbinorbiter

KSP - building a falcon guidance system

Recommended Posts

This is my latest and most commiting project, making a SpaceX guidance system in Kerbo Operating System (KOS)

The plan consists of 4 phases:

Phase 1: Create a launch guidance script

Phase 2: Falcon Heavy.

Phase 3: boost back script.

Phase 4: Landing.

So why am i doing this.

to help teach mathematics and physics within the Kerbal universe

CREDITS:

@Kartoffelkuchen for the SpaceX mod

the current KOS developers

and there will be more to come

Phase 1: https://github.com/Kerbinorbiterr/KOS-launch/releases/tag/p1

This is my most complex script to date i hope you enjoy and if you have any suggestions ill look into it!

licence under All rights reserved (as its a script for education) HOWEVER because its for education If you ask you can redistrubute 

UPDATE:

so ive dived into the source code for Mech jeb for ideas on the landing burn...seems complex *puts at bottom of pile which may or may not include a big mod* :wink: 

Edited by kerbinorbiter

Share this post


Link to post
Share on other sites

Oh nice! Best of luck in your endeavors!

Share this post


Link to post
Share on other sites

Nice script !

The landing part will not be the easiest, especially if you want to land exactly on the launchpad, so good luck ! :wink:

Here is a script I'm currently working on that performs an hoverslam and lands automatically the rocket. But I haven't managed yet to control where I am landing.

https://gist.github.com/HerrCraziDev/468a832395a427a3283a6b1b2b54a469

Share this post


Link to post
Share on other sites
50 minutes ago, HerrCrazi said:

Nice script !

The landing part will not be the easiest, especially if you want to land exactly on the launchpad, so good luck ! :wink:

Here is a script I'm currently working on that performs an hoverslam and lands automatically the rocket. But I haven't managed yet to control where I am landing.

https://gist.github.com/HerrCraziDev/468a832395a427a3283a6b1b2b54a469

It wont control where you land as because KOS is consistant it shouldnt need that capability

Share this post


Link to post
Share on other sites

kOS is consistent but the floating-point system isn't and your landing position may vary significantly between two similar launches. But anyway, being able to land back exactly on the lauchpad would be a great improvement for this script.

 

Share this post


Link to post
Share on other sites
32 minutes ago, HerrCrazi said:

kOS is consistent but the floating-point system isn't and your landing position may vary significantly between two similar launches. But anyway, being able to land back exactly on the lauchpad would be a great improvement for this script.

 

I agree yet one of the conplex matters that would need to be discovered is to either have a consistant atmospheric model with drag SIMULATED before descent (which is practically impossable) unless KPRC is being used and also that the vehicles height is told to the cotroll unit which could be hard coded into KSP to be called by KOS, there is away as i know SpaceX uses KSP for its simulations its just that they probobly have the coding system of their language into the game like KOS yet back to the point, its imposssbale to simulate a descent but an acscent because a descent is unpredictable and an acsejt usualy is although a degree of accuracy is possable but not total acuracy i try to come up with rules for landing at a certain altitude yet there may be away to calculate whare you are using Pi and Epoch as we can calculate distances with equations so...a primitive prediction can be made or just look at the physics system internaly? 

Also can you explain the variables in your script?

Edited by kerbinorbiter

Share this post


Link to post
Share on other sites

Actually you could use the game itself to facilitate landing prediction, it wouldn't be nice or clean, but a statistical run through of re-entries with different ships and steepness, from clean to lots of wings, could give you a range of values, along with total of the drag cubes, you could end up with a prediction curve, It should be able to get you within striking range of a powered descent to the pad.

Share this post


Link to post
Share on other sites
20 minutes ago, selfish_meme said:

Actually you could use the game itself to facilitate landing prediction, it wouldn't be nice or clean, but a statistical run through of re-entries with different ships and steepness, from clean to lots of wings, could give you a range of values, along with total of the drag cubes, you could end up with a prediction curve, It should be able to get you within striking range of a powered descent to the pad.

hmmm interesting, explain?

Share this post


Link to post
Share on other sites
23 minutes ago, kerbinorbiter said:

hmmm interesting, explain?

Similar to what this guy did, but in reverse, have a few ships, big, small, clean, winged, pick a few re-entries, steep, optimal, shallow. Add up the total of the drag cubes of the parts. Then perform a lot of automated re-entries to build a baseline. You should end up with some values for different craft, hopefully with a low enough error component that can be corrected in-flight to get you to the ground close to target. The trajectories mod is another mod to look.

Edit: that's not actually the chart I was looking for, another guy did multiple launches looking for optimal gravity turn, this was it, I see he used kRPC

 

Edited by selfish_meme

Share this post


Link to post
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.