ss8913

Members
  • Content Count

    1,221
  • Joined

  • Last visited

Everything posted by ss8913

  1. so.. is there any reason why... I launch a ship with like 8 of the 1/2 graphene curved radiators, 4 2x scaled large folding radiators, and 4 large "winged edge" radiators. The winged edge ones stay relatively cool.. wasteheat is minimal, internal temp isn't enough to make them glow. The others (who have the same max listed temp as the winged radiators, around 2200-2300 K) get super super hot.. to the point where they're glowing full hot and are actually several hundred K above their max temp (wasteheat is still mostly minimal in these too)... they don't explode from heat (and no cheats are on) but why is the heat not balanced amongst all the radiators? This craft has no couplers or anything, it's all one stage.
  2. alright well that certainly explains it then... so this reactor is for power generation only followup... reading is awesome. looks as though the pebble bed is what I should be using. think those obsolete the lightbulb for my use too. it might be cool if it were more obvious which nodes unlock which propellants for which reactor and engine combos though... or is that also there and I need to read more?
  3. a while back I posted .. I think here.. that I was going to make some code that can autogenerate a Kramax autopilot ILS flightplan for any arbitrary runway; It's done and it works. Find it in the Kramax forum if you use that mod and want to make custom autogen approaches for all these airports. That mod will land a plane accurately even with FAR, so.. it's a good combination. Some people seem to have problems with the trailing whitespace(?) which may be a windows issue.. if you have that problem just push enter at the end of the line or re-indent or whatever.. it's just python code so... anyway, dev & test on linux with python 2.x. Free to use, let me know if you like it. Makes KerbinSide a lot more useful, at least for myself
  4. so it's using diborane as a propellant (these things can't use hydrazine anymore? or am I missing an unlock?) The temp numbers are in the green, and here they are along with a basic pic of the craft: https://imgur.com/a/j0AXD2L As for the things that aren't in the dual tanks... like every mid-range propellant.. until I can unlock my engines' ability to burn hydrazine (seems like that takes a LOT of unlocks? the LANTR is currently the only one which will accept hydrazine at the level of unlock I'm at), things like liquidCO, liquidNeon, liquidArgon, liquidKrypton.. are not in the dual tanks. On the open cycle reactors... I have Liquid N2 tank -> reactor -> thermal launch nozzle set to liquidnitrogen mode. When I launch this and set to full throttle, the reactor control window says the reactor is running at like 0.51%, the engine says 0.0kN, fuel does not get used... not sure what's going on here. the reactor's ThermalPower is less than half of max... I often use this thermal launch nozzle with positron reactors and hydrazine and it works great, but I haven't unlocked that yet. I have the thermal nozzle attached directly to the open cycle gas core reactor, so the reactor is between (inline) the fuel tank and the engine. Does this need oxidizer or something? it shouldn't, nitrogen isn't even flammable...? EDIT: 1. If i replace the open cycle gas core reactor with a molten salt reactor, it's fine and it can generate thrust. 2. the available propellants seem to also depend on which *reactor* I'm using.. didn't know that.
  5. so... @FreeThinker I believe I have all but the very last thermal node unlocked in my tree. In my test of a thermal turbojet attached to one of those open cycle reactors, it made less than 1 m/s/s of acceleration.. I'll check the exact tech unlocks. As far as the lightbulbs overheating - wasteheat on the craft is near zero. It seems to be exclusively stock heat (part core temp) that is causing the engines to overheat and explode. I have the craft positively bristling with radiators, some of which far exceed (by a factor of 3) their maximum core temp and do not explode (large folding radiators), but even so, they don't keep the lightbulbs from exploding due to overheat - again, wasteheat is near zero, but the radiator core temps and the engine core temps are going critical very quickly. The ship has both graphene and titanium radiators; the titanium ones start off cool, then increase super fast to about 90% of their max core temp, and then level off. Then when I get out of atmosphere and extend those folding radiators, they immediately jump to about 3200K, which is a lot hotter than their max, but yet they don't explode (no, I don't have the temperature cheat on ). Then a little while later, the stock-heat engine overheat bar starts climbing, and the engines either explode or I have to throttle them down to near zero, at which point they ... really don't cool down appreciably.. they stay hot. And then the craft falls back to kerbin and lands in the ocean. Not sure how to make use of these engines. As I recall they used to be able to burn hydrazine, but they seem to have lost that ability. I believe I have unlocked every upgrade to the lightbulb at this point... I know hydrazine is a better fuel than diborane, but I can't seem to use that. Also of note - the "cryogenic dual tanks" cannot hold all of the propellants that the "cryogenic tanks" do.. not sure if that was intentional or not.
  6. so @FreeThinker - the lightbulbs are still getting super hot super fast... throttling them back does not alleviate the problem.. once they're hot they stay hot almost indefinitely.. at least "hours" are required to cool them. Using 1.20.5 Other issues: 1. open cycle reactor seems useless for thermal propulsion - is that the intent? 2. I've usually only played with fully-completed tech trees.. now that I'm trying to work through it, it seems that the mid-high game (I've unlocked most of the 2000-2250 nodes in CTT) the available propulsion systems at the levels you can unlock here are either too hot or not powerful/efficient enough to do anything useful. 3. It still seems possible to unlock many upgrades to technologies long before you can unlock the use of those technologies themselves, which seems like a configuration issue for the parts? am I.. unlocking things in the wrong order? Is this the desired mid/upper end of the tech tree experience before one gets to the fully-upgraded versions of everything?
  7. @FreeThinker I'm using 3.6.11... having some serious problems with the IFS Cryogenic tanks.. the CT-2503 in particular, may affect others(?) Anyway, I have a test craft using lightbulb engines and diborane. So there's a center tank, and 4 wings (using 4x radial symmetry) connected to 4 more CT-2503 tanks. I set all the tanks to Diborane. all 5 of them. I launch the craft, and the center tank is still diborane, but the side tanks have magically shifted, one to CO2 and 3 to Argon. If I revert back to VAB, the resources are wrong still. If I fix it again and launch, it breaks again.
  8. in which version of python? with a 2.7.5 interpreter on centos linux 7, it works as written. didnt test it on windows, nor with python 3.x. good to know, however. im glad the code is proving useful for others.
  9. glad it's working! yeah that'd be fine as a pinned post, if the author of the mod wishes to.. and/or it could be included with the mod. BSD license means you can do pretty much anything as long as you leave my name in the script header somewhere ... if you make any good plans for it, specifically for the new remastered kerbinside airports (ie the ones by Admiral Tigerclaw), or the new desert airport.. would love to see some. I can't play actual ksp for a few more days yet til I'm back with my regular computer
  10. alrighty, yes, I was doing the math slightly off and not converting radians back to degrees.. and a few other things... this version works now I tested it against the Kramax default ILS 09 plan and got roughly the same results (slightly different because I wasn't rounding things and just using a 4 degree glideslope; which I suppose is required to clear those mountains from MAXKY ) #!/usr/bin/python # # fpgen.py # KSP/Kramax Autopilot flightplan generator # (C) 2018 Scott Stone <ss8913@gmail.com> # # give this a runway threshhold lat/lon in decimal, plus a runway heading # it will make an approach flightplan. Defaults can be overridden on the # commandline. # # haversine formulas courtesy of: https://www.movable-type.co.uk/scripts/latlong.html # other trig formula courtesy of 11th grade math # # THIS VERSION IS FOR PYTHON 2.x # IT WILL NOT WORK AS-IS IN PYTHON 3.x # I hear if you put parens around all the print functions, it will. # import sys import math import argparse import re ### DEFAULTS # kerbals use metric, distances are in km # distances are from the runway threshhold, total not incremental _FAF_DISTANCE = 13 _IAF_DISTANCE = 23 _APP1_DISTANCE = 50 _APP2_DISTANCE = 100 _APP3_DISTANCE = 200 _FAF_ALTITUDE = -1 _IAF_ALTITUDE = -1 _APP1_ALTITUDE = 6500 _APP2_ALTITUDE = 10000 _APP3_ALTITUDE = 12000 # flare height in meters _FLARE = 25 # glideslope in degrees _GS = 4 # planetary radius in km, default is 600 for Kerbin _PLANET = "Kerbin" _RADIUS = 600.000 # fix names fix_names = { 'stop': 'STOP', 'rwy': 'FLARE', 'faf': 'FAF', 'iaf': 'IAF', 'app1': 'LOKEY', 'app2': 'HIKEY', 'app3': 'MAXKY' } # general options SCRIPT_NAME = "fpgen" SCRIPT_VERSION = "1.1.0" SCRIPT_AUTHOR = "Scott Stone <ss8913@gmail.com>" SCRIPT_COPYRIGHT = "(C) 2018 Scott Stone - distributed under BSD License" DEBUG = 0 NEWLINEFORMAT = "unix" ### SUBROUTINES def dbg(msg): if (DEBUG > 0): sys.stderr.write("DEBUG: %s\n" % (msg)) def log(msg): newline = "\n" if (NEWLINEFORMAT != "unix"): newline = "\r\n" sys.stdout.write("%s%s" % (msg, newline)) # this function does some of the work # uses the law of sines to find the altitude based on the glideslope angle # ( sin alpha / a ) == ( sin beta / b ) # or in practical terms: # ( sin glideslope / altitude) == ( sin topangle / distance ) # sin glideslope == ( altitude * sin topangle ) / distance # distance * sin glideslope == altitude * sin topangle # (distance * sin glideslope) / sin topangle == altitude def calculateAltitude(_dist, slopeAngle): # _dist is in km, we need m dist = (_dist * 1000) topAngle = float(180 - (90 + slopeAngle)) altitude = ((float(dist) * math.sin(math.radians(slopeAngle))) / (math.sin(math.radians(topAngle)))) return altitude # radius given in km here # lat/lon in signed decimal degrees # returns a value in km # TESTED: this function works properly def haversineDistance(lat1, lon1, lat2, lon2, radius): dbg("haversineDistance received [%.4f / %.4f], [%.4f / %.4f], %.4f km radius" % (lat1, lon1, lat2, lon2, radius)) R = (radius * 1000) phi_1 = math.radians(lat1) phi_2 = math.radians(lat2) delta_phi = math.radians(lat2 - lat1) delta_lambda = math.radians(lon2 - lon1) a = math.sin(delta_phi / 2.0) ** 2 + math.cos(phi_1) * math.cos(phi_2) * math.sin(delta_lambda / 2.0) ** 2 c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)) d = R * c # get kilometers dkm = d / 1000.0 return dkm # this function does most of the work def haversine(key, lat, lon, hdg, dist, appdata): # ad = float(float(dist) / float(appdata['radius'])) radius1 = (float(appdata['radius']) * 1000) dist1 = (dist * 1000) # ad = math.radians(float(float(dist1) / float ( radius1 ) ) ) ad = float(float(dist1) / float(radius1)) lat1 = math.radians(float(lat)) lon1 = math.radians(float(lon)) hdg1 = math.radians(float(hdg)) dbg("haversine function has %.4f/%.4f heading %.4f distance %.4f km" % ( float(lat), float(lon), float(hdg), float(dist))) dbg("converted values %.8f/%.8f heading %.4f radians distance %.4f m, planetary radius %.4fm" % ( lat1, lon1, hdg1, dist1, radius1)) lat2 = math.asin((math.sin(lat1) * math.cos(ad)) + math.cos(lat1) * math.sin(ad) * math.cos(hdg1)) lon2 = lon1 + math.atan2(math.sin(hdg1) * math.sin(ad) * math.cos(lat1), math.cos(ad) - math.sin(lat1) * math.sin(lat2)) rd = dict() rd['lat'] = math.degrees(lat2) rd['lon'] = math.degrees(lon2) rd['dist'] = dist rd['name'] = fix_names[key] # get altitudes from law of sines using glideslope for iaf to faf to runway else static altKey = "%s_altitude" % (key) if (int(appdata[altKey]) != -1): rd['alt'] = int(appdata[altKey]) else: rd['alt'] = (calculateAltitude(dist, float(appdata['glideslope'])) + int(appdata['rwy_altitude'])) return rd def logFlightPlan(appdata): log("KramaxAutoPilotPlans") log("{") log(" %s" % (appdata['planet'])) log(" {") log(" FlightPlan") log(" {") log(" planet = %s" % (appdata['planet'])) log(" name = %s" % (appdata['fpname'])) log(" description = %s" % (appdata['fpdesc'])) log(" WayPoints") log(" {") for k in ['app3', 'app2', 'app1', 'iaf', 'faf', 'rwy', 'stop']: log(" WayPoint") log(" {") log(" Vertical = true") if (k == "iaf"): log(" IAF = true") if (k == "faf"): log(" FAF = true") if (k == "rwy"): log(" RW = true") if (k == "stop"): log(" Stop = true") log(" lat = %.8f" % (appdata[k]['lat'])) log(" lon = %.8f" % (appdata[k]['lon'])) log(" alt = %d" % (appdata[k]['alt'])) log(" name = %s" % (fix_names[k])) log(" }") log(" }") log(" }") log(" }") log("}") ### MAIN EXECUTION # dict to store our configuration values approachData = dict() # commandline args parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", help="Enable debugging", action="store_true") parser.add_argument("-p", "--planet", help="Planet Name (dfl: %s)" % (_PLANET), default=_PLANET) parser.add_argument("-g", "--glideslope", default=_GS, help="Specify glideslope in degrees, dfl %.2f" % (_GS)) parser.add_argument("-n", "--newlineformat", help="dos or unix newlines. dfl: unix", default="unix") parser.add_argument("--name", help="Flight Plan Name (required)") parser.add_argument("--description", help="Flight Plan Description (required)") parser.add_argument("--latitude", type=float, help="Specify rwy latitude (required)") parser.add_argument("--longitude", type=float, help="Specify rwy longitude (required)") parser.add_argument("--heading", type=float, help="Runway heading in degrees (required)") parser.add_argument("-f", "--flare", type=int, default=_FLARE, help="Flare height in meters (dfl: %d)" % (_FLARE)) parser.add_argument("-r", "--radius", type=float, default=_RADIUS, help="Planetary radius in km (dfl: %.2f)" % (_RADIUS)) parser.add_argument("--faf", default=_FAF_DISTANCE, help="FAF distance in km (dfl: %.2f)" % (_FAF_DISTANCE)) parser.add_argument("--iaf", default=_IAF_DISTANCE, help="IAF distance in km (dfl: %.2f)" % (_IAF_DISTANCE)) parser.add_argument("--app1", default=_APP1_DISTANCE, help="APP1 distance in km (dfl: %.2f)" % (_APP1_DISTANCE)) parser.add_argument("--app2", default=_APP2_DISTANCE, help="APP2 distance in km (dfl: %.2f)" % (_APP2_DISTANCE)) parser.add_argument("--app3", default=_APP3_DISTANCE, help="APP3 distance in km (dfl: %.2f)" % (_APP3_DISTANCE)) parser.add_argument("-a", "--altitude", type=int, help="Runway altitude in meters MSL (required)") parser.add_argument("--fafalt", default=_FAF_ALTITUDE, help="FAF Altitude in m (dfl: %.2f)" % (_FAF_ALTITUDE)) parser.add_argument("--iafalt", default=_IAF_ALTITUDE, help="IAF Altitude in m (dfl: %.2f)" % (_IAF_ALTITUDE)) parser.add_argument("--app1alt", default=_APP1_ALTITUDE, help="APP1 Altitude in m (dfl: %.2f)" % (_APP1_ALTITUDE)) parser.add_argument("--app2alt", default=_APP2_ALTITUDE, help="APP2 Altitude in m (dfl: %.2f)" % (_APP2_ALTITUDE)) parser.add_argument("--app3alt", default=_APP3_ALTITUDE, help="APP3 Altitude in m (dfl: %.2f)" % (_APP3_ALTITUDE)) parser.add_argument("-D", "--distanceonly", help="Just calculate distance, X/Y,X/Y", action="store_true") parser.add_argument("--dlat1", type=float, help="Distance calc latitude 1") parser.add_argument("--dlon1", type=float, help="Distance calc longitude 1") parser.add_argument("--dlat2", type=float, help="Distance calc latitude 2") parser.add_argument("--dlon2", type=float, help="Distance calc longitude 2") args = parser.parse_args() if (args.debug): DEBUG = 1 if (args.distanceonly): dbg("distanceonly coords: [%.4f/%.4f %.4f/%.4f]" % (args.dlat1, args.dlon1, args.dlat2, args.dlon2)) try: d = haversineDistance(args.dlat1, args.dlon1, args.dlat2, args.dlon2, float(args.radius)) print "Distance is %.4f km" % (float(d)) except: ea = sys.exc_info() log("ERROR: %s %s" % (ea[0], ea[1])) sys.exit(1) sys.exit(0) if ( (not args.latitude) or (not args.name) or (not args.description) or (not args.longitude) or (not args.heading) or (not args.altitude)): print "Name/Description/Lat/Lon/Heading/Altitude are required arguments. Run with -h for help." sys.exit(1) NEWLINEFORMAT = args.newlineformat approachData['planet'] = args.planet approachData['fpname'] = args.name approachData['fpdesc'] = args.description approachData['glideslope'] = args.glideslope or _GS approachData['latitude'] = args.latitude approachData['longitude'] = args.longitude approachData['rwy_heading'] = args.heading approachData['rwy_altitude'] = args.altitude + args.flare approachData['stop_altitude'] = args.altitude approachData['radius'] = args.radius approachData['faf_distance'] = args.faf approachData['iaf_distance'] = args.iaf approachData['app1_distance'] = args.app1 approachData['app2_distance'] = args.app2 approachData['app3_distance'] = args.app3 approachData['faf_altitude'] = args.fafalt approachData['iaf_altitude'] = args.iafalt approachData['app1_altitude'] = args.app1alt approachData['app2_altitude'] = args.app2alt approachData['app3_altitude'] = args.app3alt if (DEBUG > 0): print approachData reverse_heading = (float(approachData['rwy_heading']) + 180) % 360 approachData['stop'] = haversine('stop', float(approachData['latitude']), float(approachData['longitude']), float(approachData['rwy_heading']), 1.0, approachData) approachData['rwy'] = haversine('rwy', float(approachData['latitude']), float(approachData['longitude']), float(approachData['rwy_heading']), 0.0, approachData) approachData['faf'] = haversine('faf', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['faf_distance']), approachData) approachData['iaf'] = haversine('iaf', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['iaf_distance']), approachData) approachData['app1'] = haversine('app1', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['app1_distance']), approachData) approachData['app2'] = haversine('app2', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['app2_distance']), approachData) approachData['app3'] = haversine('app3', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['app3_distance']), approachData) if (DEBUG > 0): print approachData for k in ['app3', 'app2', 'app1', 'iaf', 'faf', 'rwy', 'stop']: print "%s ::" % (k) print " Name :: %s" % (approachData[k]['name']) print " Lat :: %.4f" % (float(approachData[k]['lat'])) print " Lon :: %.4f" % (float(approachData[k]['lon'])) print " Dist :: %.4f km" % (float(approachData[k]['dist'])) print " Alt :: %.4f m" % (float(approachData[k]['alt'])) print "" hd = haversineDistance(float(approachData['app3']['lat']), float(approachData['app3']['lon']), float(approachData['stop']['lat']), float(approachData['stop']['lon']), float(approachData['radius'])) print "Total flight plan length: %.4f km" % (hd / 1000.00) logFlightPlan(approachData) This should produce the desired results. Again, specify radius in km (6371 for earth, 600 for kerbin). If you do not specify a radius, it defaults to Kerbin's 600km. so general usage instructions: 1. put your craft on the runway threshhold. 2. record the altitude on the altimeter (make sure it's MSL, not AGL - if it's 0, it's wrong, and get rid of that mod that changes everything to AGL ) 3. record the current latitude and longitude 4. record the current heading in degrees 5. convert current lat/lon into signed decimal - ie 17.5 latitude -48.6 longitude. not the d/m/s NSEW format. there are numerous online converters. This works the same for any planet, it is agnostic to planet size Pass these values as commandline args to the script. Run the script with -h or --help as the sole argument to see all the possible options. ** NOTE - real-world glideslopes are 3 degrees except in some weird cases. Kramax seems to like 4, at least for ILS 09. The script defaults to 4 degrees. Override with -g or --glideslope if you want 3 (or any other slope).
  11. ok I likely messed up on the implementation of the haversine functions then. I will investigate when I get home tonight. I'll use your input values as a baseline to test.
  12. interesting... are you sure the radius is right? or maybe my default radius is wrong and I tested it incorrectly. I'll double check the math tonight. interesting that a few parens was all that was needed to port to python3. as I have stated, python2 and python3 are not directly compatible which is why I stressed that this was python2 code. glad it was easy to convert for 3.
  13. it sounds related.to the other thermal engine problems that others have been reporting...
  14. which version of python? I did not test this on python 3, only on python 2.7, and I didn't test it on windows, either; python requires indentation for formatting and dos newlines might be an issue? anyway let me know what version of python you're on and we'll debug it from there, perhaps there was a problem in the original paste as well, maybe I should put it up on dropbox for direct d/l or make a github project.
  15. OK so... as I alluded to a month or two ago.. I made a python script which will take a runway threshhold lat/lon, plus a runway heading, and a few other parameters, and generate a kramax flightplan for the approach. I have completed version 1.0.0 and I think it works. I haven't fully tested it yet. I may make a github page for it. I'm going to post it here for y'all to use and comment on. I'm releasing it as BSD license which means you can do literally whatever you want with it as long as you give me credit for the original version. To the maintainers of this mod; feel free to package this with the mod if you wish. should be able to just copy and paste the below code into a file, make it executable, and run it, at least on linux. It'll likely work on windows too, if you have python for windows installed. Developed with python 2.7.x, might not work on python 3, but it might, I didn't try that. Without debug [-d] specified, it will spit out a block of text which can be copy-pasted into your FlightPlans.cfg in the mod's data directory. Give it an argument of -h for documentation on commandline options. #!/usr/bin/python # # fpgen.py # KSP/Kramax Autopilot flightplan generator # (C) 2018 Scott Stone <ss8913@gmail.com> # # give this a runway threshhold lat/lon in decimal, plus a runway heading # it will make an approach flightplan. Defaults can be overridden on the # commandline. # # haversine formulas courtesy of: https://www.movable-type.co.uk/scripts/latlong.html # other trig formula courtesy of 11th grade math # import sys import math import argparse ### DEFAULTS # kerbals use metric, distances are in km # distances are from the runway threshhold, total not incremental _FAF_DISTANCE = 13 _IAF_DISTANCE = 23 _APP1_DISTANCE = 50 _APP2_DISTANCE = 100 _APP3_DISTANCE = 200 _FAF_ALTITUDE = -1 _IAF_ALTITUDE = -1 _APP1_ALTITUDE = 6500 _APP2_ALTITUDE = 10000 _APP3_ALTITUDE = 12000 # glideslope in degrees _GS = 4 # planetary radius in km, default is 600 for Kerbin _PLANET = "Kerbin" _RADIUS = 600 # fix names fix_names = { 'stop': 'STOP', 'rwy': 'FLARE', 'faf': 'FAF', 'iaf': 'IAF', 'app1': 'LOKEY', 'app2': 'HIKEY', 'app3': 'MAXKY' } # general options SCRIPT_NAME = "fpgen" SCRIPT_VERSION = "1.0.0" SCRIPT_AUTHOR = "Scott Stone <ss8913@gmail.com>" SCRIPT_COPYRIGHT = "(C) 2018 Scott Stone - distributed under BSD License" DEBUG = 0 NEWLINEFORMAT = "unix" ### SUBROUTINES def dbg(msg): if (DEBUG > 0): sys.stderr.write("DEBUG: %s\n" % (msg)) def log(msg): newline = "\n" if (NEWLINEFORMAT != "unix"): newline = "\r\n" sys.stdout.write("%s%s" % (msg, newline)) # this function does some of the work # uses the law of sines to find the altitude based on the glideslope angle # ( sin alpha / a ) == ( sin beta / b ) # or in practical terms: # ( sin glideslope / altitude) == ( sin topangle / distance ) # sin glideslope == ( altitude * sin topangle ) / distance # distance * sin glideslope == altitude * sin topangle # (distance * sin glideslope) / sin topangle == altitude def calculateAltitude(_dist, slopeAngle): # _dist is in km, we need m dist = (_dist * 1000) topAngle = float(180 - (90 + slopeAngle)) altitude = ((float(dist) * math.sin(math.radians(slopeAngle))) / (math.sin(math.radians(topAngle)))) return altitude # this function does most of the work def haversine(key, lat, lon, hdg, dist, appdata): ad = float(float(dist) / float(appdata['radius'])) lat2 = math.asin((math.sin(float(lat)) * math.cos(ad)) + (math.cos(lat) * math.sin(ad) * math.cos(math.radians(hdg)))) lon2 = lon + (math.atan2(math.sin(math.radians(hdg)) * math.sin(ad) * math.cos(lat), math.cos(ad) - math.sin(lat) * math.sin(lat2))) rd = dict() rd['lat'] = lat2 rd['lon'] = lon2 rd['dist'] = dist rd['name'] = fix_names[key] # get altitudes from pythagorean theorm using glideslope for iaf to faf to runway else static altKey = "%s_altitude" % (key) if (int(appdata[altKey]) != -1): rd['alt'] = int(appdata[altKey]) else: rd['alt'] = (calculateAltitude(dist, float(appdata['glideslope'])) + int(appdata['rwy_altitude'])) return rd def logFlightPlan(appdata): log("KramaxAutoPilotPlans") log("{") log(" %s" % (appdata['planet'])) log(" {") log(" FlightPlan") log(" {") log(" planet = %s" % (appdata['planet'])) log(" name = %s" % (appdata['fpname'])) log(" description = %s" % (appdata['fpdesc'])) log(" WayPoints") log(" {") for k in ['app3', 'app2', 'app1', 'iaf', 'faf', 'rwy', 'stop']: log(" WayPoint") log(" {") log(" Vertical = true") if (k == "iaf"): log(" IAF = true") if (k == "faf"): log(" FAF = true") if (k == "rwy"): log(" RW = true") if (k == "stop"): log(" Stop = true") log(" lat = %.8f" % (appdata[k]['lat'])) log(" lon = %.8f" % (appdata[k]['lon'])) log(" alt = %d" % (appdata[k]['alt'])) log(" name = %s" % (fix_names[k])) log(" }") log(" }") log(" }") log(" }") log("}") ### MAIN EXECUTION # dict to store our configuration values approachData = dict() # commandline args parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", help="Enable debugging", action="store_true") parser.add_argument("-p", "--planet", help="Planet Name (dfl: %s)" % (_PLANET), default=_PLANET) parser.add_argument("-g", "--glideslope", default=_GS, help="Specify glideslope in degrees, dfl %.2f" % (_GS)) parser.add_argument("-n", "--newlineformat", help="dos or unix newlines. dfl: unix", default="unix") parser.add_argument("--name", help="Flight Plan Name (required)") parser.add_argument("--description", help="Flight Plan Description (required)") parser.add_argument("--latitude", help="Specify rwy latitude (required)") parser.add_argument("--longitude", help="Specify rwy longitude (required)") parser.add_argument("--heading", help="Runway heading in degrees (required)") parser.add_argument("-r", "--radius", default=_RADIUS, help="Planetary radius in km (dfl: %.2f)" % (_RADIUS)) parser.add_argument("--faf", default=_FAF_DISTANCE, help="FAF distance in km (dfl: %.2f)" % (_FAF_DISTANCE)) parser.add_argument("--iaf", default=_IAF_DISTANCE, help="IAF distance in km (dfl: %.2f)" % (_IAF_DISTANCE)) parser.add_argument("--app1", default=_APP1_DISTANCE, help="APP1 distance in km (dfl: %.2f)" % (_APP1_DISTANCE)) parser.add_argument("--app2", default=_APP2_DISTANCE, help="APP2 distance in km (dfl: %.2f)" % (_APP2_DISTANCE)) parser.add_argument("--app3", default=_APP3_DISTANCE, help="APP3 distance in km (dfl: %.2f)" % (_APP3_DISTANCE)) parser.add_argument("-a", "--altitude", help="Runway altitude in meters MSL (required)") parser.add_argument("--fafalt", default=_FAF_ALTITUDE, help="FAF Altitude in m (dfl: %.2f)" % (_FAF_ALTITUDE)) parser.add_argument("--iafalt", default=_IAF_ALTITUDE, help="IAF Altitude in m (dfl: %.2f)" % (_IAF_ALTITUDE)) parser.add_argument("--app1alt", default=_APP1_ALTITUDE, help="APP1 Altitude in m (dfl: %.2f)" % (_APP1_ALTITUDE)) parser.add_argument("--app2alt", default=_APP2_ALTITUDE, help="APP2 Altitude in m (dfl: %.2f)" % (_APP2_ALTITUDE)) parser.add_argument("--app3alt", default=_APP3_ALTITUDE, help="APP3 Altitude in m (dfl: %.2f)" % (_APP3_ALTITUDE)) args = parser.parse_args() if (args.debug): DEBUG = 1 if ( (not args.latitude) or (not args.name) or (not args.description) or (not args.longitude) or (not args.heading) or (not args.altitude)): print "Name/Description/Lat/Lon/Heading/Altitude are required arguments. Run with -h for help." sys.exit(1) NEWLINEFORMAT = args.newlineformat approachData['planet'] = args.planet approachData['fpname'] = args.name approachData['fpdesc'] = args.description approachData['glideslope'] = args.glideslope or _GS approachData['latitude'] = args.latitude approachData['longitude'] = args.longitude approachData['rwy_heading'] = args.heading approachData['rwy_altitude'] = args.altitude approachData['stop_altitude'] = args.altitude approachData['radius'] = args.radius approachData['faf_distance'] = args.faf approachData['iaf_distance'] = args.iaf approachData['app1_distance'] = args.app1 approachData['app2_distance'] = args.app2 approachData['app3_distance'] = args.app3 approachData['faf_altitude'] = args.fafalt approachData['iaf_altitude'] = args.iafalt approachData['app1_altitude'] = args.app1alt approachData['app2_altitude'] = args.app2alt approachData['app3_altitude'] = args.app3alt if (DEBUG > 0): print approachData reverse_heading = (float(approachData['rwy_heading']) + 180) % 360 approachData['stop'] = haversine('stop', float(approachData['latitude']), float(approachData['longitude']), float(approachData['rwy_heading']), 1.0, approachData) approachData['rwy'] = haversine('rwy', float(approachData['latitude']), float(approachData['longitude']), float(approachData['rwy_heading']), 0.0, approachData) approachData['faf'] = haversine('faf', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['faf_distance']), approachData) approachData['iaf'] = haversine('iaf', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['iaf_distance']), approachData) approachData['app1'] = haversine('app1', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['app1_distance']), approachData) approachData['app2'] = haversine('app2', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['app2_distance']), approachData) approachData['app3'] = haversine('app3', float(approachData['latitude']), float(approachData['longitude']), reverse_heading, float(approachData['app3_distance']), approachData) if (DEBUG > 0): print approachData for k in ['app3', 'app2', 'app1', 'iaf', 'faf', 'rwy', 'stop']: print "%s ::" % (k) print " Name :: %s" % (approachData[k]['name']) print " Lat :: %.4f" % (float(approachData[k]['lat'])) print " Lon :: %.4f" % (float(approachData[k]['lon'])) print " Dist :: %.4f km" % (float(approachData[k]['dist'])) print " Alt :: %.4f m" % (float(approachData[k]['alt'])) print "" logFlightPlan(approachData)
  16. This seems to be an ongoing fight between KSP's stock heat management and KSPIE's heat management/production.. ask @FreeThinker, this kind of thing has been happening for years now, updates that address the interaction with KSP's stock heat will often cause similar issues to this.. so far they've always been addressed, and pretty quickly, and I'm sure this one will be no different. Keep supplying as much detail as y'all can, if you're seeing the problem too, that helps in finding the issue.
  17. One thing to note here; I'm not seeing any more wasteheat in the radiators than I was before; it's the engines themselves overheating... like the stock "Overheat" alert bar next to the engines in the staging area in the lower left of the screen.. which I have rarely if ever seen on KSPIE engines. Not sure if that makes a difference...?
  18. so... @FreeThinker I started a new science-progression a while back... I haven't played KSP in a couple days and tonight I went back to a mission in progress coming back from Minmus; the craft in question is powered by a 3.75m lightbulb and 4 2.5m lightbulbs.. I've used this craft extensively before the recent updates. Now, however, I throttle it up and it's about 50% less powerful and it overheats in seconds causing the engines to explode. This is using LiquidFuel as a propellant (haven't unlocked everything yet). Is this intentional or is this a bug?
  19. I'll try the reactorSpeedMult thing and see how it goes. One other kind of... small thing that improves my quality of life on really large spacecraft.. I've taken to modifying the tweakscale values for the RCS resistojets to allow them to tweakscale to 2.5m. Seems odd to need RCS that big, right? but with 30,000-40,000+ ton craft... yeah you kinda need that or you need 16+ of the 1.25m to turn it, and this is a way to save on part count.
  20. this is the same issue I previously reported as well. I have found no workaround as of yet.
  21. it's not .. the problem is that the closed cycle gas core reactor is dependent upon the node that upgrades it. they're not on parallel tracks, but in-line with each other.
  22. er.. with the distances involved, it might be simpler to use simple pythagorean equations and trigonometry (ie, assume the planet is flat since we're not dealing with a terribly large bit of it)
  23. @FreeThinker I just found a large discrepancy in the CDT2504 tanks... if you fill them with LFO, you get 2880 LF, 3520 OX. If you put them to LF mode, you get *32000* units of LF, which adds about 150t to the mass of the tank... this seems like a typo or something in the part config? I haven't checked the other CDT series, but the 2504 is definitely experiencing this. EDIT: Also found some tech tree node issues - namely that upgrades to many technologies are on the same line as the technologies themselves, and come BEFORE. ie, you can get the closed cycle gas core engine upgrade 2 or 3 tiers before the closed cycle gas core engine itself. This is of course with community tech tree. I haven't played full science mode in a while so I hadn't previously noticed; no idea how long this has been broken for (or if I'm doing something wrong? is KSPIE no longer compatible with CTT? I do have CTT and everything else upgraded fully).