Jump to content

Kamik423

Members
  • Posts

    74
  • Joined

  • Last visited

Everything posted by Kamik423

  1. Episode 2: Improved suicide burn with better touchdown visit the video on YouTube to like and subscribe. Code as always on GitHub. Got the audio much better this time. Criticism and feedback as always greatly appreciated!
  2. Hosted it here, for those having the same issue, hope it works.
  3. just copy all the files in the github repo into you script folder. Then put a KOS CPU on each booster/core/stage. Select the CPUs and set their boot scripts to 2mF-b1, 2mF-b2 (boosters), 2mF-c (core) and 2mF-s2 (second stage). then just launch
  4. Thanks, glad you like it Well, you could theoretically adapt it to do most of that. Select the 2mF-c/b1/b2/s2 as the scripts for the core, booster 1, 2 and the second stage respectiveley. You would have to change the values plugged into the returnTo function, the fist one is the landingpad, the second one the 'coefficient of friction' (not really, but kinda) if it falls to short adjust it up, and the other way around, and the second one is the height offset. If it touches down too hard adjust that up as well (and the other way around). Also in the core script adjust the two fuelcutoff points. It stages once the fuel in the respective parts falls under this limit. (B=booster, C=core). Part naming scheme (name those parts, otherwise the script will not work as intended): CSE: core stage engine RTB: reserve tank booster (reserve tank of the booster, can partially be emptied. This is the one checked for the remaining fuel. Can only be one tank per booster) RTC: reserve tank core BE: booster engine (radial boosters, not core) CSE: core stage engine also put nothing on actiongroup 5 and 6 (they get called to signal activation to the other scripts, not sage the parts. 5: booster separation, 6: second stage separation) action group one is called after fairing deploy, two for satellite deploy. also you might need some RCS I intend for project Athena to handle more of this by itself.
  5. I recently had another series, 2mF, developing a KOS script to automatically fly, return and land boosters in KSP. I decided to try that again, this time with less "empirically determined values" and with explaining my code. This should make the script fit to multiple different missions, not just this one specific rocket. I hope to be able to demonstrate New Shepard, Falcon 9 and Falcon Heavy like missions. This also is an editing-learning-experience for me. So I hope the audio quality on the next video will be better, I am trying! I want this to be a community-thing, so I am looking forward to your feedback, improvement suggestions and criticism! Links YouTube channel Forum Thread GitHub Repo Modlist CameraTools for recording DistantObjectEnhancement little dots for planets and ships PlanetShine planet illuminating the vessel Scatterer better atmosphere and water kOS programming rockets Other Info Text Editor Atom Syntax Theme Solarized Dark KSP Version 1.2.2 Video Editing Software Adobe Premiere Pro Microphone Blue Snowball Hans Episode #1: Automated Booster landing development tutorial using a KOS Autopilot script. Inaugural episode: Dumb suicide burn with a simple hop. I promise the audio will be better next time! Also go to the YouTube video, to like and subscribe!
  6. Feature request: can you make a target relative mode (from a docking port), so I can see how the port moves relative to a space station and so I can move the trajectory 'into' the target docking port and just float?
  7. I am not quite sure, whether this is the right subform for this, but: I am studying a special aerospace computer science class at University in Germany (I am German) for half a year now. I have noticed that multiple people did something similar, the latest I know of is the topic of this tweet by Scott Manley: So my question is: Who else has beed guided and inspired by KSP to study/work in something space/science related? For me it really opened up a whole world of fun and interesting stuff. After starting to play the game I started reading loads of Wikipedia, watching a lot of science YouTube and finally decided to devote my study to this. I am incredibly grateful to the creators of this game for making something so magnificent and interesting it can influence people's whole life on this level. Thank you! Kamik423
  8. Finally, I finished it! Here is a complete mission completely autonomously controlled and 90 percent reusable! Thanks for sticking with me for this long!
  9. I AM A MORON I was so proud of my iterative numerical trajectory integration, but it was just not working out. I found the mistake: SET ps TO V(0,0,0). SET vs TO SHIP:VELOCITY:SURFACE. SET as TO V(0,0,0). SET t TO 0. UNTIL ps:Z < -SHIP:ALTITUDE { SET t TO t + 1. SET as TO (- as:NORMALIZED * (as:MAG ^ 2 * k * (0.99997 ^ ALT:RADAR)) / (SHIP:MASS * 1000)) - SHIP:UP:FOREVECTOR:NORMALIZED * 9.81. SET vs TO vs + as. SET ps TO ps + vs. } can you spot it? I am using a newtonian drag approximation (I think KSP is using this one too). The equation for this is F = 0.5 * v^2 * k * p can you spot it now? the acceleration is proportional to v^2 not a^2. that explains so much. Everything is working so well now!!!! SET ps TO V(0,0,0). SET vs TO SHIP:VELOCITY:SURFACE. SET as TO V(0,0,0). SET t TO 0. UNTIL ps:Z < -SHIP:ALTITUDE { SET t TO t + 1. SET as TO (- vs:NORMALIZED * (vs:MAG ^ 2 * k * (0.99997 ^ ALT:RADAR)) / (SHIP:MASS * 1000)) - SHIP:UP:FOREVECTOR:NORMALIZED * 9.81. SET vs TO vs + as. SET ps TO ps + vs. } EDIT: Is there a petition I can sign to get KOS syntax highlighting on the forum?
  10. I have thought about that, but it just seems un-SpaceX-y. I have considered liquide sepratron (those little orange ones) firing for a second or so, but I think I will be able to safely fly the boosters apart in different ways, without adding more engines. This I will however only add if necessary. Just stay tuned
  11. But those would not be reusable, would they? I want to basically refuel the parts and just launch them again. If proximity becomes a problem I want write something using RCS or boost them apart a little.
  12. I am not having any issues with the rest of the rocket, however after separating the boosters swing quite dramatically and about one third of all times the nosecone of the southern booster collided into an engine of the northern booster, that is fixed now. I actually haven't had any problems with that, the furthest distance I have seen is 50 km, and that is the payload/second stage section plummeting to their death when following the boosters (S2 cannot stage if it is not the active vessel). Vessels do not seem to unload during flight, however one the touch down they immediately do You are right with that, I traced the issue back to the angle of attack during separation: the rocket aims at a constant 75°, which is about 10° off prograde during separation, which causes massive shear forces on the mostly empty boosters. When pitching the rocket down to prograde shortly before separation it tends to be much more stable. Also when the boosters are activated through AG5 during staging they cannot immediately take control, because KOS crashes when receiving throttle / steering calls from multiple cores. So I built in a one second wait, wich I have now replaced with a 0.01 second wait until they can take over control. This causes them to stay prograde during and after separation. thanks for your input!
  13. Flight #4 Heavy Demonstrator! This happened soon! It still is an ugly rocket. I will probably improve that in the next flight. The side boosters have individual scripts, that stay dormant until action group 5 is triggered by the main core. This ensures that there is no conflict between the different cores. They basically execute the same script as in the last flight, but the boosters have hard coded touchdown coordinates. It still is on a "dumb" trajectory, 75º, wich is just meant as a feasibility demonstrator, not an actual orbital boost. The second stage is just a simulator, there are filled ore tanks inside the fairing to simulate a payload. The boosters don't try to avoid each other after separation, the just operate independently and hope... sometimes one (the southern one) loses a nosecone seconds after separation, or the bump into one another if they don't quite hit the landingpad. At launch the first stage engines are throttled down to 50%, to enable the first stage to burn for a longer period of time that the boosters. Full power is restored after booster separation. The other scripts have been tweaked a little to prevent over-steering and oscillating. For some reason all parts of the rocket impact hundreds of meters short of the designated landing areas for the first few flights after starting KSP. After about 5 crashes it suddenly starts working and I have no idea why. Hey, this doubles the number of successful landings you have seen from me so far!!!
  14. Flight #3 - This took a while to get right, especially since I want the script to be as universal as possible Boost until AP>20k. Then perform a boostback at AP. Boostback waits until distance to impact point is greater than the distance to the launchpad AND until the angle between the impact-vector and the launchpad-vector (projected on a surfaceparallel plane) is less than 45º, so it doesn't continue flying in the wrong direction. All scripts have been adjusted, especially the glidetowards. It is now steering relative to the velocity vector and not relative to the launchpad vector, because it has been aiming too low all the time. Full source code as always on GitHub. PARAMETER landingpad. PARAMETER overshoot. LOCK impact TO -landingpad:POSITION. SET k TO 9. UNTIL (VANG(VXCL(SHIP:UP:FOREVECTOR, landingpad:POSITION), VXCL(SHIP:UP:FOREVECTOR, impact)) < 45) AND (VXCL(SHIP:UP:FOREVECTOR, impact):MAG - overshoot > VXCL(SHIP:UP:FOREVECTOR, landingpad:POSITION):MAG){ //Less than 45º off of the launchpad to ensure right direction, and distance to impact > distance to launchpad LOCK STEERING TO VXCL(SHIP:UP:FOREVECTOR, landingpad:POSITION):NORMALIZED * 2 - SHIP:VELOCITY:SURFACE:NORMALIZED. LOCK THROTTLE TO 1. SET ps TO V(0,0,0). SET vs TO SHIP:VELOCITY:SURFACE. SET as TO V(0,0,0). SET t TO 0. UNTIL ps:Z < -ALT:RADAR { SET t TO t + 1. SET as TO (- as:NORMALIZED * (as:MAG ^ 2 * k * (0.99997 ^ ALT:RADAR)) / (SHIP:MASS * 1000)) - SHIP:UP:FOREVECTOR:NORMALIZED * 9.81. SET vs TO VS + as. SET ps TO ps + vs. } SET impact TO ps. } LOCK THROTTLE TO 0. LOCK STEERING TO RETROGRADE.
  15. It starts burning too early, as you see in the video and then descents with lower throttle, which is quite inefficient. The current equation is `h_suicide = 0.5*v^2/(F_max / m - 9.81)` where F_max is the max thrust of the rocket and h_suicide the suicide burn height. This equations results from `v^2 - v_0^2 = 2*a*x`. My guess is that is due to the variable mass of the system, but I am not quite sure what the right equation is... (I hope the equations will be formatted) EDIT: they didn't. And: I found this document which can be reduced to the same equation... EDIT: mechjeb source code also uses basically the same equation kamik423
  16. Flight #2: Boost until Apoapsis > 20km, 2º off of the UP vector, then uses liftingbody forces to adjust glideslope to aim at launchsite, without ever performing a boostback or course correction. Those will be added later. It aims at the the calculated impact point (via 1s - interval Euler integration) mirrored at the launchsite. The touchdown script was adjusted to perform a suicide burn, wich however is still off. If anybody knows the cause, please tell me!!! LOCK STEERING TO - ( landingpad:POSITION * 2 - impactPoint(6)). FUNCTION impactPoint { DECLARE PARAMETER k. DECLARE PARAMETER dv IS V(0,0,0). SET ps TO V(0,0,0). SET vs TO SHIP:VELOCITY:SURFACE + dV. SET as TO V(0,0,0). SET t TO 0. UNTIL ps:Z < -ALT:RADAR { SET t TO t + 1. SET as TO (- as:NORMALIZED * (as:MAG ^ 2 * k * (0.99997 ^ ALT:RADAR)) / (SHIP:MASS * 1000)) - SHIP:UP:FOREVECTOR:NORMALIZED * 9.81. SET vs TO VS + as. SET ps TO ps + vs. } RETURN ps. }
  17. Flight #1: Vertical boost for 10 seconds and subsequent touchdown using vector addition for directional steering. PARAMETER landingpad. PARAMETER throttleMultiplier. IF NOT BRAKES { TOGGLE BRAKES. } //Turn Brakes on LOCK vTarget_vertical TO (SHIP:ALTITUDE - landingpad:TERRAINHEIGHT) / 5 - 1. LOCK vTarget_horizontal TO landingpad:ALTITUDEPOSITION(SHIP:ALTITUDE):MAG / 8. LOCK steeringVector TO landingpad:ALTITUDEPOSITION(SHIP:ALTITUDE):NORMALIZED * vTarget_horizontal - VECTOREXCLUDE(SHIP:UP:FOREVECTOR, SHIP:VELOCITY:SURFACE). LOCK STEERING TO LOOKDIRUP( steeringVector + SHIP:UP:FOREVECTOR:NORMALIZED * 20, HEADING(90,0):FOREVECTOR). LOCK THROTTLE TO - throttleMultiplier * SHIP:VERTICALSPEED / vTarget_vertical. WAIT UNTIL ALT:RADAR < 35. IF NOT GEAR { TOGGLE GEAR.} WAIT UNTIL SHIP:VERTICALSPEED > -0.1. TOGGLE BRAKES.
  18. The goal of this series/project is to develop a KOS script that can fly a falcon heavy like rocket or a single booster rocket and return all boosters and the first stage to the KSC autonomously. Progress will be posted over time. I will post single 'flights' on YouTube and in responses to this post. Each 'flight' will include an iteration on the source code adding or improving a single feature. The source code is available on Github. There now is a followup project: Questions/comments/improvements are greatly appreciated. Mission Log: Flight #1 - Simple Hop Flight #2 - Liftingbody flight path adjustment Flight #3 - High altitude path reversal boostback Flight #4 - Heavy demonstrator with boosters Launch #1 - Foo-Sat to LKO - A COMPLETE MISSION!!! Github source code Kamik423
  19. I could not find anything about this: I wrote a script to land a F9 first stage back at the KSC. It works fine if the root part is in the first stage, but I want to fly the rest of the rocket to orbit, and then jump back and land the first stage, or even do a falcon heavy like thing where three boosters separate at two different times, each having a script running. But when I switch to the first stage with FMRS the program is interrupted and has to be restarted. Is there a way to a) keep the program running b) not delete the first stage, so it can land while I ascent c) easily start a new program (with an action group etc.) and not having to type in "copy f9_1 from 0. run f9_1." So I can just activate a booster return script I hope my question is understandable and not too annoying. Thanks
  20. I am sorry. But I have bee trying all day. And I CANNOT Figure it out. I am so mad and tired. How do I get the horizontal velocity heading of the vessel? (As scalar degrees) Nothing seems to work. And I cannot find a function for this. Thanks
  21. Hi, I play KSP for 3 years now, but I have only had 4 missions beyond Minmus: - a duna colony never to return - an unmanned eve lander - an unmanned Laythe plane - a probe to escape the solar system but I finally decided to do a BIG mission, with the 1.1 release. This is project JUPITER (Jool utter planetary investigation and thorough environmental research). It is the biggest vessel I have ever assembled, took over 15 launches altogether (more than 20 if you count the too-small-and-therefore-destroyed transferstage) . Sent 6 crew on a 7 year journey to Jool. And they actually made it back alive. Here is it's story: can't get the titles to show up - view on IMGUR instead It took me over a week to fly all of the launches and do all of the slingshots. I am so relieved now, that this mission is successful. I also feel like an accomplished KSP player now thanks for reading Kamik423
  22. I am experiencing the same bug: I am testing a laythe plane, wich I teleport to Laythe orbit. I do my retro burn and decouple the retro pack. the camera goes shaky and it does not exactly follow the orbital path. Also the map view states 'landed'. Setting the orbit editor to complex > Set to current > Apply fixes it, but during ascent the same thing happens and is irreversible the debug menu just states 'landing' but when doing Hyperedit it states something like setLanded(False) (I don't exactly remember) Hope that helps somehow
  23. Not sure if this has already been reported, but changing the FOV (alt+scrolling) makes the ocean angle up and be a vertical wall in front of my plane. Must be some weird issue with coordinates relative to the planet / the KSC / the craft / the camera
×
×
  • Create New...