Jump to content

wizzlebippi

Members
  • Posts

    179
  • Joined

  • Last visited

Everything posted by wizzlebippi

  1. That didn't fix it. To better prove the issue in the log, is there an equivalent of & for appending strings in C#?
  2. I'm trying to get the outside air temperature for calculating the speed of sound. For some reason: FlightGlobals.getExternalTemperature(FlightGlobals.ship_position) returns ground speed. Did I do something wrong or is this a bug?
  3. It looks like I was bested by windows 8 once again. I was unknowingly using the metro version of visual studio 2013, which limits you to a portable class library. I switched to the desktop version, and everything magically worked. Thanks for the help.
  4. I uninstalled and reinstalled .net 3.5 just to be sure, but that didn't fix anything. I also went to the folder Echo suggested, and it was there. The last thing I can think of is that I'm using the wrong kind of project, something that's not compatible with .net 3.5. The KSP wiki said to use a C# class library, and I chose the "Class Library (Portable for Universal Apps)" because it was the first option I saw.
  5. The lowest I can go is .net 4.0. I enabled .net 3.5 in the control panel (built into windows 8.1), but I can't target anything lower than 4.0 in visual studio express 2013. Is there something I missed?
  6. Then what should I be targeting and can I get there with visual studio express 2013?
  7. The script compiles and runs, but it doesn't work in KSP. I'm getting this error in the debug console: [Exception]: FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
  8. Thanks, but I'm still having problems and I can't seem to find an answer. How do I display a variable (type double) in a GUI window? I can successfully draw the window, and I can display a string, but I can't do calculated numbers. So far all I've figured out is this works nothing like VB.net.
  9. For starters, I'm not new to coding, just new to C# and poking around in KSP. All I have right now is 4 broken lines of code that display a window without drawing anything. All I'm trying to put in this window is currently the hard coded value of a variable. Does anyone have a few lines code that demonstrates this?
  10. Mods are written to access core code from the outside, and consequently have a very different structure. Merging different code is a difficult process.
  11. How to balance jet engines? Keep Isp constant and scale thrust with dynamic pressure/Mach number. The biggest catch is Mach number involves actually computing airspeed and not basing everything off ground speed.
  12. First, e=1 means the wing has a perfectly elliptical lift distribution, not planform. Modern airliners are designed to have e be very near 1 at cruise to minimize drag via blended airfoils, twist, and taper. Second, aspect ratio tends to be inversely proportional to e because more of the span behaves in a 2D'ish manner making lift distribution more rectangular. Finally, e's effect on lift and drag is a second order at best. Leaving it between 0.7 and 0.9 won't hurt anything.
  13. That's right, how to fix most of KSP's weird aerodynamics and absurd engine performance, in one simple to describe step. Airspeed. Right now everything in KSP is referenced of surface speed, which is absolutely meaningless for aerodynamics and engine performance. Assume surface speed equals true airspeed and convert to equivalent airspeed. This alone will probably solve the vast majority of KSP's aerodynamic weirdness.
  14. The LV-N is basically a nuclear reactor that super heats fuel (specifically hydrogen) to produce thrust. When it's not producing thrust, it should be able to produce power like one of the nuclear geneators. When it's producing thrust, I don't think it should produce power at all because all that energy is going into thrust.
  15. Right now, everything in ksp (AFAIK) is based on ground or surface speed, which is fine for a rocket, and it's all you care about it orbit. The problem aerodynamics is all based off of indicated airspeed and it really hampers realism for aircraft and spaceplanes in atmosphere. So, I propose that ksp use equivalent airspeed in aerodynamics and engine performance. Here's how: Lets start with assumptions: 1. There is no wind in the Kerbal universe. This makes ground speed = true air speed, or the number they tell you for how fast an aircraft actually goes. 2. Every planet in the Kerbal universe has a standard atmosphere and never changes. This makes calibrated airspeed = equivalent airspeed. 3. Every instrument for measuring airpseed has zero error. This makes indicated airspeed = calibrated airspeed = equivalent airspeed. 4. Sea level density on Kerbin is used as a reference. Finally, for some math. equivalent airspeed = ground speed * sqrt(local density/reference density) For how this will behave, in a vacuum, your airspeed will be zero because there's no air. As you climb, if your surface speed stays constant, your airspeed will decrease. If you take a spaceplane to Eve, your airspeed will be significantly higher than on Kerbin, causing more drag. Likewise, on Duna you will have a low airspeed and less drag. There's a large number of aerydynamic issues missing from ksp that can be solved with airspeed. If your aircraft stalls at 100m/s, it will always stall at 100m/s. If your aircraft overspeeds and falls apart at 500m/s, it will always fall apart at 500m/s.
  16. The asymmetric space station is easy because only surfaces with another part attached need to be excluded, assuming the attaching part occupies the entire surface. For something on the surface of the cylinder, I wouldn't worry about it because the change in wetted area is small. There's no reason why any part would need to be excluded there. The space shuttle scenario is much harder because I'm not sure how to exclude parts that are not exposed. Without a class of parts designed to shield parts they contain from the atmosphere or a way to define a structure as a cargo bay, I don't know how that would work. Even then it might be helpful to know the drag coefficient with the bay open. For what you would need to calculate a drag buildup on, I would go with stages. For a 3 stage rocket, you need to do 1-3, 2-3, and 3. I've personally build various rockets with 20+ stages, so that could take a while. But since each collection of stages would be reduced to a single drag coefficient, that's not too much of a problem. Docking clamps present a problem though because that would change the craft's drag coefficient and simply adding the two doesn't work.
  17. For stability, yes. For lift and drag, there's a far simpler way. At it's simplest, a rocket is a cylinder with a cone on top. Two basic shapes that have a very well understood drag profile, even in combination. There's data for boxes, bowls, struts, and everything else someone felt the need or was bored enough to stick in a wind tunnel. The overall shape isn't terribly important, as long as you can construct it using basic shapes and know their orientation and dimensions. By using known drag data with known dimensions, a drag coefficient can be calculated using a basic drag buildup. From there's it's a basic sophomore year homework problem to calculate drag force. For adding boosters, you simply add a interference drag multiplier based on the strut height and diameter. Wings don't add much complexity, though there's an induced drag factor to consider as well, and they should assume a reasonable craft lift coefficient of something like 1.5. To implement this in game, the ideal place would be after construction and storing the calculated coefficient for later. Simply take known dimensions, look for fayed surfaces, and calculate a drag coefficient based on known profiles. From there's it shouldn't be much more complex than what KSP's already doing. Wave drag is even easier since you could assume it's a constant multiplier for everything. We don't need absolute realism, just realistic tendencies. The real catch is all this discussion is trivial unless KSP implements some sort of indicated airspeed system. Currently it's groundspeed only, which is fine for orbital calculations, but makes for poor aerodynamics. This isn't even that hard, because you could assume there's no wind in the Kerbal universe and use ground speed as true airspeed to convert to equivalent airspeed, and with a few assumptions later that's good enough.
  18. Why is everyone so determined to have ksp performing CFD? What the dev's really need to be doing is reading Hoerner Fluid Dynamic Lift and Fluid Dynamic Drag for subsonic flow along with NACA TN 1135 for supersonic flow. There's more than enough information there to construct a very good and accurate drag model that doesn't eat the entire CPU. Remember, aircraft/rockets have been around for far longer than computers.
  19. Actually both theories are only part of how wings produce lift. If you really want to get technical, the reason (mathematically) why wings produce lift is because of circulation. Lift equals air density times forward velocity times circulation (L=ÃÂVΓ). Circulation is centered around the maximum thickness of the airfoil (Usually between 25-30% of the wing chord in subsonic flight). This shows up in Bernouli as the force causing air on top of the wing to be faster than the air below the wing. Circulation also extends far beyond the wing, causing upwash infront of the wing and downwash behind it, as vexx32 described. Finally, becuase a wing is a 3d object, higher pressure air below the wing curls up around the wingtip. This causes the center of circulation to move backwards as it approaches the wingtip resulting is wingtip vorticies and cool pictures.
  20. I'm not going for pure realism, just realistic tendencies. If ksp is going to be used to educate people on aircraft and spaceflight, parts in the game need to behave in a realistic manner. For example, how thrust scales with altitude in ksp isn't great, but it's understandable. The engine only needs so much air and the extra intakes just add drag. In the real world you can't just strap extra intakes to your aircraft to go higher, and you do loose thrust with altitude just because ambient pressure decreases. This is one aspect of jet engines in ksp that has no bearing on reality, and I'd like to see it fixed.
  21. All wings must maintain angle of attack (AoA) to produce lift. On real aircraft, the wing is mounted at some incidence angle to the fuselage that usually corresponds to the AoA needed for cruise flight. This allows the fuselage to stay level while the wing has some AoA, minimizing drag. KSP seems to keep the fuselage and the wing at the same angle of incidence, requiring some angle of pitch to give the wing AoA.
  22. I obviously screwed up this morning when I posted. Yes, when at high enough speeds the turbojet core of the SR-71's engines was near useless and the afterburner served as the flameholder for the ramjet. I stand corrected. But my point still stands. There is no reason why a turbofan jet engine would only put out 50% of it's rated thrust at takeoff and hit max thrust at a speed that mechanical jet engines largely become useless at. If you're going to schedule thrust off speed, there should be a reason for it and intake selection makes sense.
  23. @Dodgey. I meant exactly what I said. The intake diameter increases to slow air down before it hits the fan and air doesn't necessarily take a direct path into the core on a modern multi-stage engine, slowing it further. Also, many airliners on trans oceanic flights cruise at closer to 0.9 Mach. I also meant engine. A ramjet engine has no moving parts because air is compressed aerodynamically. @pa1983. Yes, the SR-71 did rely on afterburners, but not to the extent you're thinking. They were used on takeoff for extra thrust, though the aircraft had 65,000lbs of thrust without them, and for passing Mach 1. Beyond that, they burned too much fuel for continuous operation. Here's a picture of how air moved through the SR-71's engines. http://en.wikipedia.org/wiki/File:SR71_J58_Engine_Airflow_Patterns.svg
  24. Right now in KSP, jet engine performance is completely arbitrary. The turbofan and RAPIER engines mysteriously reach peak thrust at 1000m/s (about mach 3 at sea level ISA) and produce only half that at 0m/s. No jet engine in existance does that! The SR-71 could go Mach 3+, but with 50% efficiency at takeoff, it would struggle just to get off the ground. What I propose is basing thrust off intake "efficiency". For example, the radial and circular intakes are only efficient up to 500-600m/s where the ram air intake is worthless at low speeds, but really comes alive at 400-500m/s and allows you to go as fast as you want. This would at least better represent reality where fighter jets get plenty of thrust on the ground and at high speed due to variable geometry intakes and nozzles. If you really want to get technical with it, any mechanical jet engine shouldn't allow you to go faster than about 1200-1500m/s. This is because the compressor can't eat air moving at faster than 0.3 Mach. Beyond that, you could add a ramjet engine for additional speed, though I don't think it's very necessary for KSP.
×
×
  • Create New...