-
Notifications
You must be signed in to change notification settings - Fork 230
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
Added Trajectories addon #1603
Added Trajectories addon #1603
Conversation
Uses reflection to access Trajectories. Works with Trajectories 1.4.6. Future Trajectories releases may break it, in which case addons:tr:available will return false.
Any chance Trajectories will provide some kind of an API in the future? Can we send a pull request? We use reflection sometimes if we have to, but obviously it's better to avoid it. |
I found this a while ago that said Trajectories used to have an API but they gave up on maintaining it, so I doubt they would really want to add it back. |
…ontrol-C. It was falsifying the notion of whether or not the system is at global scope when it sees a "local" directive, because it saw the leftover remains of the previous run on the stack. That error cascaded into other problems causing it to end up seeing the old leftover version of the delegate that was still in the global variable from last time.
Youen said he would be fine with adding an API so I will work on that. I might wait until he updates Trajectories to 1.1. |
That's great :) Keep us posted. |
Conflicts: doc/source/addons.rst src/kOS/Suffixed/AddonList.cs
orbit.rst * Add documentation for new suffix OrbitInfo.cs * Update GetNextPatch method to throw exception if there is no next patch eta.
IR.rst * Update links * Fix image * Add PARTSERVOS * General formatting Addon.cs * Update for formatting
I'd be willing to merge this if you 1) updated it and solved all the conflicts 2) tested it with KSP 1.1.2. 3) Added a note somewhere in the documentation that Trajectories has no official API and kOS support might break in future versions. |
And added more access to Trajectories API
Turns on trajectories auto updating. Needed for (currently pending) trajectories api to work.
Ok so I submitted a pull request to Trajectories with an API a while ago and recently fixed an issue he had with it, so I'm expecting it to get merged fairly soon. Hopefully I didn't mess things up with #1664 too much by adding another commit. I don't think I'll be able to do more programming until the end of the summer. :( If someone else can see this through that would be great. This needs to be updated to latest version of kOS, and the docs section saying there is no API (or something like that) needs to be removed. |
No worries, we'll make it work. It's on the list of things to make sure we get addressed shortly anyways. |
My API changes have been merged into Trajectories so it now has an official API. This addon works with that API, but needs to be updated to the latest kOS version. |
Adding a reference to the API PR: neuoy/KSPTrajectories#67 |
Found an issues in the Trajectories source (see neuoy/KSPTrajectories#74) so I'm going to put this on hold until I hear back about how to proceed. I have a number of review changes that I've made to both the code and the documentation. These changes are currently stored in my local repository, rather than as comments to the PR mostly because I was just about ready to merge it with my edits. I'll hold off merging. For the time being, I am planning on merging as a rebase, because it makes it easier for me to identify the files directly edited by this PR (as opposed to those edited by by other merged commits). This is a potential issue for repository history however, so I'm open to suggestions about alternative paths. |
While the issues have been fixed in the Trajectories repository, they are not yet incorporated into a release. I'm holding off on merging my review branch so that we don't release a new feature for which users need to know how to compile trajectories. I'll publish my working branch a little later tonight just so that anyone who finds this and wants to make it work can use the most recent version, include my edits to suffix names. |
@hvacengi which branch of yours has your working branch changes? I can't seem to find it. I will download it and do a compile and test of both Trajectories and KOS for this addon. Hopefully neuoy makes a rev release soon so we can get this finished. |
@PBscoots I just pushed it to https://github.com/hvacengi/KOS/tree/pull-review/1603 Be warned however, there will probably be a rebase coming before I push, and I will definitely modify the history far enough to change my "WIP" commit into a legit commit. |
@hvacengi am I able/(should I) to add commits to your pull-review/1603 to add in the orbit and impact velocity bits? |
@hvacengi I am going to add some commits to your 1603 branch to add in those other parts. My commits on the trajectories side have been implemented and he released an update for 1.2. I have tested it with KOS and available, hasimpact, impactpos, correctedvec, plannedvec all work. Im not quite sure what to do with settarget to test it. |
I merged this via rebase, and apparently didn't close the original PR. Closing now. |
@PBscoots if you have other suffixes/features you would like to add, feel free to submit them as a pull request against the develop branch at this point |
Fixes #687
Adds an addon that accesses the Trajectories mod via reflection. Provides the following suffixes:
addons:TR:available
: True if the addon was able to access all the things it needs in the Trajectories mod.addons:TR:hasImpact
: True if Trajectories has found an impact position for the current vessel.addons:TR:impactPos
: GeoCoordinates of the impact prediction.Notes & potential discussion points:
addons:TR:available
will return false.