Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

Enhancement Request: Obtainable vessel data should be identical for self and target. #159

Closed Dunbaratu closed 10 years ago

Dunbaratu commented 10 years ago

What I mean is this: You can get:

Prograde Retrograde Velocity Up North Altitude etc.

For your own vessel.

But you have a totally different set of data about your target. This makes intercept maneuvers to get near the target vessel very messy.

What if all the functions that obtain that information allow you to pass in a vessel handle, which may be yourself or may be your target, and then make a syntax for how to express that in KOS?

For example: target:up or target:north - for these directions where the target is. target:velocity and target:altitude - for where the target is when doing matching interceptions. target:prograde - for the direction the target is headed.

Now, I realize that SOME information will have to return NULL or NaN because the target might not be in the 2.2 km range. But even an object on rails still has a lot of data you can get on the map view for it, so presumably the KSP api must have a way to let you get a hold of that information.

Nivekk commented 10 years ago

Totally agree. This is probably a good candidate for 0.9, it'll give me a chance to fix some things while I'm at it.

Nivekk commented 10 years ago

This is completed!

You can now get VESSEL("name"):PROGRADE for example, or SHIP:PROGRADE to get the prograde of the current vessel, so they're handled the same way.