Giter Club home page Giter Club logo

Comments (4)

adammada avatar adammada commented on July 18, 2024

I wrote plugin which did that (now abandoned) - and KSP don't have simple internal function to do it. So it have to be code from other plugin, like Protractor (is on GPL3), but i see that currently soruce is missing.

http://forum.kerbalspaceprogram.com/threads/21544-22-Protractor-Rendezvous-Plugin-v-2-4-3

But i think that much better would be some function to get Planet position at certain time and your position at certain time. Those are simple functions in KSP, just need mapping.

That way you can build your own code to find closest approach, and also do other stuff.

from kos.

baloan avatar baloan commented on July 18, 2024

"Either you're close enough". I reckon KSP calls it an encounter when you enter the bodies SOI.
Btw, I am working on a method/script to calculate Hohmann tranfers - at least in 2D, and yes, it should be possible to calculate orbital angles as a function of time. I don't know yet how accurate it will be. I will want to choose a trajectory which comes closer than the SOI to make it work.
Full 3D will only be possible when there is access to the ships and bodies' ephemeris data in the script. I am wondering how this is handled in KSP as every time a ship comes closer to 100km of a body the frame of reference is changing.

from kos.

Dunbaratu avatar Dunbaratu commented on July 18, 2024

The problem with Hohmann transfers is that they presume you start from a circular orbit and are going to meet a body that is on a circular orbit. They don't work for the general case where your target body can be a planet in an eccentric ellipse.

from kos.

MaHuJa avatar MaHuJa commented on July 18, 2024

Another reason for this is when you're trying to approach a different vessel in orbit around the same body as you are. There won't even be an "encounter" in that case.

The simplest method would probably be that you select your target, and ask for closest approach, where it goes along all the conics (as it does when finding what you're encountering) and running some code (e.g. ripped from mechjeb) that tells you about your closest encounter, returning the result to the user.

from kos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.