# Nich

Members

1,226

1. ## [KSP 1.12.x] kOS v1.4.0.0: kOS Scriptable Autopilot System

I am attempting to write my launch code for RP-0 but my clamps keep dropping my engines before they are spooled up So vessels have MAXTHRUST MAXTHRUSTAT() AVAILABLETHRUST AVAILABLETHRUSTAT() But these appear to have the post spool up values before the engines spool up And it appears what I have been looking for is THRUST is only available for single engines. I hate working with lists. How would I step through the list for all engines summing current thrust? local function Thrust { Set TotalThrust to 0. List Engines in AllMyEngines. For i in AllMyEngines { TotalThrust = TotalThrust+i:Thrust. } return Thrust. }
2. ## How do you do a gravity turn?

Been busy with work so I have not had much time to work on this but I have been thinking about it. Please leave any comments or suggestions The area under the curve is the altitude (m/s * s) Since this is roughly triangular I feel it is a good enough approximation to assume Final AP = 1/2*base*height. Base is fixed and is the burn time (398s). Final AP is 150,000m (user specified). Height is the maximum vertical speed. 150,000*2/398 = 754m/s From here is gets a little tricky. The shape of the triangle can anything from a right triangle to an equilateral and my previous assumption is still valid. Now I think the best way to go is to assume Min and Max points I feel the triangle should be allowed to have. The first makes sense to me and is the midpoint of the burn (398/2). The other I will have to take from the empirical data. (398/1.65). From this I can make 2 lines to use during phase 1 of launch line 1 (0,0) to (199,754) and line 2 (0,0) to (241,754). When line 1 is crossed the rocket will pitch up relative to prograde and line 2 will pitch down. Phase 2 starts when a vertical speed of 754 is reached. At this time we will construct a new line from (398,0) to (x,754) and use a PID to track this line to the end of the burn. Phase 3 will track 0m/s vertical speed until circularized.
3. ## How much of your staged rockets do you recover?

Stage recovery is the best. I feel it is a little to generous with the recovery so as an RP rule I have to run a "SIM" to make sure the lower stages are actually recoverable
4. ## Ksp object crafting?

Intersteller launch pads lets you take mined ore and special parts and build things I think.
5. ## Discussion: what are the best ways to reduce launch cost?

I have tried this again and again but I can never surpass 1100 kredits/ton. I think KSP tanks are too heavy to make it doable. I should try this in RSS but there engine burn times would probably limit you from doing anything useful. I think there is one soviet sustainer that might be usable.
6. ## RP-0 lag

My old RP-0 save got so laggy and buggy it was unplayable. I started a new career but it seems I have already slowed down to 2:1 on a basic barely orbital rocket. Any suggestions or should I just reinstall? I felt like I managed to get Moon orbit or landing by the time the yellow timer started to appear.
7. ## Asymmetrical drag from symmetrically placed parts?

Yes, devs have said aero forces are not accurate/to scale. I don't believe they have put much work into this.
8. ## How do you do a gravity turn?

Vertical Speed vs Time has a very nice linear graph. I will have to try something with this in the logic
9. ## How do you do a gravity turn?

@Snark After thinking about it Pitch based off speed doesn't work. If you start off too low on your turn will will gain speed faster which will cause you to pitch faster causing you to burn up in the atmosphere and fail to reach target AP. If you start to high you will not gain speed fast enough and by the time you reach target AP you will have a ton on vertical speed left making circulatization impossible. I did graph the data. Target was 155x155 orbit. If I manually cut the throttle I probably could have had a 150x400 orbit. As you can see final circulization was at 186km with 159 m/s vertical speed. I have also included the CSV data at the very end. *Second Vertical speed is supposed to be Expected AP. Expected AP is calculated off the following code. It is not too bad but I think it can be better set AP0 to apoapsis. //Starting AP wait 2. set TWR to maxthrust/mass/9.8. //TWR is used to modulate rate TWR is growing //The next equation does a lot. //First we calculate the rate that AP is growing //(APCurrent-APTwoSecondsAgo)/2 Seconds gives the rate that AP is increasing at. //Next we divide this rate in half because we want to to reduce to 0 at the end of the burn. //This assumes linear rate of decay (think Triangle) //Normalize this by multiplying by AverageTWR/CurrentTWR. I hard coded 2.38 for the moment. //I think this value is too high at the moment. I calcualted dv/burntime/9.8 or 9300/398/9.8. //This inculded the first stage and 300 dv not needed from the final stage. //If I remove these I end up with more like 2.29 set APdelta to (apoapsis-AP0)*2.38/4/TWR. //Take the rate that AP is growing and multiply it by the remaining burn time then add that //to the current AP to get estimated AP set APexp to apoapsis+(APdelta*(duration-time+time0):seconds). altitude, airspeed, prograde, vertical speed, expected AP, Time 766, 83, 83.66, , 82, 35087, 376 2730, 193, 72.02, 184, 76994, 361 6413, 356, 59.48, 307, 133036, 346 11998, 580, 48.81, 437, 138720, 331 19480, 831, 40.51, 540, 168867, 316 28064, 1098, 33.4, 618, 172181, 301 37654, 1428, 28.51, 674, 179925, 286 48408, 1877, 23.87, 760, 195218, 271 60660, 2485, 20.68, 877, 226553, 256 74411, 2877, 18.24, 901, 236201, 241 87558, 3058, 16.14, 850, 239711, 226 100027, 3269, 14.33, 809, 234115, 211 111860, 3496, 12.55, 759, 241813, 195 122796, 3691, 10.88, 697, 212022, 180 132839, 3920, 9.39, 640, 207316, 165 142062, 4187, 8.07, 588, 204923, 150 150406, 4355, 6.87, 521, 199519, 135 157742, 4528, 5.77, 455, 194893, 120 164105, 4722, 4.72, 392, 191664, 105 169548, 4952, 3.86, 333, 189799, 90 174144, 5217, 3.07, 279, 188904, 75 177973, 5524, 2.4, 231, 188864, 60 181230, 5914, 1.85, 191, 189841, 45 183893, 6409, 1.48, 166, 192853, 30 186306, 7059, 1.29, 159, 210205, 15
10. ## How do you do a gravity turn?

Thanks not a bad suggestion. It will at least make visualizing the problem easier.
11. ## How do you do a gravity turn?

@Starman4308 Thanks, I adjusted the STEERINGMANAGER:MAXSTOPPINGTIME to 10 STEERINGMANAGER:PITCHPID:KD to 2 STEERINGMANAGER:YAWPID:KD to 2 because originally it would just spammed all 4 RCS ports randomly until it ran out of fuel. Now at least it spams them in a random fashion that tends towards the target. Interestingly pitch worked pretty well with acceptable over corrections for a PID but yaw was spamming 50% left 50% right the entire time. I will admit the controller does a great job when you have vectored thrust. I will have to try a vehicle with more RCS and the default settings. I suspect the KOS PID needs a larger dead zone and more dampening. If I ever get this launch script working writing my own RCS controller not based off a PID.
12. ## How do you do a gravity turn?

ROFL. It is amazing how easily I can do it and how hard it is to tell a computer to do it. I just tested it and sure enough my turn was perfect. Following SRFPROGRADE the entire way up ended in a 800x150 orbit with 400 dv left. I am still upset with the KOS PID. It used 4000 helium, MJ used 400 and I can do it using 40 . Now I just need to make correction logic that does nothing and circularization logic. Just incase anyone want to use my turn logic I thought I would share. It probably needs to be tested and tweeked for a starting SLT TWR of 1.1 but for 1.48 it is perfect wait until airspeed > -300*maxthrust/mass/9.8+490. set mypitch to 85. set mysteer to heading(myheading,mypitch). wait until arctan(verticalspeed/groundspeed)<85. lock steering to srfprograde.
13. ## Discussion: what are the best ways to reduce launch cost?

There was a disposable cost/ton challenge years ago and the competition started in the 800-1000 range but in the end people managed to get it down to the 450ish range. One thing I took from the competition was decouplers, nose cones, and control surfaces are really expensive. SRBs are ok but they are not as cheap as you think. Twin boars and poodles were high value engines.
14. ## How do you do a gravity turn?

@Laie Sounds pretty similar to what I am doing. Phase 1 launch Heading(90, 90) Phase 2 Initiate turn based off Speed = f(TWR) Phase 3 Follow surface prograde until 45 degrees or 10% peak dynamic pressure Phase 4 (Killing me) Minor adjustments to Fix AP Phase 5 (have not started but doesn't seem too hard) accelerate to orbital velocity and circularize For this particular rocket I have phase 2 nailed and if it would just follow prograde it would be perfect. Currently the program can vary pitch infinitely but perhaps I should tie it into Prograde so that it cant run away. This rocket suffers from lack of significant control authority the last 2 minutes of its flight (3-8 degrees max)
15. ## How do you do a gravity turn?

@suicidejunkie Sorry forgot to mention playing in RP-0 so most launch engines don't have throttle. You do make a good point as I was using current accelerations and rates to make my predictions but I could probably find a way to average the remaining stages together and then use that to make my predictions. Challenging but feasible Thanks for the inspiration.
16. ## How do you do a gravity turn?

Or more precisely how do you correct a gravity turn mid flight? So I have started playing with KOS and I am trying to figure out how to do a gravity turn. I am attempting to write a generic script that can work with a range of vehicles. I have written, what I feel, are a couple of really good predictive scripts that use TWR, Dynamic pressure, AP, Time to AP, vertical speed and Burn time. But they keep getting messed up by the changing TWR and staging. When TWR goes up the craft pitches down too early. Then at staging when TWR drops it realizes it has to pitch up a lot. I attempted using a TWR correction factor with little success as it appears the relationship is very non-linear. So I think I need a way to minimize pitching adjustments as TWR departs from average. Perhaps 1/((AverageTWR-TWR)^2+1/TWR). Would average acceleration would be DV/BurnTime? Thus making average TWR = Average Acceleration/9.8. I am just about out of ideas and the last thing I want to do is build a lookup table and fly to that.
17. ## Discussion: what are the best ways to reduce launch cost?

I have found rather then saving Kredits you are better off making more. Combining 5 missions into 1 will make way more then the best SSTO space planes could ever save. Unless you are playing with 10% funds or something crazy.
18. ## How to get an orbit with little fuel

I believe it was a 2 stage reliant with no fins. But it my have been a single stage. Required a perfect gravity turn and reaction wheels to prevent flipping. It was also a 1 way trip
19. ## KSP exploration contracts getting annoying

Problem is explore Duna and explore Jool are they same type and rejecting Duna makes Jool less likely. I recommend the mod Strategio or something along those line. RP-0 is also very good about giving GOAL contracts vs JOB contracts, but that is a whole nother beast
20. ## What is the most HORRIBLE way one of your kerbals died

Abandoned in space forever due to a new version update
21. ## Space Atmospheric Flight Mod

Infinite fuel and an engine pointing straight down
22. ## How to get an orbit with little fuel

I have not played stock in years but I remember getting Mun flybys with starting parts. Orbit shouldn't be too hard hard. But yes I always go for milestones anyways they pay better in career mode. My first three flights 1. flying and upper 2. Suborbital 3. Orbit
23. ## [1.2.2] Realistic Progression Zero (RP-0) - Lightweight RealismOverhaul career v0.54 June 15

So I have a question about the limited attitude control probes. These seem to have full control when using Flight computer or Mech Jeb. Is this intentional or a limitation of modding? Lately I have been playing MJ only when avionics are unlocked but flight computer gets control even if avionics are locked. I was thinking about only allowing commands to be uploaded when avionics are unlocked as I have come to realize how powerful the flight computer is when you get familiar with it.
24. ## [1.4.1] ScrapYard - The Common Part Inventory - 1.1.0.107 (2018-03-18)

Currently playing RP-0 with KCT version 1.3.5.7 anyone know what version of scrap yard is compatible?
25. ## Mechjeb 2 stopped working

I have been playing RP-0 and my power likes to brown out or cut out for a couple mili seconds once or twice a day. If this happens while I am playing KSP and flying a ship I will lose the ability to access any MJ windows I had open. Namely Orbit info and DV info. I had been able to fix it a couple times by uninstalling MJ in CKAN then deleting the folder and reinstalling it. This last time it did not work. I attempted deleting the origional zip file and having CKAN redownload but to no avail. MJ refuses to load now but I can see it in the gamedata folder. Any ideas on what MJ has its hooks in I may need to repair? At this point I am just making a new 1.2.2 install and redoing everything hoping my career at least transfers.
×

• #### Community

• Release Notes

• #### Social Media

• Store
×
• Create New...