Jump to content

[1.3] kOS Scriptable Autopilot System v1.1.3.0


erendrake

Recommended Posts

3 hours ago, tajampi said:

The editor that comes with kOS is not really good for programming, and alt-tabbing to another program is a bit unstable (specially with thousand of mods) and takes you away from the inmersion of KSP ;)

I honestly didn't realize there even was an in game editor until this post

Link to comment
Share on other sites

1 hour ago, troyfawkes said:

Glad the rename bug is fixed :) I'm getting this new bug though:

http://prntscr.com/abrhna

Basically, no text, just green blocks.Presumably this is from the new GUI changes? Error log isn't giving me anything wonky. Is it just me?

This has happened to me I honestly am just using my own little mod to extract the info onto my other computer so I can use the terminal a bit more efficiently.

Link to comment
Share on other sites

3 hours ago, rkarmark said:

I got the bug too:rolleyes:

still love k-os:D

 

5 hours ago, Riderfighter said:

This has happened to me I honestly am just using my own little mod to extract the info onto my other computer so I can use the terminal a bit more efficiently.

 

6 hours ago, troyfawkes said:

Glad the rename bug is fixed :) I'm getting this new bug though:

http://prntscr.com/abrhna

Basically, no text, just green blocks.Presumably this is from the new GUI changes? Error log isn't giving me anything wonky. Is it just me?

Can all of you mention the OS you are installed on, whether KSP is from Steam or not, and Where you obtained your ZIP for kOS from (i.e. curse, spacedock, CKAN, or github.)

Also, if you are running 32bit or 64bit, and if it's Directx10, 11, or openGl, and the graphics card it's on?


This looks for all the world like the font image file didn't get installed right.  But the reason for asking for all that information is that if it is not, then there may be a specific platform or graphics configuration that refuses to load the textures properly.

Link to comment
Share on other sites

7 hours ago, troyfawkes said:

Glad the rename bug is fixed :) I'm getting this new bug though:

http://prntscr.com/abrhna

Basically, no text, just green blocks.Presumably this is from the new GUI changes? Error log isn't giving me anything wonky. Is it just me?

6 hours ago, Riderfighter said:

This has happened to me I honestly am just using my own little mod to extract the info onto my other computer so I can use the terminal a bit more efficiently.

4 hours ago, rkarmark said:

I got the bug too:rolleyes:

still love k-os:D

The bug appears to be caused by the texture quality graphics setting in the ksp main menu. If it is set to half or quarter res the textures for the characters don't load properly. If your system allows i would advise setting your textures to full res while this is looked into.

Link to comment
Share on other sites

18 hours ago, hvacengi said:

I know that it's a bit of work, but the current implementation of kOS does provide enough information to calculate the anomaly parameters and to predict future true anomaly values based on time (without using `positionat`).  I have a script that does so (which is not in a decent enough condition to share at this point, sorry).  We have made a conscious decision so far to not expose some kind of "true anomaly at" function.  We never really finished that discussion on github (it was discussed internally with the dev team) but you can see that discussion here (including references on how to make it work): https://github.com/KSP-KOS/KOS/issues/153

Hey thanks this discuasion i had Fond in the past. 

 

It is possible to calculate a future  True anomaly with the current true anomaly 

Link to comment
Share on other sites

3 hours ago, TDW said:

The bug appears to be caused by the texture quality graphics setting in the ksp main menu. If it is set to half or quarter res the textures for the characters don't load properly. If your system allows i would advise setting your textures to full res while this is looked into.

Looks like that's the issue for sure; changing to full texture quality got it to work. If it's relevant, I also have Dynamic Texture Loader installed.

@Steven Mading sounds like you guys have figured this out a bit more, but just in case you still need it:

  • Windows 10
  • Steam
  • CKAN
  • 32bit
  • Whatever the default graphics are (my launch options are  -popupwindow -single-instance)
  • NVIDIA GeForce GTX 765M
Link to comment
Share on other sites

Well, that kind of sucks.  It's weird that the 3d texture settings are applied to purely 2D gui widgets, *and* that it's applying to cases where the size is exactly the same as it was before when it worked (8x8).  I told Unity to "please stretch to fit", but when the size is 8x8 that stretch is a ratio of 1:1 and not really a stretch and hypothetically *should* have come out the same as before.

Okay well I'll do some googling about Unity and see if I can fix it easily, and if not I'll come up with a different way to do it.  One possibility is for me to "trick" your settings into doing the same thing even when at low texture settings by just using an enlarged variant of the font texture that's much bigger than it needs to be and just draws each "pixel" in a 8x8 pixel big block.  (Thus when sampling only some of the pixels the full information is still there.)

Link to comment
Share on other sites

Thanks to all who replied with the further details on the terminal font problem.  Once TDW reported to me that the problem only happens when the graphics texture settings are less than max (i.e. half, quarter, or eighth), it was fairly quick to find the cause and fix it.  But now I need to wait for another kOS dev to review my (very very small) fix and approve it and we should be able to get the fix out soon.

 

Link to comment
Share on other sites

I'm struggling to understand the coordinate systems in kOS.

My ship is pointing straight up. I get ship:srfprograde:pitch. It says right about zero. Shouldn't it be 90?

Then I launch. My script locks steering to heading(90, ship:srfprograde:pitch) -- seemed reasonable when I wrote it, but pitch is zero, so I don't get very high until I'm already going due sideways. When I hit the deck, pitch is reading out at about +5 degrees while my actual flight path is about -10 degrees.

Very confused... Is there a tutorial about this? The tutorials don't seem to go into much detail on this point.

Link to comment
Share on other sites

New Release : I can see clearly now.  It's not terminal.


v0.19.2

From the usual download sites - see first post in the thread for the locations to obtain it from.

 

This release is here primarily to fix a problem that made the new v0.19.1 terminal unusable for users who have to use low resolution texture settings in the Unity graphics configuration panel.

BREAKING

  • Nothing new breaking in this version is known about.

NEW FEATURES

  • New alias KUNIVERSE:FORCEACTIVE() can be used instead of the longer name KUNIVERSE:FORCESETACTIVEVESSEL(). More robust use of the font_sml.png file allows for replacement of font_sml.png by the end-user. (However this may only be useful for a limited time, as Unity5 might make us implement the font differently anyway.)

BUG FIXES

  • New terminal now works again at low texture resolution settings (https://github.com/KSP-KOS/KOS/issues/1513).
  • New terminal shows grey color on power-off again  (https://github.com/KSP-KOS/KOS/issues/1525).
  • Terminal now shows a boot message that mentions the documentation URL (https://github.com/KSP-KOS/KOS/issues/1527).
  • Fixed a situation that could make KSP itself crash if a script attempted to perform an equality comparison on types that hadn't had a meaningful implementation of equality defined.  (Instead of a proper error message about it from kOS, kOS got stuck in recursion.)
Link to comment
Share on other sites

6 hours ago, bonyetty said:

How to update to kos to 19.1? Struggling to finds instructions to do this. 

The first post of this thread contains links pointing to the locations to download the ZIP file from.  Once downloaded, you can "explode" the ZIP and copy its contents into your Kerbal Space Program folder, where it will create a GameData/kOS folder for you with the contents inside.

Allegedly CKAN will let you click a button to auto-update if you have an old version of the mod, but sometimes CKAN gets a bit flaky.  Your  mileage may vary.

Link to comment
Share on other sites

3 hours ago, numerobis said:

I'm struggling to understand the coordinate systems in kOS.

My ship is pointing straight up. I get ship:srfprograde:pitch. It says right about zero. Shouldn't it be 90?

Then I launch. My script locks steering to heading(90, ship:srfprograde:pitch) -- seemed reasonable when I wrote it, but pitch is zero, so I don't get very high until I'm already going due sideways. When I hit the deck, pitch is reading out at about +5 degrees while my actual flight path is about -10 degrees.

Very confused... Is there a tutorial about this? The tutorials don't seem to go into much detail on this point.

kOS inherits the coordinate system from the base KSP game, which does some strange things.

Vectors and positions use a reference frame in which the x, y, and z axes usually have nothing to do with which way your ship is pointed.  They're the way the universe itself is oriented, and even that isn't fixed in place because of some of the tricks KSP does to switch reference frames around.  More explanation is here : http://ksp-kos.github.io/KOS_DOC/math/ref_frame.html#ref-frame

Directions are represented as rotations around these axes, which (and this is the part I do not like and it pre-dates my involvement in the mod) were named for some inexplicable reason, "pitch", "yaw", and "roll" despite having nothing to do with what those words mean in your ship-centric thinking.  All they really mean is rotation around x, rotation around y, and rotation around z. Since the x,y, and z axes don't align with your ship, calling these things "pitch", "yaw", and "roll" is a bit confusing.

This old video walks through some of how the rotation system works, although you have to listen to me ramble on a bit.  It may help make things make more sense.

 

Link to comment
Share on other sites

56 minutes ago, Steven Mading said:

The first post of this thread contains links pointing to the locations to download the ZIP file from.  Once downloaded, you can "explode" the ZIP and copy its contents into your Kerbal Space Program folder, where it will create a GameData/kOS folder for you with the contents inside.

Allegedly CKAN will let you click a button to auto-update if you have an old version of the mod, but sometimes CKAN gets a bit flaky.  Your  mileage may vary.

Thanks Steven. Yes I have the kOS 19.1 file. I deleted the old version of KOS and put KOS19.1 in its place. The text box in KOS now just has green rectangles instead of green text.  Super new to programming btw hence why in keen on KOS. Update blog for KOS 19.0 says something about "reformat as usual..." Um reformatting is not something I usually do. I do know that KOS writes outside gamedata in KSP to the script file. Do I possibly delete this to? Mods to manage mods sounds like an even harder thing to get correct from my perspective.  I have reverted and have KOS 18.? working. How do I remove KOS 18.? and install KOS 19.1 please?

Link to comment
Share on other sites

8 minutes ago, bonyetty said:

Thanks Steven. Yes I have the kOS 19.1 file. I deleted the old version of KOS and put KOS19.1 in its place. The text box in KOS now just has green rectangles instead of green text.  Super new to programming btw hence why in keen on KOS. Update blog for KOS 19.0 says something about "reformat as usual..." Um reformatting is not something I usually do. I do know that KOS writes outside gamedata in KSP to the script file. Do I possibly delete this to? Mods to manage mods sounds like an even harder thing to get correct from my perspective.  I have reverted and have KOS 18.? working. How do I remove KOS 18.? and install KOS 19.1 please?

The terminal text being solid blocks is a bug in version v0.19.1 that just got fixed and a release is out tonight called v0.19.2, that you can find at the links mentioned in the first post in this thread (but the one on the Curse site might take a few hours to show up - they usually don't update immediately when I upload it.

I don't know what you mean by "reformat as usual".  I don't recognize that statement.

 

Edited by Steven Mading
Link to comment
Share on other sites

Thanks heaps for the quick reply.  ok will try when available. It's not me:confused: and a fix yippee.

                         

probably not relevant and no explanation required not needed From Github 

yes because this noob misquoted!

v0.19.0

BREAKING CHANGES

  • As usual, you must recompile any KSM files when using the new version.
Edited by bonyetty
Link to comment
Share on other sites

Ah, ok, so "pitch" is historical accident. I guess I'll just have to calculate it with happy fun arctan tricks.

What I'm trying to implement for my first real script is a simple gravity turn: heading 90, pitch to match my flight path, roll uncontrolled. Then I'll complicate it for my spacecraft.

Link to comment
Share on other sites

2 minutes ago, numerobis said:

Ah, ok, so "pitch" is historical accident. I guess I'll just have to calculate it with happy fun arctan tricks.

What I'm trying to implement for my first real script is a simple gravity turn: heading 90, pitch to match my flight path, roll uncontrolled. Then I'll complicate it for my spacecraft.

You don't necessarily need to use your own arctan tricks.  You can calculate the angle from "up" using vang, and then since the horizon is always 90° from vertical, you can find the horizontal pitch.  This way, the trig functions are handled internal to kOS, where they are a little faster.

set angleVertical to vang(ship:up:vector, ship:facing:vector).
set angleHorizontal to 90 - angleVertical.
// or, if you prefer velocity:
set angleVertical to vang(ship:up:vector, ship:velocity:surface).
set angleHorizontal to 90 - angleVertical.

 

Link to comment
Share on other sites

On 6. marts 2016 at 11:25 AM, Steven Mading said:

 

 

Can all of you mention the OS you are installed on, whether KSP is from Steam or not, and Where you obtained your ZIP for kOS from (i.e. curse, spacedock, CKAN, or github.)

Also, if you are running 32bit or 64bit, and if it's Directx10, 11, or openGl, and the graphics card it's on?


This looks for all the world like the font image file didn't get installed right.  But the reason for asking for all that information is that if it is not, then there may be a specific platform or graphics configuration that refuses to load the textures properly.

My is on windows 10, steam, got the zip from spacedock, 32 bit and intel intergrated graficks (sorry i am not the best at english)

Link to comment
Share on other sites

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