Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Implemented] Make GUI attitude settings settable in the API #82

Closed
npyoung opened this issue Dec 6, 2016 · 8 comments
Closed

[Implemented] Make GUI attitude settings settable in the API #82

npyoung opened this issue Dec 6, 2016 · 8 comments

Comments

@npyoung
Copy link

npyoung commented Dec 6, 2016

This improvement is mainly inspired by kOS's Trajectories Addon. Right now this addon only has access to the functions provided by the Trajectories API, which means a kOS user much manually tug around sliders in the Trajectories GUI before using the predictions. Exposing the attitude settings in the API would allow kOS users to programmatically set the planned attitude at each point in the descent, enabling complete automation, and maybe even better integration with other mods.

@fat-lobyte fat-lobyte added this to the v1.6.7 milestone Apr 10, 2017
@fat-lobyte
Copy link
Collaborator

fat-lobyte commented Apr 10, 2017

@npyoung Before I do some work on this, I wanted to ask: is there still interest in this?

Could you have a look at the file Plugin/DescentProfile.cs and tell me what you need exposed?

I was thinking of a struct within Trajectories.API called "DescentProfileNode" which would be similar to Trajectories.DescentProfile.Node. Something like this:

struct DescentProfileNode {
            public double angle; // in radians
            public bool horizon; // if true, angle is relative to horizon, otherwise it's relative to velocity (i.e. angle of attack)
}

And in the API, there would be one function that takes four of these:

void setDescentProfile(DescentProfileNode entryNode, DescentProfileNode highNode, DescentProfileNode lowNode, DescentProfileNode finalNode);

Does this work for you?

Preferrably, could you (or some other kOS person) submit a Pull Request? That would be really condusive to exposing what you need.

@fat-lobyte fat-lobyte removed this from the v1.6.7 milestone Jun 13, 2017
@darkbushido
Copy link

darkbushido commented Jul 16, 2017

I was about to submit a request to be able to set pro/retro from KOS. I assume this would do the same thing?

@fat-lobyte
Copy link
Collaborator

I was about to submit a request to be able to set pro/retro from KOS. I assume this would do the same thing?

Yes it would, but before doing anything I would like to have a little discussion with the KOS people who would implement it on the KOS side and the people who would use it in their scripts about what is actually needed and how to best design the API.

But unfortunately, @npyoung has since disappeared. Hence the "needinfo" label.

@PiezPiedPy
Copy link
Contributor

Just a heads up, I'm currently working on this 😉

@PiezPiedPy
Copy link
Contributor

PiezPiedPy commented Apr 2, 2018

Added properties into the API, called them ProgradeEntry and RetrogradeEntry

@darkbushido I've made a PR into kOS that will hopefully make it into the next release of kOS, I've added the suffixes Prograde and Retrograde and some others. See KSP-KOS/KOS#2220

@PiezPiedPy
Copy link
Contributor

Next additions have been mentioned here KSP-KOS/KOS#2263
I'll get on it in the near future.

@PiezPiedPy
Copy link
Contributor

New API methods where added for the Descent Profile for Trajectories v2.3.2 ResetDescentProfile DescentProfileAngles DescentProfileModes.

The next release of Trajectories being v2.4.0 will also have new API methods GetTarget and ClearTarget.

@PiezPiedPy PiezPiedPy changed the title Make GUI attitude settings settable in the API [Implemented] Make GUI attitude settings settable in the API Jul 26, 2020
@PiezPiedPy
Copy link
Contributor

Added an API method DescentProfileGrades to set individual descent profile nodes to pro/retrograde.

Closing as needed API methods are now implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants