Jump to content

Kerbart

Members
  • Posts

    4,572
  • Joined

  • Last visited

Everything posted by Kerbart

  1. I forgot the colon at the end of the def statements (Typing on an uncomfortable keyboard)
  2. Theoretically it should still work, as it's equivalent to a pass statement.
  3. import time def generic_check(check_function, duration=2.0, interval=0.5) start_time = time.time() while time.time() < start_time + duration: check_function() time.sleep(interval) def check_my_sensors_yo(): ... # check sensors for 3 seconds generic_check(check_my_sensors_yo, 3.0, .1)
  4. I think that adding mass to the system is the key. Although adding mass at the end didn't do anything for me.
  5. It depends on what you want to achieve. I think this is what you're looking for, in this case in a loop that roughly runs 10x per second: import time while True: # do things time.sleep(0.10) The advantage is that your code will "go to sleep" for the amount of time specified, instead of running a loop thousands of time checking the time (and eating up processor capacity). You'll need some kind of break statement to escape the loop, at one point. Or change the while clause.
  6. Having briefly followed this thread, here's some advice I'd like to give: 1) Focus on learning the language first. I think you're doing that. 2) Write some aeronatics-related code. For instance, write a script that simulates a rocket launch in .05s intervals (or any duration really). You can use data from KSP, and see how your model stacks up against "reality" - and implementing KSP's atmo model will be a good exercise 3) Get the kRPC mod and write software to control a KSP rocket through a Python script That will keep you busy for a while, learning lots of skills that are applicable for what you want to achieve. You can go to coder.com to use an online version of VSCode to get started.
  7. Yes and no. As a first language Python is great because there aren’t many pitfalls for starters; the most common ones are basically of the “don’t do it the way you’re used to in C/Java/other curly braces language” but if that knowledge is not there there’s nothing to avoid. Python’s avoidance of system related issues (memory allocation, pointer arithmetic) is of course not beneficial if the goal is to learn about computers and how they’re programmed. And C is hard to beat for its bear-metal performance, albeit with the risk if focus on code efficiency instead of efficient algorithms, For someone with no affinity to programming I think it’s easier to start with Python, and once the concepts of “variables” and “functions” have grown roots it will be a lot easier to learn C No contest.Visual Studio Code, these days. Free, powerful, and you’re able to use it on any machine, with practically any language.
  8. Exactly. It can generate local “wind data” based on some factors (biome, lattitude, time of day, air pressure, random numbers) and spin the blades accordingly.
  9. Or squad could just add a wind powered generator that can create electricity at certain planets or moons (and spins when it does so). Astroneer has that implemented.
  10. In folded position they cannot house Kerbals, that’s probably why.
  11. Some experimenting: It's perfectly reproducable You don't need to use the robotic part, just having octoganol struts attached to it will do the trick And you have to extend the solar panels Go to space center (or other craft) - no time acceleration needed - and return to watch the show.
  12. I’m sure the robotic parts have something to dowith it, but that’s easy to experiment with. i also remember Das Valdez complaining about the colliders of the octagonal struts, so that’s probably part of the puzzle as well.
  13. I didn’t realize how cutting edge the model rocket world is. A circuit board of 3g and 36x18mm is considered “huge” and will lead to a one ton missile? Assuming an Ardino is only 1g, that 2g difference matters that much?!
  14. This may be called “realism” and a reason why one doesn’t see said contraptions in real life. Is it possibe to mount them on an unpowered hinge and use a hydraulic piston to operate them? Using tiny servos to unfold large structures works fine in space, but as soon as real torque starts working on a fulcrum you want something with leverage to put/hold it in place.
  15. Tall wheels make traversing over rough terrain easier. Planetary surfaces tend to be rough terrain. Hence... ”But Kerbart, wouldn’t tracks even be better suited for rough terrain?” why yes, but weight and power restrictions make them by far less attractive.
  16. When you connect them, so they are driving the same axle: yes When you stack them, so one drive the other who drives the axle: no. Assume you have two motors, each delivering 1 kW. The power output is torque x angular velocity (basic physics). We can agree that the speed on the axle is twice of what each motor delivers. And that the power output is twice of what each of them delivers (barring any losses, bla bla bla...) If we have twice the power, with twice the RPM, what do you think happened to the torque?
  17. I just saw EJ SA retweeting a video where someone used hydraulic pistons as suspension, driving over the cawlway in an exceptionally smooth fasion.
  18. I think you’re falling for a classic physics trap. Imagine a rope with two donkeys, one on each end. They’re both pulling with 1000 N on the rope. What is the stress the rope us under? It’s easy to think 2000 N because that’s on both ends, right? Wrong! Replace one donkey with a wall that the rope is tied to, and it’s obvious that the rope endures 1000 N of tension. The same is going on when stacking two rotors, except that it’s torque instead of linear force. But the concept remains the same. Stacking two rotors is not going to make them twice as strong together. It does double the rotation speed though (well, in a perfect world at least).
  19. Without knowing what causes that limit it’s hard to tell. Perhaps, inside the Unity Physics model, angular velocity is stored but it causes some kind of overflow effect above 500 rpm? Gets out slide ruler 500 RPM is about 52 rad/s (note to self: 10 RPM is roughly 1 rad/sec. Interesting but makes sense. Good rule of thumb to remember) which in itself doesn’t seem to be a magical number... but who knows? Anyway if the issue is angular velocity per part, than stacking the rotors will not really solve things. However it seems to make this nice humming noise that sounds exactly like a Kraken invocation so by all means, continue your experiments and don’t forget to post videos!
  20. Are you sure it’s the robotics that bug out? I have a very similar problem in a configuration featuring: hinges (as opposed to the hydraulic cylinders you seem to be using) 6x1 solar panels (as opposed to the gigantors you are using) small cube octagonal strut (hmmm...) What’s more, the problem seems to be with the solar panels (or the octagonals?) bugging out, not the hinges (although there’s certainly a connection) - but only after using the hinges, going to the space center and time acceleration.
  21. Well, the screen shot is showing at least 15 extra toolbar buttons, so we know that mods is “a lot”
  22. That's what I'm thinking. Squad mentioned that 500 RPM is kinda like "light speed" which is why they limited their max RPM to 480. The glitches you're seeing are probably the "why"
  23. The code contains some inefficiencies. You might want to put more work in studying the language. You’ll end up writing less code, and less code means less mistakes.
×
×
  • Create New...