Comments (4)
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.
"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.
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.
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)
- No way to read current nodeless encounter. HOT 1
- UNTIL will break at first chance. HOT 4
- v0.9.2 INLIGHT returns false negatives. HOT 1
- v0.9.2 kOS doesn't detect the reference transform has changed when the ship splits. HOT 4
- v0.9.2 alt:radar returns altitude when "too high" HOT 6
- Add page up + down to console editor
- if (encounter == encounter) { ... }. // can't compare orbitinfo to orbitinfo ... HOT 2
- Not working scripts HOT 4
- [Suggestion] Add ability to change max throttle of engines HOT 6
- Custom filetype HOT 5
- Prograde angles wrong below 70,000M on Kerbin. HOT 9
- Can't focus on kOS Terminal HOT 4
- Some kind of autoexec [enhancement] HOT 2
- Request: ISO-8601 time format HOT 1
- LIST FILES IN var. Does not work. HOT 3
- SHIP:FACING:PITCH supplying wrong values HOT 1
- setting node:eta does not do anything
- Terminal won't open HOT 1
- Add tab to KSC
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kos.