Jump to content

cantab

Members
  • Posts

    6,521
  • Joined

  • Last visited

Everything posted by cantab

  1. Between Galileo's patch and the official release, is anything likely to break in a basic RSS install besides ships getting moved to different planets? (Which I know how to fix my saves for.)
  2. Ahem, I've been a bit of a slowpoke. Rossum 3 Rocket: Modified "Science Jr". Extra science, chutes, batteries, and windproof antenna added. Boosters removed and upper stage short-fuelled. This time we'll be making a series of suborbital flights in a multistage rocket and conducting science experiments automatically during the flight. The code demonstrates the use of a function to perform a series of actions. It also shows the use of kRPC's built-in autopilot feature. And there are a bunch of print() functions to put diagnostic information on the command line. The flight path is crude, it's controlled by manually changing the hardcoded numbers in the script between flights, and the way science is handled is not ideal. But it works. Up to nearly 250 science in the save now. I don't fully understand why part.experiment.data returns a list. That was the tricky bit of the API to understand for me, doesn't an experiment only have one piece of data? Or are there some that contain multiple? To the extent possible under law, I waive all copyright and related or neighboring rights to the Python code in this post. This work is published from the United Kingdom. https://creativecommons.org/publicdomain/zero/1.0/ import time import krpc # First we check the science we have and decide if it wants transmitting or dumping # THEN we run experiments # This might seem backwards but there's a simple reason - part.experiment.run() returns instantly # but the experiment actually takes time to run # and I don't wish to do a guesswork sleep command def doscience(vessel): for part in vessel.parts.with_module('ModuleScienceExperiment'): # it throws an exception if the experiment already has data for data in part.experiment.data: print("Handling", part.title) if data.transmit_value > 0.1: print("Transmitting", part.title, "for", data.transmit_value) part.experiment.transmit() elif data.science_value < 0.1: print("Dumping", part.title, "for", data.science_value) part.experiment.dump() if part.experiment.has_data == False and part.experiment.inoperable == False: print("Running", part.title) part.experiment.run() #basic setup stuff conn = krpc.connect(name='Rossum 3') vessel = conn.space_center.active_vessel vessel.control.sas = True vessel.control.throttle = 1 prevbiome = vessel.biome prevsituation = vessel.situation #can't hurt to see what there is on the pad :) doscience(vessel) # launch! vessel.control.activate_next_stage() # go straight up for a bit while vessel.flight().mean_altitude < 2500: time.sleep(1) # set autopilot to pitch over vessel.control.sas = False vessel.auto_pilot.target_pitch_and_heading(60, 270) vessel.auto_pilot.engage() # 'main loop' # first fly the rocket! Just stage when thrust is zero. # that only works for simple serial staged rockets # Then do the science if the biome or situation have changed while True: if vessel.thrust == 0 and vessel.control.current_stage != 0: vessel.control.activate_next_stage() if vessel.biome != prevbiome or vessel.situation != prevsituation: print(vessel.biome, vessel.situation) doscience(vessel) prevbiome = vessel.biome prevsituation = vessel.situation time.sleep(1) Next time will be a big milestone - I'll be writing my first script to launch to orbit.
  3. Playability. Old Leouch had about 20 atm pressure at datum and descending into its rift was slow. Epic, but slow. Also too much pressure and rockets won't lift you back off. You can use propellers but again it'll be a slow ascent.
  4. Just like to say thank you for this mod, it is BadS. I'm still at rank amateur stage but it should be a fun way to learn Python that hopefully I'll stick to.
  5. On the other hand, didn't the exercises show that one F22 could probably beat a whole bunch of F16s?
  6. Rossum 2 Rocket: Jumping Flea The mission is much the same as before, flying straight up using SAS then opening parachutes when we reach our highest point, but this time it will be fully automated from launch to landing. We'll also run the science experiments. I'm playing with all parts unlocked but I still like collecting science, it's a way to measure my progress in exploring the system. As far as the python code goes, we make use of a couple of loops. Python makes it very easy to loop over all the elements of a list. The documentation provided with kRPC is excellent, it's made the code easy to write even as a real novice. To the extent possible under law, I waive all copyright and related or neighboring rights to the Python code in this post. This work is published from the United Kingdom. https://creativecommons.org/publicdomain/zero/1.0/ # Get the basics set up and the vessel ready for launch import time import krpc conn = krpc.connect(name='Rossum 2') vessel = conn.space_center.active_vessel vessel.control.sas = True vessel.control.throttle = 1 # launch! vessel.control.activate_next_stage() # wait until we reach our highest point and begin descending # this is an inefficient way to do this, using a stream would be better while vessel.flight(vessel.orbit.body.reference_frame).vertical_speed > 0: time.sleep(1) # turn SAS off and open the chutes vessel.control.sas = False vessel.control.activate_next_stage() # run science experiment on each part with one for part in vessel.parts.with_module('ModuleScienceExperiment'): part.experiment.run()
  7. Rossum 1 Rocket: Jumping Flea (Stock) For this I simply typed in commands to python interactively. There is nothing fancy in the slightest, but it demonstrates the system works. thomas@spelvia:~$ python3 Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import krpc >>> conn = krpc.connect(name='Connection 1')>>> vessel = conn.space_center.active_vessel >>> vessel.control.sas = true Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'true' is not defined Whoops! Now I learn Python is case-sensitive. >>> vessel.control.sas = True >>> vessel.control.activate_next_stage() [] And we have liftoff! Without ever touching the spacebar in Kerbal itself. Now I waited until the rocket reached apoapsis, then >>> vessel.control.activate_next_stage() [] >>> vessel.control.sas = False >>> Activate the next stage, which is the parachute, and turn SAS back off so it doesn't fight the aerodynamics. After a safe landing, recovered the vessel manually. So of course this was really really basic. I can improve this by triggering the next stage automatically at a suitable moment, and also look at running the science experiments.
  8. Time to fly rockets with kRPC and Python. I know very little Python and am hoping this will be a fun way of learning the basics. Like how when I was a kid at school and we'd write programs to make the turtle drive around, only with rockets. In future I will make this opening post prettier and more detailed and so on. I just want to get the thread started now My rules: All flight of unmanned vehicles, and most flight of manned vehicles, to be conducted using kRPC. Manual control inputs to be kept to a minimum. To focus on the Python coding, all rockets to be 'off the shelf' - the game's stock craft, craft from KerbalX or this forum, etc. Light non-structural modifications, for example changing science equipment, is allowed. Rossum Program The Rossum Program will be my first steps.
  9. A width of 20 inches corresponds to about a 21.5 inch diagonal for a 1080p screen, or 23 inch if there's virtually no bezel. There are still options there, though I don't think much in the way of adaptive sync or 120/144 Hz stuff.
  10. By claiming that the mod violated the EULA all along, perhaps. Which arguably it did. In any case, as the GTA situation showed, a big corporation can simply make legal threats backed up with their wallet. No real merit is required to simply intimidate their opponents into giving up.
  11. Boycotting the vote due to the absence of non-US entries. Booooo. That said, the objective best performer is probably the F-22 anyway. In exercises the Typhoon and Rafale have given it a run for its money in visual range particularly, but the F-22 is more stealthy which should make it a stronger package overall. And the F-35 is inferior to the F-22. Comparison with non-NATO fighters is harder but I'm sceptical the Russians or Chinese have anything better. My personal favourite, though, has to be the Harrier. Thanks to the elegance of its VTOL system, its proven ability to hold its own against supersonic opponents, and a spot of national pride.
  12. Hullo, my name is Scott Manley and I am a Kerbaholic. (If I was Scott Manley, and quitting Kerbal.)
  13. What you are describing is something operating systems and applications already do. It's known as collecting entropy, external sources of randomness from the computer's environment. It's not truly 'software only', it relies on a hardware source of randomness, just not a dedicated source. Mouse movements, keystroke timings, microphone noise, and so on are used. (Recording the letters typed would generally not be very helpful, and security concerns mean it's better to discard that and just use the keystroke timings). Even if the first number of such a value is quite predictable, the last decimal place is very random. The entropy is then fed into the random number generator. The algorithms need to remove any biases that might be present in the entropy source. The amount of entropy can also be evaluated, and this gives two options. The software can be sure to not produce more numbers than it has bits of entropy to make truly random, which means the numbers are truly random but they might be delayed coming if the entropy source is inadequate. Or the software can 'stretch' the entropy by being a pseudorandom number generator, which means numbers can come as fast as the CPU can calculate but they are not truly random. For example on Linux /dev/random takes the former approach and /dev/urandom takes the latter. For most applications urandom is better. EDIT PS: Although, an increasingly common approach is to use a dedicated hardware random number generator. Modern CPUs or chipsets typically have one built in, and these usually work by amplifying the thermal or electrical 'noise' present in chips. However not all programs and operating systems make use of them. EDIT PPS: On Linux I can monitor how many bits of entropy the RNG has. In normal use it's around 3800 (max is 4096). If I start writing pseudorandom data from /dev/urandom to disk it doesn't bat an eyelid, copying a gigabyte in a few seconds. If I start writing truly random data from /dev/random to disk the amount of entropy promptly drops to near zero and the speed of the disk writes slows to a crawl, under a kilobyte per minute, as it waits for more entropy to come in.
  14. That part is a limitation of Transfer Window Planner. It can only handle transfers between two parents of the same body, for example two planets of the Sun or two moons of Sonnah. (Similarly, in the stock system TWP could not give you a transfer from Laythe to Kerbin.)
  15. The stands look flimsy but they do seem to hold it alright laid horizontal. I'm certainly less worried about it on the stands than I am having it upright. Bumping it around on the table it slides rather than toppling off the stands. Pity it's not possible to display it 'exploded'. You'd need to get some more stands for that.
  16. Haha. I did take a selfie, but I'm afraid I shan't be uploading it. Maybe I'll do a full mission sequence later. Also, I 'know' about the tyranny of the rocket equation, but I don't think I've ever felt it like I did holding the first stage and third stage of this model side-by-side with their vast difference in size. And to think that the first stage got it from 0 to 2800 m/s, the second from 2800 to 7000, and that diddy little third stage powered from 7000 to 11,000 m/s.
  17. And mine is complete. I'm still giggling at the sheer scale of the thing, it's quite impressive, especially next to the teeny-tiny astronaut nanofigs. (Although, they're a bit out of scale, corresponding to a person just 4'4". Limitations of the medium I guess.) My shuttle set is nice but the Saturn V just blows it out of the water. It does not have any internal detail. Each stage has a central structural core which uses some big quarter-round segments and other parts, and then curved tiles on plates attach to the side to make the outside. There are some clever ways the various bits are attached. It's possible Lego felt they couldn't include the internal detail and a means to view it without compromising the model strength. Some of the Star Wars UCS ships use a Technic framework to support them, but not the Saturn V. If I have a criticism, it's that the Service Module is very plain. It has a nod to the RCS quads and that's about it for detail. Compared to the F-1 engines, the Lunar Module, and the rocket body itself, it felt like a bit of a letdown. I know it's small but I feel they could have done a bit more there, even just an antenna would have been something. They've done a nice job of making everything 'work' though, you can configure it for every stage of the mission.
  18. I gather everyone around a table and get out some parchment for character sheets.
  19. It's here. It's here! Some shops are selling it a bit early, including John Lewis in the UK! People have it! I have one! \o/ £110 in Britain, $120 in the USA I think. Which might seem expensive if you're not an AFOL but is actually cheaper than many of their adult-oriented sets, and a low price considering the piece count. With those 1969 pieces it's very fortunate that Lego have done numbered bags. (Bag 1 has the pieces for the first part of the build, then Bag 2 for the next, and so on). 12 of them, and I've built the first 3. Which is just the first stage, not even finished yet, without the engines, and I already get a sense of just how huge this is going to be. Be a bit careful with the build, some steps are fiddly and the incomplete model may have weak points that are only reinforced later.
  20. Airbrakes? Inflatable heatshield? If it's a return mission, land near-empty and fuel up with ISRU? You'll probably need to use rockets for the final braking though. And don't forget to target low(ish) ground.
  21. I look forward to it. Although it was never really New Horizons I was waiting on to resume my NH save, but FAR.
×
×
  • Create New...