Jump to content

kOS Scriptable Autopilot System 0.9


KevinLaity

Recommended Posts

Ya know you could at least tell me what i'm doing wrong before you start on how i'm a part of some endemic.

Kind of are, the questions comes back regularly enough to be annoying, while rarely enough to not be easy to spot by going a page back. I actually recompiled one of the forks you can find on Github, but that’s a bit of a pain, and a few pages back there should be a link to a replacement plugin dll (sorry for not just linking you straight to it, or pulling out the one I built, but I’m at work, and TBH I don’t even remember which specific Github repo I cloned. It was „the one that looked most actively worked on†at some point a week or two ago).

Link to comment
Share on other sites

Kind of are, the questions comes back regularly enough to be annoying, while rarely enough to not be easy to spot by going a page back. I actually recompiled one of the forks you can find on Github, but that’s a bit of a pain, and a few pages back there should be a link to a replacement plugin dll (sorry for not just linking you straight to it, or pulling out the one I built, but I’m at work, and TBH I don’t even remember which specific Github repo I cloned. It was „the one that looked most actively worked on†at some point a week or two ago).

whats wrong with the one i downloaded?

Link to comment
Share on other sites

well that seems to have fixed it. you know i think its possible to ask a moderator to wright something telling them about the new download on the original post, if you what to avoid having this happen again.

Link to comment
Share on other sites

well that seems to have fixed it. you know i think its possible to ask a moderator to wright something telling them about the new download on the original post, if you what to avoid having this happen again.

One of the reasons for leaving this as it is is that nobody is comfortable (at least yet) with hijacking the mod. It hasn't been *that* long, and most people considering stepping up would like to make radical changes to the language (switch to Ada, the standard engineering language. All code has to be supplied in triplicate hardcopy to Wernher von Kerman for review before flight). But you can see the discussion in the past thread.

Link to comment
Share on other sites

One of the reasons for leaving this as it is is that nobody is comfortable (at least yet) with hijacking the mod. It hasn't been *that* long, and most people considering stepping up would like to make radical changes to the language (switch to Ada, the standard engineering language. All code has to be supplied in triplicate hardcopy to Wernher von Kerman for review before flight). But you can see the discussion in the past thread.

Most people would like to wait longer, but the upgrade to KSP 0.23 made it a problem.

What would be nice would be if we had the ability to put a warning with a few edits in the first original post of this thread, directing people to a user-community made version and explaining why you need to use that instead of what's referred to in the post.

Link to comment
Share on other sites

Ya know you could at least tell me what i'm doing wrong before you start on how i'm a part of some endemic.

I'm not trying to belittle you. I'm trying to look for a solution that helps all future people and not just one person at a time. Even posting updates in this thread doesn't work because it's an enormous thread and nobody wants to have to read it through. Posting yet another explanation in the thread explaining it again seems to have been a good time to bring up that this practice is becoming less effective over time.

Link to comment
Share on other sites

Most people would like to wait longer, but the upgrade to KSP 0.23 made it a problem.

What would be nice would be if we had the ability to put a warning with a few edits in the first original post of this thread, directing people to a user-community made version and explaining why you need to use that instead of what's referred to in the post.

If you've got the appropriate link, you can get a Mod to edit the OP.

Link to comment
Share on other sites

I would like to add keyboard shortcuts to open and close the kOS terminal (I'm building a hardware keyboard replacement and I want to send keystroke macros to kOS to control ship attitude etc). I've had a look at the source and I think that I just need to add some extra lines in TermWindow.cs. Specifically, in the private void keydown() function, I can add a new check. For example:

if (code == (KeyCode.K) && control && shift)

{ Close();

return;

}

This ought to close the terminal window when I send CTRL+SHIFT+K. And I can create a similar sequence to open it (or reuse the same one and just toggle). The only problem is that I'm not sure how to rebuild the plugin DLL from all the different source files on GitHub. I have MonoDevelop on a Mac. Is it just a question of adding them all into a new project and hitting Build?

Link to comment
Share on other sites

I would like to add keyboard shortcuts to open and close the kOS terminal ... For example:

if (code == (KeyCode.K) && control && shift)

...

Is it just a question of adding them all into a new project and hitting Build?

To your final question, though I use VS Express rather than MonoDevelop, it is just a matter of providing the references to the UnityEngine.dll, Assembly-CSharp.dll and Microsoft.CSharp.dll with the project with this sourcecode, then you're set to have a successful compile (unless of errors because of new code).

A suggestion: avoid any hard dependency with any specific key-combination for the terminal open/close functions. Better to have these configurable, one never knows if those key-combos will be used by other mods or Squad itself in future.

Link to comment
Share on other sites

I would like to add keyboard shortcuts to open and close the kOS terminal (I'm building a hardware keyboard replacement and I want to send keystroke macros to kOS to control ship attitude etc).

Opening and closing the terminal is easy: just bind an action group to a key in the action group manager in the VAB. In my saves the 1 key is standard for opening the console.

Link to comment
Share on other sites

Opening and closing the terminal is easy: just bind an action group to a key in the action group manager in the VAB. In my saves the 1 key is standard for opening the console.

You can do that to open the console. But there doesn't seem to be any way of getting an action group to close a console.

Link to comment
Share on other sites

Hello all,

after some hours reading where I think it is good, I have difficulties with these nice software.

kOS doesn't seem to be saving my work and that's more than a difficulty...

I have win 7/64 running without UAC and with admin rights.

Archive Folder stay empty and kOS is the unique addon.

I'm complete noob...

Thanks for any help.

G

Link to comment
Share on other sites

Hello all,

after some hours reading where I think it is good, I have difficulties with these nice software.

kOS doesn't seem to be saving my work and that's more than a difficulty...

I have win 7/64 running without UAC and with admin rights.

Archive Folder stay empty and kOS is the unique addon.

I'm complete noob...

Thanks for any help.

G

If you haven't already use


switch to archive.

or I think this is the same


switch to 0.

Write a program, save it then check the archive folder, or use notepad or your favrite editor outside of kOS, write a program save it into the archive folder, and the type "list." and it should show up.

Ideally you shouldn't run programs from archive, but instead with out switching to archive or after switching back to the "rocket folder" (volume 1 i think, i haven't used kOS in a while) copy the files from archive and run them from the volume on the rocket. Example:


copy launch from archive.
run launch(100000).

Off topic from your question but In the example above the value in the () is used for a declared parameter. Ive used similar ones so I could set my desired launch altitude(Apoapsis).

Link to comment
Share on other sites

Hello,

When will this be updated?? And can someone please explain to me how to run multiple programs at once? It seems to have weird effects. I want to have my guidance program running at the same time as my staging program but its behaving weird.

I have a script called launch. and that script does some stuff, and then at the end that script runs 2 more scripts. Guidance and staging. But it seems like only the first one runs. The second one doesnt run.

so then i tried running only guidance and making guidance run staging but then it seems like guidance stops when i run staging.

how do you make 2 scripts run at the same time?

Edited by Zander
Link to comment
Share on other sites

Hello,

I have a script called launch. and that script does some stuff, and then at the end that script runs 2 more scripts. Guidance and staging. But it seems like only the first one runs. The second one doesnt run.

so then i tried running only guidance and making guidance run staging but then it seems like guidance stops when i run staging.

This sounds right; executing two scripts on the same unit at the same time is not possible. This is logical; when the unit is busy with the program it is instructed to execute, there is no time for another.

how do you make 2 scripts run at the same time?

The simple solution would be to make the two tasks run within the same script/program by mashing the code together. Another option is to create a program that calls two other programs like functions, for example, first guidance, then staging, then guidance again et cetera. By updating values (for example, updating headvar1 every time you run the guidance script) that were locked in the original program (setting lock steering to heading headvar1 in your original program) instead of locking them from the function programs you prevent the lock from being broken upon ending the function program. You kind of interlace the two desired functions that way with the option to add even more.

A third option would be to use a second or even third kOS unit, and to use archive or something like the time to trigger execution of two programs at the same time. That way you can have something akin to multithreading. Performance might suffer though, as kOS has a bit of a performance impact.

Link to comment
Share on other sites

A third option would be to use a second or even third kOS unit, and to use archive or something like the time to trigger execution of two programs at the same time. That way you can have something akin to multithreading. Performance might suffer though, as kOS has a bit of a performance impact.

can you or someone else explain how to do the 3rd option? I do have multiple KOS units on my ship. What do I do to do that?

AND ONE MORE QUESTION..

How can I find the pitch of the rocket regardless of whether it is flying east north south ect.

i just want to find the angle the rocket body makes with the horizon.

example:

pointing straight up is 90

pointing directly to the north or south horizons is 0.

pointing straight at the ground is -90

how can i find that?

Edited by Zander
Link to comment
Share on other sites

Hey all,

We have all lamented the lack of a proper 0.23 release on the spaceport and the OP of the KOS thread. I am getting ready to have my first release of new features and I wanted to get some assistance with testing.

I have posted this pre-release on Github for now

https://github.com/erendrake/KOS/releases/tag/v0.10.0

ABRIDGED CHANGELOG

  • Compatible with KSP 0.23 Thanks to Logris and MaHuJa for Commits
  • Added List()
  • Added Some orbital stats
  • Added Volume name getter
  • Added UNSET
  • Added FOR loop over new list

I don't have full documentation integrated into the KOS wiki but i will have that finished before full release

Edited by erendrake
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...