Jump to content

ElWanderer

Members
  • Posts

    397
  • Joined

  • Last visited

Posts posted by ElWanderer

  1. 1 hour ago, PTGFlyer said:

    ugh.

    I can't believe I forgot that.

    Thanks.

    What lines need rewriting?

    The line that compares the node's pitch and yaw to the ship's is gibberish (but presumably worked some time in the past). I'd use a vdot or vang between the node's deltav vector and SHIP:FACING:FOREVECTOR.

    There may be other problems, but that is the main one. Test it and see!

  2. 32 minutes ago, PTGFlyer said:

    I'm trying to write code to circularize an orbit, starting with adding a maneuver node at apoapsis, but all it does is add a maneuver and give the maneuver 0 dv. It won't increase it to circularize the orbit.

    SET np TO NODE(TIME:SECONDS + ETA:APOAPSIS, 0, 0, 0).
    ADD np.


    UNTIL (SHIP:APOAPSIS / SHIP:PERIAPSIS < 1.2) {
        SET np:PROGRADE TO np:PROGRADE + 10.
    }
    UNTIL (SHIP:APOAPSIS / SHIP:PERIAPSIS < 1.1) {
        SET np:PROGRADE TO np:PROGRADE + 2.
    }
    UNTIL (SHIP:APOAPSIS / SHIP:PERIAPSIS < 1.05) {
        SET np:PROGRADE TO np:PROGRADE + 1.
    }

    I then use the maneuver node script on the site. Why won't this work?

    SHIP:APOAPSIS and Periapsis won't change as a result of altering the manoeuvre node, as they return the details from the current orbit. Try using np:ORBIT:APOAPSIS and np:ORBIT:PERIAPSIS instead. I don't know why your code isn't changing the node at all, though. If you have any problems with np:ORBIT not existing, try adding a "WAIT 0." after the node is added to the flight path.

    The sample node burner script (last time I looked) doesn't work as written. It has one or two lines that need rewriting.

  3. 5 hours ago, leviathan01 said:

    when i try to run my code i get this error.

    code:

      Hide contents
    
    
    run lib_PID.
    
    set target_speed to 245.
    
    set myTh to 0.
    lock throttle to myTh.
    set myPID to PID_init( 0.05, 0.01, 0.1, 0, 1 ).
    
    until false {
    	set myTh to PID_seek(myPID, target_speed, groundSpeed).
    	wait 0.001.
    }.

     

    i cant find how to post photos so i linked to my dropbox.

    photo of the file where i put the lib:  https://www.dropbox.com/s/9tlby2q2ai5yaqv/file.PNG?dl=0

    photo of the error:  https://www.dropbox.com/s/l5xkwpscojqlt0s/kos.PNG?dl=0

    What does lib_PID look like, and is there a reason you're using that rather than the built-in PIDLOOP? http://ksp-kos.github.io/KOS_DOC/structures/misc/pidloop.html

  4. I spent a lot more time designing/building when I first started, especially in putting together a Jool 5 mission. A lot of time was spent in an Excel spreadsheet trying to work out lander designs.

    Now, though, I would say my time is roughly 5% in the editor, 20% flying (which is mostly automated) and 75% writing kOS scripts. Oh, I forgot to allocate time for reading the forum/reddit...

  5. "The only thing I can think of that may have screwed me over is if I docked an older ship at the station before meeting all the requirements."

    Yes, that would be the culprit if you did that.

    If you're up to save game file viewing/editing, I think it's the launch ID that KSP uses to keep track of what order things were launched in and whether they were before or after certain contracts being accepted, but I don't know the details. When ships are docked together, it's the eldest/lowest launch ID that counts for the new vessel.

    Using the debug menu is easier if you're sure you've met the terms of the contract.

  6. I had to figure it all out (with a lot of referring to online resources and other people's efforts) for my kOS scripts. I've automated rendezvous from launch to taking up station 25m away from the target. I found matching inclination the hardest part to get my head around. Once you've matched inclination and know that the to orbits intersect somewhere, it's all a matter of timing. I don't see how you'd do all this without mods that supply additional information about your orbit and that of the target (KER, Mechjeb, etc.) or else just using a huge amount of delta-v to brute force it.

  7. 10 hours ago, LN400 said:

    What concerns me the most when it comes to using aerodynamics like described above is heat. Last return almost ended in shouting and cursing. The returning ship was

    Pod Mk I

    2x Equipment bays with assorted science gear

    Heat shield with 40 units.

    + parachutes.

    Total mass less than 2 tons.

    From 45,000 meters and all the way down to around 16,000 where the heat dropped, KER told me the pod was about to explode almost constantly. I went shield first or so I thought but even then did the pod get heated up to just below critical. Exposing solar panels and parachutes has also ended in rapid evaporation of those parts. Seems to me having anything other than the heat shield exposed is a sure way to see fireworks. This is with an initial apo at 71,000 and peri at 40,000-55,000.

    With that combination of apoapsis and periapsis, you're spending a lot of time in the upper atmosphere where you will generate heat but not much drag. I use a 85km by 30km orbit for re-entry with a pod (and a heat shield with about 20% ablator). It seems to be better to get down through the upper atmosphere quickly, but not to set the periapsis so low that you smash into the lower atmosphere at too high a speed.

    Do you get the same critical heat built-up if you get rid of one of the service bays? The heat shield occludes something akin to a cone behind it, rather than a cylinder, so if your craft is too tall you may still have hot air hitting your pod.

  8. 12 hours ago, Benji13 said:

    I was just wondering, are engine clusters worth the extra weight compared to single engines? Or is it just less efficient and heavier? Also, if any combination of engines is better than a single, larger engine, what ones? 

    So many questions...

    For a first stage, the weight is less important than it is for upper stages. I often find myself using multiple Reliants or Swivels instead of a Skipper. In career mode, this can save you a little bit of money. It's just a pity most of the multi-node adaptors appear so late in the tech tree, by which time money probably doesn't matter.

  9. If you have engines with different Isp values firing at the same time, you need to calculate a combined, thrust-weighted Isp, as per LN400's link.

    However, you mention having SRBs. Unless they burn for roughly the same length of time as the liquid engines, then you have effectively staged (and chances are you will actually have staged by dropping the boosters). For each stage, you need to do a separate calculation. This is more complicated if engines from more than one stage are firing at the same time. You need to calculate how long the SRBs will be firing and from that calculate how much fuel mass the liquid engines will use. Then you can calculate the delta-v of the first stage with the SRBs attached, and the delta-v of the remaining stage after they have burned out / been jettisoned.

    This can be worked out by hand, but it's much easier with a tool of some kind. I wrote myself a spreadsheet to do the calculations but I also use KER now.

  10. 47 minutes ago, steuben said:

    to quote Kalileo "And yet it moves."  I don't think he really said it, but it makes a good closing line at the end of his trial.

    Don't forget Minmus rotates under the satellite. Pics are blocked on this machine... but my rough guess is that the 35-40 degrees you're seeing is the rotation of Minmus relative to the fixed plane of the polar orbit. I'm sure somebody will bring in the math to support it.

    I believe you have identified the cause, yes. In the images, the orbital inclination is 88°, but the orbital period is 5 days. According to the wiki, Minmus takes a little under 2 days to complete one revolution on its axis. :)

  11. The equation for orbital period is 2.π.√(a^3 / mu)

    a is the semi-major axis. Bear in mind that is the average of the apoapsis and periapsis from the centre of the orbit I.e. if you're orbiting Kerbin add 600km to the average of the displayed Ap and Pe.

    mu is the gravitational parameter, formed of the planet's mass times Newton's gravitational constant (it's often written as GM instead of mu). You can find this value on the wiki page for each planet.

    You can rearrange the equation to get the semi-major axis you will need for a given orbital period a = ((mu.period^2)/(4.π^2))^1/3

    You need to know the time until the other craft gets to the intercept point to use this, though.

    I have made extensive use of OhioBob's page: http://www.braeunig.us/space/orbmech.htm

    I needed to calculate this for my rendezvous program (kOS script), but in-game it's easier just to plot a manoeuvre node at the intercept and watch the intercept markers move as you add/remove delta-v to the burn.

  12. My Tylo figures were 3150m/s to land, 2700m/s to get back to orbit. I would budget a minimum of 2400m/s for Vall (I used 1200 down, 970 up).

    As Tylo ascent is fairly similar to a round trip on Vall in delta-v terms, I've always (well, both times) designed a lander that could easily do Vall (and the outer moons with mostly-empty tanks) then stuck a Tylo descent module on the bottom. That'll get disposed of or left behind.

    I tried two options: one where the descent module landed (required legs and lots of ladders; EVA packs will not get you back up to the upper module!) and one where the descent module was dropped at the last moment, the main lander taking over for touchdown (made the descent module easier to design as I could use a bigger engine without worrying about ladders, but meant the actual lander needed a little more fuel and the switchover occurred at the scariest point of the landing). Neither was perfect.

  13. I use kOS to do this, so I can't describe my deorbit burn in terms of the map. After a rough calculation followed by some trial and error, I came up with the following for a typical command module + heat shield + a few small components set-up:

    Starting from an 85km by 85km orbit, burn retrograde when your longitude is 150°, bringing the periapsis down to 29km. That requires a little under 50m/s. It usually pops the pod down in the sea a few kilometres East of KSC (whose longitude is -74°/286°). Edited to add: the periapsis is at longitude 330° when created, but due to the rotation of Kerbin it would be about 315° when reached if the atmosphere weren't there. So the pod lands about 30° short of the estimated periapsis longitude.

    I realise that for a space plane you'll probably want something wildly different. It might also differ by craft unless you can get a similar drag to mass ratio (or ballistic coefficient).

    I've not yet tackled a targeted re-entry from a moon return but testing shows a command module with a periapsis of 30km usually ends up at a longitude 20° beyond the (predicted, as if there were no atmosphere) longitude of the periapsis. In comparison, a small return probe with a 1.25m heat shield went only 6° beyond.

    Edited to add: for all these re-entries, I point to normal a short interval before reaching the atmosphere and stage off any parts that won't be coming home. I found that staging whilst pointing retrograde or prograde sometimes had too much effect on the periapsis.

  14. 9 hours ago, RS25forlife said:

    Is it possible to lock the steering to x degrees above the prograde vector?

    Someone said ship:bearing is the heading of the prograde vector, but it's not. 

    The following is a modification of my constant altitude burn (lander) steering. I've not tested this version:

    LOCK STEERING TO LOOKDIRUP(ANGLEAXIS(pitchAngle(),VCRS(VELOCITY:SURFACE,BODY:POSITION))*VELOCITY:SURFACE,FACING:TOPVECTOR).

    The vector cross of the surface velocity and body position gives an axis to rotate the prograde vector around (it returns a vector that is at 90° to both input vectors). I get easily confused by rotations, but I quite like ANGLEAXIS(rotation angle, axis vector) * vector to rotate.

    The pitchAngle() function you can replace/get to return whatever number of degrees you like. Note that as the KSP coordinate system is confusing and left-handed, you may find that you need to supply a negative number to pitch up. My own version points to retrograde amongst other differences.

    Edit: The bearing suffix gives you a compass bearing to that vessel from your own vessel. That implies that ship:bearing is a bearing from your vessel... to your vessel. As such it's undefined and will return gibberish. It's a relic of the original development.

  15. What version are you running? I found in v1.0.x, the difference between the orbital calculation for a loaded vessel and that when on rails (the former is done by Unity and less precise) was big enough to cause major problems trying to get to Minmus. I'd get a perfect intercept that would vanish on hitting time warp, while back in real-time it'd constantly flicker between two different orbits, one good one bad. I was hoping this would be better in v1.1.x, but I've not had the chance to try it properly yet.

    I think this is partly a case of floating point arithmetic being very susceptible to small errors, partly that Minmus's sphere of influence is tiny.

  16. 5 hours ago, ctbram said:

    Of course it would be nice if there was a more intuitive error message like no comm link or something.  This message reminds me of the old joke about just replacing all the gauges in my car with a single red led and when it comes on the "experienced" driver would just know what is broken! Although as I think about it "out of range might infer a communications link issue".

    You're not the only one to be confused by the message: https://www.reddit.com/r/Kos/comments/4s6l66/switch_to_error/

    It sounds like the devs are amenable to changing it to be clearer.

  17. 1 hour ago, Corona688 said:

    Now that's advice I can use.  Thanks.

    Does this mean we're getting more boost for free now, being able to turn earlier?

    One way of putting it is that before the v1.0 atmosphere/aerodynamics update, the recommended delta-v to orbit was 4500m/s. It is now more like 3200m/s.

    They reduced the ISP values of (nearly) all the engines to counter-balance this, though. An aerodynamic rocket flown with an old-style "gravity" turn in versions up to v0.90 should get to orbit about as well with a true gravity turn in v1.0+

    Disclaimer: there are some exceptions e.g. if you had a rocket that used a Rhino, Terrier or Poodle low in the atmosphere, it may struggle with lack of thrust.

  18. If you hit F3 to bring up the log, which part is exploding first?

    Are the doors of the science junior open? Duringthe v1.1 pre-release, I remember a lot of people reporting that the science junior doors would stick out beyond the protection of the heat shield and overheat. I'm not sure of the status of that now.

    Are you able to maintain a heat shield first orientation? That set-up sounds like it may want to flip and fly capsule first once in the atmosphere.

    Lastly, if the atmosphere seems to act really weirdly, it may be that your physics.cfg file is out of whack and needs regenerating (Steam validate local files? Delete and let the game recreate on start-up?)

  19. On 06/21/2016 at 0:53 AM, marcoboy123 said:

    I never knew there were a contract for an North->South Orbit around a planet >_>

    But if you're on the other side of the planet at that time, it'll be a "South->North" orbit...

    The plane of any inclined orbit around Kerbin will pass over the Kerbal Space Center twice a day, once ascending ("South to North") and once descending ("North to South"). To launch into that plane at any given alignment window, you need to check first whether to turn Northwards or Southwards.

    An orbit's inclination is always a positive number. The Longitude of the Ascending Node tells you how the orbit is aligned with respect to a universal prime direction (two otherwise identical polar orbits would have their LANs 180° apart if they're going in opposite directions), but this isn't visible in-game without using mods. It's easier to align visually than to worry about the numbers.

  20. My approach (pre-v1.0) was to take two landers and a nuclear tug. Lander one was a spaceplane to visit Laythe. The second had two stages: Tylo descent and Tylo ascent. The ascent stage was then used to land on all the other moons. For Pol and Bop, the lander was short-fueled (Tylo ascent is about 2750m/s, Vall is about 2400m/s in total, the others you only need 600m/s each) so that the tug used less fuel moving them about. I parked the mothership inside of Tylo's orbit, but had to go into Tylo orbit to rendezvous with and refuel the tug after over-estimating the delta-v that the tug had when carrying the full lander stack.

    If you leave anything in a highly-elliptical Jool orbit, bear in mind you'll need to keep checking for encounters and make course corrections as necessary to avoid collisions/getting flung out of the system.

×
×
  • Create New...