Jump to content

Kurospidey

Members
  • Posts

    5
  • Joined

  • Last visited

Reputation

0 Neutral

Profile Information

  • About me
    Bottle Rocketeer
  1. You're correct Queso Explosivo, that was exactly my mistake. I was calculating it always with the same distance, not taking into account it varies as the ship goes up. Stupid mistake. Anyways thanks for your answer.
  2. Hi guys. I need help from the scientific "experts" here. The thing is I've been trying to calculate the different terminal velocities through Kerbin's atmosphere according to KSP physics, but my results are off compared to the table that is on the Wiki. Link to the wiki table: http://wiki.kerbalspaceprogram.com/wiki/Kerbin#Terminal_Velocity_Table 1. Formula for the atmospheric pressure: where: p0 is the atmospheric pressure at sea level (1). e is the e constant (2,71828183). a is the ship altitude (will vary). H is the scale height (5000). 2. Formula for the atmospheric density: where: K is a KSP constant (1,2230948554874). 3. Formula for the force of drag: where: v is the ship velocity (will vary). d is the coefficient of drag (0.2). m is the ship mass (not needed). 4. Formula for the force of gravity: where: G is the gravitational constant (6.674E-11). M is Kerbin mass (5.2915793E+22). r is Kerbin radius (600000). 5. If for terminal velocity: then: that is the same as: With this last formula I calculate the terminal velocities for different altitudes. My offset grows expotentially as the altitude goes up: [TABLE=class: grid, width: 500, align: center] [TR] [TD]Altitude[/TD] [TD]Wiki velocity[/TD] [TD]My velocity[/TD] [/TR] [TR] [TD]75[/TD] [TD]100.9[/TD] [TD]100.88[/TD] [/TR] [TR] [TD]1000[/TD] [TD]110.5[/TD] [TD]110.66[/TD] [/TR] [TR] [TD]2000[/TD] [TD]121.9[/TD] [TD]122.30[/TD] [/TR] [TR] [TD]3000[/TD] [TD]134.5[/TD] [TD]135.16[/TD] [/TR] [TR] [TD]4000[/TD] [TD]148.4[/TD] [TD]149.37[/TD] [/TR] [TR] [TD]5000[/TD] [TD]163.7[/TD] [TD]165.08[/TD] [/TR] [TR] [TD]6000[/TD] [TD]180.6[/TD] [TD]182.45[/TD] [/TR] [TR] [TD]7000[/TD] [TD]199.3[/TD] [TD]201.63[/TD] [/TR] [TR] [TD]8000[/TD] [TD]219.9[/TD] [TD]222.84[/TD] [/TR] [TR] [TD]9000[/TD] [TD]242.6[/TD] [TD]246.28[/TD] [/TR] [TR] [TD]10000[/TD] [TD]267.7[/TD] [TD]272.18[/TD] [/TR] [TR] [TD]12500[/TD] [TD]342.4[/TD] [TD]349.48[/TD] [/TR] [TR] [TD]15000[/TD] [TD]437.8[/TD] [TD]448.75[/TD] [/TR] [TR] [TD]20000[/TD] [TD]716[/TD] [TD]739.86[/TD] [/TR] [TR] [TD]32000[/TD] [TD]2332[/TD] [TD]2456.42[/TD] [/TR] [/TABLE] Any idea as to why is this happening? I've tried rounding all my numers to two decimal places but I'm not getting the same results as the wiki. Do I have anything wrong in my formula? Or maybe I'm calculating it wrong? (I'm using libreoffice calc). Any help would be appreciated. Thanks for reading.
  3. Hi guys. I just needed a little help with my first program for kOS (I assume this is the right place to post this?). I know it's a little rough... // ######################################### // ##### LAUNCH TO ORBIT. ##### // ######################################### clearscreen. // VARIABLE DECLARATION declare status. // program status declare mt. // mission time declare svel. // ship surface velocity declare alt. // ship altitude declare tlf. // total liquid fuel left declare slf. // current stage liquid fuel left declare steer. // the direction the ship is steering to declare thr. // throttle percentage declare tvel. // ship terminal velocity // INITIAL VARIABLE SETTING set mt to missiontime -11. set status to "Status: Idle.". set thr to 1. set tvel to 100.9. // MAIN LOOP until ship:altitude > 250000 { set mt to mt + 1. // Counting down. set svel to round(velocity:surface:mag). set alt to round(ship:altitude). set slf to round(stage:liquidfuel). set tlf to round(ship:liquidfuel). // ASCENTION INITIATION. if mt = -6 { set status to "Status: Throttled engines to 100%.". lock throttle to thr. }. if mt = -4 { set status to "Status: Locked steering to upwards direction". lock steering to up + R(0,0,-180). }. if mt = -2 or mt = -1 { set status to "Status: Ready to go in... " + abs(mt). }. if mt = 0 { set status to "Status: Lift off!". stage. }. // VERTICAL ASCENT if mt = 1 { set status to "Status: Vertical ascent.". }. // MAINTAIN TERMINAL VELOCITY lock throttle to thr. if tvel < svel { set thr to 0. } else { set thr to 1. }. if alt < 1000 { set tvel to 110.5. } else if alt > 1000 and alt < 2000 { set tvel to 121.9. } else if alt > 2000 and alt < 3000 { set tvel to 134.5. } else if alt > 3000 and alt < 4000 { set tvel to 148.4. } else if alt > 4000 and alt < 5000 { set tvel to 163.7. } else if alt > 5000 and alt < 6000 { set tvel to 180.6. } else if alt > 6000 and alt < 7000 { set tvel to 199.3. } else if alt > 7000 and alt < 8000 { set tvel to 219.9. } else if alt > 8000 and alt < 9000 { set tvel to 242.6. } else if alt > 9000 and alt < 10000 { set tvel to 267.7. } else if alt > 10000 and alt < 12500 { set tvel to 342.4. } else if alt > 12500 and alt < 15000 { set tvel to 437.8. } else if alt > 15000 and alt < 20000 { set tvel to 716. } else { set tvel to 2332. }. // STAGING // SCREEN PRINTING clearscreen. print "##### ASCENTION PROTOCOL v 0.1 #####" at (7,1). print "####################################" at (7,2). print "--------------------------------------------------" at (0,4). print "|" at (0,5). print status at (5,5). print "|" at (50,5). print "--------------------------------------------------" at (0,6). print " -----------------------------------" at (0,8). print "|" at (15,9). print "|" at (50,9). print " -----------------------------------" at (0,10). print "Mission time: " + mt at (19,9). print "--------------------DATA TRACK--------------------" at (0,16). print "|" at (0,17). print "|" at (50,17). print "|" at (0,18). print "Surface vel.: " + svel at (5,18). print "Terminal vel.: " + tvel at (25,18). print "|" at (50,18). print "|" at (0,19). print "|" at (50,19). print "|" at (0,20). print "Altitude: " + alt at (5,20). print "Thrust: " + thr at (25,20). print "|" at (50,20). print "|" at (0,21). print "|" at (50,21). print "|" at (0,22). print "Stage Fuel: " + slf at (5,22). print "Total Fuel: " + tlf at (25,22). print "|" at (50,22). print "--------------------------------------------------" at (0,23). wait 1. }. My problem is that I can't do the auto-staging cause kOS doesn't recognize the stage fuel left. It prints the total fuel left as the same amount as the stage fuel left. So I don't know what condition to give for it to work. Any help?
  4. Hi, I just wanted to say this mod is awesome! Keep up the good work. A couple of suggestions to make this mod even more amazing: - Procedural engines. Being able to change form, size with radial or attachable engines. Either way I love this mod! Thanks for making it.
  5. Hi guys, first post here. I've been having problems making this mod work. I have the toobar installed (1.7.6), the module manager (2.3.5) and a ton of different mod (MechJeb, FAR, B9, KAS, KW Rocketry, etc.). My problem is the button doesn't appear on the toolbar. It just doesn't appear. I've downloaded the Connected Living Space mod that works with this one and it appears, but this one doesn't and I don't know why. Any help?
×
×
  • Create New...