Jump to content

Trajectories API for kOS


Recommended Posts

I'm trying to write a boostback script for my Falcon 9 in kOS, which points in the right direction, fires it's engines for some time until the impact position is over a certain target. This requires Trajectories to work with kOS but I can't get it to. I found out that trajectories only works with kOS in the 1.7.x versions but those versions don't work with my KSP and I can't see my trajectory and impact position. I have the right kOS version and all but I can't get it to work with trajectories. Any idea on how to fix this? Thanks!

KSP 1.4.1

Link to comment
Share on other sites

Which version of kOS do you have?  I'm not sure I could find a solution, but I could at least look into it.

 

That being said, in the past I also worked on a similar script, and I found that the Trajectories mod wasn't really necessary.  Actually I didn't even need true orbital mechanics.  The script just estimated the impact point with a basic zero-drag, constant-gravity parabolic trajectory assumption.  When I originally implemented it, it was sort of a "for the giggles" thing, and I fully expected it to fail horribly.  Imagine my surprise when my booster actually ended up somewhere near the target!

I won't bore you with the details, but whether you use Trajectories or not, there will be errors in your trajectory on the way back.  You're going to have to steer (mostly using aerodynamics) during the descent, no matter how precise your boostback burn is.  That steering should* give you some good leeway in terms of how you predict your trajectory, so don't feel trapped into needing Trajectories.**

*Just how much leeway may depend on how lifty/draggy your rocket is and if you're using Realism Overhaul, relatively small errors could cause big problems

**If you can figure out the compatibility issue, by all means use it if you like.  But keep in mind that it's one more thing that might break in your script with an update.

Link to comment
Share on other sites

I have kOS version v1.1.5.2 and run it with my KSP 1.4.1 with making history. I'll have to write the gridfin steering code so i can (hopefully) land somewhere close to the target. The entry burn and hoverslam landing script is already done, that was easy...of course i can manually point it at a specific location but when i'm doing FH double booster landings this becomes a little problem...

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...