r/Kos • • Apr 07 '21

My new precision landing script - 0.001 m accuracy

307 Upvotes

r/Kos • • Sep 15 '21

Video Finally managed to pull off my suicide burn script perfectly! Thanks to this sub for all the help!

205 Upvotes

r/Kos • • Apr 13 '22

Video Missile interception demo

197 Upvotes

r/Kos • • Mar 02 '21

Video Finally got one version of the barge landing working. It took me way too much time. This makes me appreciate the challenge and the difficulty of the real thing. Mad respect to the spaceX engineers.

177 Upvotes

r/Kos • • Oct 29 '25

This lander does a sick flip™ on ascend!

150 Upvotes

Needed the crew modules to be at the bottom so i could dock with a rover and have one continues freeIVA volume. This left me with no space for fuel and engines at the bottom so i had to get creative :3 (probably shuld have used a bigger engine though lol)


r/Kos • • May 31 '21

Catching a booster by its airbrakes

147 Upvotes

r/Kos • • May 30 '20

Program My first script im actually proud of a boostback and suicide burn

123 Upvotes

r/Kos • • Sep 18 '21

Image Up until now, every one of my kOS scripts could only launch into an equatorial orbit. I finally managed to make it so I can launch into any given inclination with decent accuracy!

Post image
115 Upvotes

r/Kos • • Dec 22 '21

Video Air to air missile homing

111 Upvotes

r/Kos • • Nov 01 '24

Video Fully autonomous Super Heavy tower catch, pretty happy with the results

109 Upvotes

r/Kos • • Nov 17 '20

The most accurate Starship 15 km hop representation we have so far

97 Upvotes

r/Kos • • Dec 21 '21

Video Simple but effective hoaming missile with proportional navigation

95 Upvotes

r/Kos • • Dec 22 '21

Video Downrange missile homing.

91 Upvotes

r/Kos • • Oct 18 '24

Program Intercontinental Ballistic Missile Guidance Script - 385 km test

89 Upvotes

r/Kos • • Apr 25 '21

Video falcon heavy landing

83 Upvotes

r/Kos • • Jul 30 '17

I made an ascent autopilot using the actual Space Shuttle's guidance algorithm

83 Upvotes

I ported the Space Shuttle's Unified Powered Flight Guidance in ascent mode to kOS, and built an entire ascent autopilot around it. Works in Realism Overhaul (tested with Atlas V and Saturn V) as well as vanilla. Code available on github, but also check my introductory video here: https://www.youtube.com/watch?v=NEQD7AQoLXk

Due to sheer complexity of the whole thing, and the difficulty of debugging in kOS, this might still not work always. Do try to run it, and let me know of both successful and unsuccessful launches :)


r/Kos • • Nov 27 '19

Image I think I spend too much time alone.

81 Upvotes

r/Kos • • Jul 24 '20

Video Starship skydiving maneuver + landing script i've made :)

79 Upvotes

r/Kos • • Feb 13 '23

Announcement kOS v1.4.0.0 - Catch-up for over a year of little things

74 Upvotes

For a long time people have been having to override CKAN's complaints because kOS does work on recent KSP version but it hadn't had an official release to SAY so.

With KSP2 coming, it seemed about time to get off my butt and finally release all the stuff that accumulated over the last 2 years so at least KSP 1.0 is left with a fully working kOS.

Downloading:

From Curse

From SpaceDock

Direct from the GitHub Project

v1.4.0.0 - Catch-up for over a year of little things

It's been 2 years since the last kOS release, and a lot of small changes have trickled in. None were big enough on their own for a full release but there's been enough of them and it's been long enough that a release has been needed for a while now. Since KSP 2 is about to start hitting early access, it seemed right to get all these little things out for kOS for KSP 1 just before that happens.

This will also make it so people won't have to keep overriding the complaints of CKAN for trying to use kOS on KSP 1.11.x or KSP 1.12.x. (Which it worked for but CKAN didn't know that. Now it should know that.)

BREAKING CHANGES

  • The bugfix to prevent a local variable from clobbering a builtin name could make existing scripts have to rename a variable or two.

NEW FEATURES

  • kOS parts are now findable by typing "kos" into the VAB's part search bar. pull request

  • kOS parts can be placed inside the KSP cargo inventory system. pull request

  • Comma-separated list of LOCAL or SET declarations can now be parsed. Example:

  • Added VESSEL:THRUST, VESSEL:ENGINES, VESSEL:RCS.

  • Added OPCODESLEFT bound variable. This bound variable returns the number of instructions yet to execute (how much of CONFIG:IPU's instructions there are to go in this fixedupdate). Intended to help decide if a WAIT 0. would be prudent before entering a critical section of code. pull request

  • Better integration with RP-1's avionics tech progression. (No longer have to buy into the tech from the R&D building to cause the kOS cores in avionics parts to get the upgrade.) pull request

  • Better integration with RP-1's avionics lockouts when the avionics doesn't support the mass. (Previously kOS couldn't use ANY of the controls when avionics were insufficient, even ones RP-1 meant to still work with insuficient avionics, like RCS fore and aft.) pull request

  • kOS parts are now findable by typing "kos" into the VAB's part search bar. pull request

  • Can now read a binary file as a LIST of numeric values (one per byte). pull request

BUG FIXES

  • Documentation: Many small one-line documentation fixes that are too numerous to mention all of them one by one. pull request pull request pull request pull request pull request pull request

  • A change to make it backward compatible with a call kOSPropMonitor was doing. pull request

  • Cause the mod RocketSoundEnhancement to stop muffling kOS's sounds. (By explicitly telling Unity those sounds don't emit from the kOS Part's "location" and instead are ambient.) pull request

  • Make PART:DECOUPLER behave more consistently with what the documentation says about docking ports. pull request

  • Reduce excessive repeats of GUI ONCONFIRM calls being triggered when they werent' supposed to be triggered. pull request

  • Remove legacy old version of kOS's computer from the parts definition file so it can't appear by accident in the parts bin. This is no longer needed for backward compatibility like it was before because this version of kOS cannot run on the very old versions of KSP that part was for anyway. pull request

  • When reporting the terrainheight of a geoposition, it no longer returns false results caused by seeing certain stock parts that put trigger colliders on the "terrain layer". pull request

  • Fix SteeringManager believing RCS blocks were capable of more thrust than they were (causing steering to be tuned wrong when steering via RCS). Problem was caused when stock parts now have multiple alternate RCS nozzle arrangements, and kOS was summing up all the thrust all the nozzle variants can do even though only a subset of those nozzles actually exist in any given variant. pull request pull request

  • When setting the volume name for a disk drive by copying the vessel's name to the volume's name, it now strips out characters that are not allowed in volume names (but are in vessel names, thus the bug). pull request

  • BOUNDS now does a better job of calculating based on part's colliders rather than their visual meshes which don't always agree with the colliders. pull request

  • No longer bogs down as much when someone creates the same LOCK expression repeatedly in a loop. (Still not a good idea, but kOS tolerates it better now.) pull request

  • Performance: No longer pays the cost of tracking a stopwatch when the user doesn't even have profiling turned on so they're not looking at the timings anyway. pull request

  • A VOICE's volume is now persisting properly after playing a NOTE. Previously playing the NOTE caused the VOICE volume setting to get clobbered by the NOTE's volume. pull request

  • Make it so kOS's ModuleCargoPart settings don't break in older KSP 1.10.x (which doesn't have ModuleCargoPart). pull request

  • Fix a bug when a thing that is locked is used as the left side of a suffix when setting the suffix. pull request

  • Prevent a local variable from clobbering a builtin name pull request

  • Allow kOS code to "see" a change to a manuever node's ETA made outside the script, after having obtained the node in a variable. pull request

  • Fix Compiler exceptions not showing the filename correctly. pull request

  • Fix ALT:RADAR sometimes wrong when high above ground. pull request

  • Fix race condition that caused terminal to spam the log on scene changes and sometimes spam the log enough to lag the game for some people. pull request

  • Fix throwing exception when setting SASMODE while the navball is hidden. pull request

  • Made the doc generation scripts work on python 3.x pull request


r/Kos • • Apr 27 '26

Video Wrote an auto docking script

72 Upvotes

r/Kos • • Nov 14 '24

3.4cm of error - booster catch with shorter suicide burn compared to last time.

70 Upvotes

r/Kos • • Dec 15 '20

Video Fully Autonomous Rocket with 30 Starlink Satellites and a Self-Landing Booster

70 Upvotes

r/Kos • • Jul 04 '19

Recreating SpaceX StarLink in KSP project: First Milestone achieved!

Thumbnail
gfycat.com
70 Upvotes

r/Kos • • Jun 19 '15

Program/Video & Crafts I started out with a small quad-engine balancer program.. ended up with fully fledged drone

69 Upvotes

Video: https://www.youtube.com/watch?v=f4SytD3xR0k

This is a shameless cross-post from the main KSP subreddit (I figure this community could always use some publicity). And I hope the video isn't too long, I didn't have the heart to cut anything else out of it.

If anyone is interested, I'll see if I can post the code later tonight, but it needs some serious cleaning, hehe.

edit: Now with yaw control: http://webm.host/72b04/vid.webm


edit May 2017: Github with updated scripts (I added some clips on my youtube channel to see some of the additions): https://github.com/ozin370/Script

The files it uses should be q.ks (this is meant as the starting program that calls everything else), quad.ks (most of the set up, calls the main control loop every frame), quad_loop.ks which contains most of the logic (the whole file is run once per tick), lib_quad.ks (it includes some old functions that I no longer need with the newer kOS)


If you have any questions you can find me on the kOS discord (link in /r/kOS sidebar) :)

Crafts:

  • HoverBot RocketE Stock requires: kOS mod. Simple drone using rocket engines, does get pretty extreme TWR when it runs low on fuel which tends to cause oversteering.

  • HoverBot RocketE IR requires: kOS mod, Infernal Robotics. Same as the Stock one, but with yaw control enabled, no camera.

  • HoverBot-E CAM requires: kOS mod, Infernal Robotics, Infernal Robotics Model Rework, TweakScale, Firespitter, HullCam VDS. Has all features enabled (watch out, the camera robotics and yaw robotics are very power hungry).

Instructions: Spawn a vehicle on the launchpad, make sure you have the mods required for the vehicle as stated above. Right click the kOS CPU part (round part on the top), open the terminal. Type in switch to 0. and then run quad.. See the controls listed at the bottom of this post (You will want to hold the H key for a bit to make the drone gain some height for starters). The controls will not work if you have the terminal window in focus!


The script folder (KSP main directory\Ships\Script) contains 3 script files:

  • quad.ks - Main script, contains some functions, user input logic, initial variables and calls the controller loop script

  • quad_loop.ks - Has all of the control logic to make this thing fly

  • lib_quad.ks - various library functions needed by the two other scripts.


To make your own drone:

To make a functional drone it needs 4 engines placed at least 50cm away from the center of the vehicle. They must be placed in the 90deg snap mode so that once the drone spawns at the launchpad one arm will point north, one east, and so on. The engines need a small spool time (I think that is the term for it), so unmodified jet engines will not work. Other than that you just need a kOS cpu and run quad.

For best results, give the drone a TWR of ~1.5 - 4.5, some crafts may need some adjusting of gains for the two P-controllers and one PID controller to fly well.


Controls:

Modes: [AG1]: Exit , [AG2]: Hover (points up and keeps height, good for multi-drone winch lifts), [AG3]: Land, [AG4] FreeRoam mode, [AG5] Toggle between stored bookmark locations (found in lib_quad.ks), [AG6] Position mode and spawn a position marker below the drone, [AG7] Toggle between vehicles to follow

Debug vectors: [AG8] desired horizontal velocity vector and current horizontal velocity vector, [AG9] Thrust distribution vectors, [AG10] Acceleration vector and steering vector (the vector that the steer controls try to match ship:facing:vector with)

Other controls: [H,N] Increase/decrease hover height, [W,A,S,D in freeroam mode] adjusts direction and target speed, [WASD in position mode] Moves the position north/west/east/south, [W,S in follow mode] increase/decrease follow distance. [K, if camera is present] toggles the camera on/off.


r/Kos • • Oct 27 '24

Video Catching Super Heavy using chopsticks with less than 1m of error and then automatically venting excess fuel after.

68 Upvotes