Jump to content

pmborg

Members
  • Posts

    957
  • Joined

  • Last visited

Everything posted by pmborg

  1. This is the version of today, Improved the awareness about the current phase of flight: Or the same flight will a perspective view of SpaceX Camera Stile: Another file ready, for now: Falcon-Return.c // -------------------------------------------------------------------------------------------- // Filename: Falcon-Return.c // -------------------------------------------------------------------------------------------- // KOS Scripts for KSP to be used on SpaceX_Launch_Vehicles Mod with (Pmborg RO Version) // -------------------------------------------------------------------------------------------- // Code by : Pmborg - https://forum.kerbalspaceprogram.com/index.php?/profile/198861-pmborg/ // Downloaded from: https://www.dropbox.com/sh/jd1oh6d806iyat1/AABa7aXbiYDfv8G-aQ4MyR-ta?dl=0 // 1/Nov/2020 // -------------------------------------------------------------------------------------------- function boostback_burn { update_phase_title("BOOSTBACK BURN", 1). set warp to 0. SAS OFF. SET step to TRUE. set impactDist to 999999. until step = FALSE { SET prev_impactDist to impactDist. steerToTarget(0, coreAdjustLatOffset, coreAdjustLngOffset). // Calculate: impactDist if(impactDist < 1000) { print "OP3: impactDist < 1km " at (0,2). SET thrust TO 0.05. RCS ON. }else if(impactDist < 10000){ print "OP2: impactDist < 10km " at (0,2). SET thrust TO 0.1. }else{ print "OP1: impactDist > 10km " at (0,2). SET thrust TO 1. } if (impactDist < 1000) and (impactDist > prev_impactDist) { SET thrust TO 0. break. } PRINT_STATUS (3). } } //////////////////////////////////////////////////////////////////////////////////////////////// function waitAndDoReEntryburn { update_phase_title("WAIT4RE-ENTRY BURN", 1). SET step to TRUE. wait 1. set x to 0. until step = FALSE { SET last_impactDist to impactDist. updateHoverSteering(). if SHIP:ALTITUDE < 32000 { if x = 0 { update_phase_title("RE-ENTRY BURN", 1). set x to 1. SAS OFF. RCS ON. SET thrust to 1. } steerToTarget(83, 0, 0). } if(SHIP:VERTICALSPEED > 15) and (SHIP:ALTITUDE < 32000) { SET thrust to 0. SET step to false. } // Conditional: steerToTarget if ADDONS:TR:AVAILABLE and ADDONS:TR:HASIMPACT SET impactDist TO horizontalDistance(LATLNG(LandingTarget:LAT, LandingTarget:LNG), ADDONS:TR:IMPACTPOS). PRINT_STATUS (3). } } //////////////////////////////////////////////////////////////////////////////////////////////// function aerodynamic_guidance { update_phase_title("AERODYNAMIC GUIDANCE", 1). UNLOCK STEERING. RCS OFF. until (GROUNDSPEED < 1) or (ALTITUDE <= (sBurnDist+1300)) { SAS ON. set sasmode TO "ANTITARGET". if ADDONS:TR:AVAILABLE and ADDONS:TR:HASIMPACT SET impactDist TO horizontalDistance(LATLNG(LandingTarget:LAT, LandingTarget:LNG), ADDONS:TR:IMPACTPOS). PRINT_STATUS (3). } } //////////////////////////////////////////////////////////////////////////////////////////////// function smoothguidance { update_phase_title("LANDING BURN", 1). SAS OFF. RCS ON. SET step to TRUE. until step = FALSE { setHoverMaxSteerAngle(10). setHoverMaxHorizSpeed(10). SET maxDescendSpeed TO 45. updateHoverSteering(). steerToTarget(steeringPitch/1.3, 0, 0). if (alt:radar>1000) setHoverDescendSpeed(maxDescendSpeed,0.75). else setHoverDescendSpeed(15,0.75). PRINT_STATUS (3). if ((impactDist/1000 < 0.1) and (alt:radar<1200)) or (alt:radar<1200) break. } } //////////////////////////////////////////////////////////////////////////////////////////////// function touchdown { SAS OFF. update_phase_title("TOUCHDOWN",1). SET step to TRUE. set x to 0. set checkgear to 0. until step = FALSE { if alt:radar < 250 and checkgear = 0 { GEAR ON. set checkgear to 1. } if (alt:radar-30) < 250 set rate to steeringPitch. else set rate to 80. if GROUNDSPEED < 5 { set rate to 85. set x to 1. } updateHoverSteering(). steerToTarget(rate, 0, 0). if alt:radar > 100 setHoverDescendSpeed(2+(alt:radar/10),0.55). else setHoverDescendSpeed(4,0.5). PRINT_STATUS (3). print "max pitch: "+rate at (0,22). if(SHIP:STATUS="LANDED") SET step TO FALSE. } } //////////////////////////////////////////////////////////////////////////////////////////////// function rocketshutdown { update_phase_title("SECURE ROCKET",1). SET thrust to 0. unlock throttle. UNLOCK STEERING. shutDownAllEngines(). if KUniverse:ActiveVessel = SHIP set target to BODY("Earth"). SAS on. set SASMODE to "STABILITY". wait 3. SAS OFF. RCS OFF. } //////////////////////////////////////////////////////////////////////////////////////////////// // START: //////////////////////////////////////////////////////////////////////////////////////////////// CLEARSCREEN. SET thrust TO 0. lock throttle to thrust. steerToTarget(0, coreAdjustLatOffset, coreAdjustLngOffset). // Calculate: impactDist if (impactDist > 1000) and (altitude > 50000) boostback_burn(). unlock steering. set sasmode TO "PROGRADE". SAS ON. RCS OFF. until (altitude > 140000) or (SHIP:VERTICALSPEED < 0) PRINT_STATUS (3). update_phase_title("STEERING ANTITARGET", 1). set target TO LandingZone. wait 1. set sasmode TO "ANTITARGET". RCS ON. update_phase_title("( GRID FINS DEPLOY)", 1). BRAKES ON. waitAndDoReEntryburn (). activateOneEngine(). aerodynamic_guidance(). smoothguidance(). touchdown(). rocketshutdown().
  2. Fixed another bug related with that sometimes... the side boosters of falcon heavy were rolling after separation and because of that sometimes collided main core: Bug: { update_phase_title("[2] Sleep on Separation ",0). unlock throttle. UNLOCK STEERING. SAS OFF. stage. shutDownAllEngines(). wait 5. update_phase_title("[3] STEERING RETROGRADE ",0). SAS ON. AG6 ON. //retrograde set sasmode TO "RETROGRADE". wait 1. LOCK STEERING TO SHIP:RETROGRADE. wait 3. } Fixed, a small thing made all the difference: { update_phase_title("[2] Sleep on Separation ",0). unlock throttle. UNLOCK STEERING. SAS ON. //RCS ON. stage. wait 5. update_phase_title("[3] STEERING RETROGRADE ",0). //SAS ON. RCS ON. AG6 ON. //retrograde set sasmode TO "RETROGRADE". wait 1. LOCK STEERING TO SHIP:RETROGRADE. wait 3. }
  3. @PART[KK_SPX_F9LandingLeg]:FINAL { %MODULE[ATGroundAnchor] { %Controllable = true %AutoAttach = true } %MODULE[ModuleWheelBase] { %wheelColliderTransformName = wheelCollider %wheelType = LEG %adherentStart = 0.01 %frictionAdherent = 3.9 %peakStart = 0.02 %frictionPeak = 4.0 %limitStart = 7.0 %frictionLimit = 4.0 %FitWheelColliderToMesh = False %radius = 0.12 %center = 0,0,0 %mass = 0.040 %autoFrictionAvailable = False %clipObject = piston_collider %groundHeightOffset = 1.37 } %MODULE[ModuleWheelBrakes] { %baseModuleIndex = 0 %maxBrakeTorque = 200000 %brakeResponse = 1 } } I think I will use this for now at least solve the problem: FILE: fix-landing-legs.cfg
  4. This is the problem of slipping , after landing: It seams that the solutions that work in terrain don't work here because rocket is in touch with another vessel (Landing Zone 2): I think that the solution that @allista use for anchor hangars, might also solve this problem, any other ideas?
  5. The ideal thing would be each booster run their own code, like they are doing, but once in KSP have a limitation that only the active vessel can target a "target", and that is the base of the code, with this limitation will not be possible to land them both in current KSP versions. But I will try anyway to do something about it, or at least I will try to put the other stage as a slave of the main one, (but this is not what happens in reality.) But this detail once is hard to overcome is not a priority in the agenda.
  6. Hello, Currently the KOS code work, but sometimes, there are some things that don't work exactly as I want or it is supposed to be. I have done like hundreds of failed landings before getting into this point, showing on next video: (after booster separation) It works but some details are not quite right yet... I want to stop rotation I want to stop the legs from skiing/slipping after landing. I need to do also the GSO satellite deploy for now only LEO is coded. etc... I am estimation one or two week's after that probably, I will put the code on https://github.com/ and call it Release 1, and then the future changes will be from there.
  7. Hello @linuxgurugamer Maybe this help? ofc, applying it to Comet and not Asteroid type, I think that the main idea is here. discov.SpawnAsteroid(); -----> discov.SpawnComet();
  8. Hello, [1] I am still working hard, on "RealFalcons-v2 RO" for KKS SpaceX Pack. With optimized maneuvers and flight profiles in KOS, I could save 1.5k delta-v, for the initial landing maneuvers, enouf allow an optimal "suicide burn" with a few meters of margin. I reduced the amount of fuel need in general, optimizing the rockets in all family with accurate values. I will update the Dropbox link soon, with the new updates. An image for now, from one Stage-1 of Falcon Heavy landed on Landing Zone 2: NOTE: final delta-v 13m/s! [2] Also updated the fix-kerosene-density.cfg @RESOURCE_DEFINITION[kerosene]:FINAL { @density = 0.00081 //https://physics.info/density/ } This fix was important to mach the values with real values. [3] Just a taste of one of many files, in the new KOS pack version: // -------------------------------------------------------------------------------------------- // Filename: stage-boosters.ks // -------------------------------------------------------------------------------------------- // KOS Scripts for KSP to be used on SpaceX_Launch_Vehicles Mod with (Pmborg RO Version) // -------------------------------------------------------------------------------------------- // Code by : Pmborg - https://forum.kerbalspaceprogram.com/index.php?/profile/198861-pmborg/ // Downloaded from: https://www.dropbox.com/sh/jd1oh6d806iyat1/AABa7aXbiYDfv8G-aQ4MyR-ta?dl=0 // 01/Nov/2020 // -------------------------------------------------------------------------------------------- SWITCH TO 0. //SWITCH TO default PATH: [KSP]/Ships/Script clearscreen. RUNPATH( "boot/sw-version.c" ). PRINT "BOOSTERS - STAGE 1 - Loading...". //FOR STAGE-1 runpath("boot/lib_activateVessel.c"). LIST PROCESSORS IN ALL_PROCESSORS. print "ALL_PROCESSORS:LENGTH "+ALL_PROCESSORS:LENGTH. if ALL_PROCESSORS:LENGTH = 0 { wait 5. reboot. } update_phase_title("[1] BOOSTER SLEEPING... ",0). declare global mission_target to BODY. PRINT "NAME: "+SHIP:name. set LZ_1 to "LandingZone1". set LZ_2 to "LandingZone2". set OCISLY to "DroneShip". set JRTI to "DroneShip2". // first reboot? Reset/Init State if status = "PRELAUNCH" and ( BODY:name = "Kerbin" or BODY:name = "Earth" ) { DELETEPATH("STAGE1_TARGET_FILE.c"). //Wait until signal received: WAIT UNTIL NOT CORE:MESSAGES:EMPTY. SET RECEIVED TO CORE:MESSAGES:POP. set TARGET_N to RECEIVED:CONTENT. PRINT "TARGET_N: "+TARGET_N. // Select target for later: if TARGET_N = 100 { declare global LandingZone TO VESSEL(OCISLY). LOG "declare global LandingZone TO VESSEL(OCISLY)." to "1:/STAGE1_TARGET_FILE.c". } else if TARGET_N = 101 { declare global LandingZone TO VESSEL(JRTI). LOG "declare global LandingZone TO VESSEL(JRTI)." to "1:/STAGE1_TARGET_FILE.c". } else if TARGET_N = 1 { declare global LandingZone TO VESSEL(LZ_1). LOG "declare global LandingZone TO VESSEL(LZ_1)." to "1:/STAGE1_TARGET_FILE.c". } else if TARGET_N = 2 { declare global LandingZone TO VESSEL(LZ_2). LOG "declare global LandingZone TO VESSEL(LZ_2)." to "1:/STAGE1_TARGET_FILE.c". } } else { PRINT "LOAD: STAGE1_TARGET_FILE.c". runpath("1:/STAGE1_TARGET_FILE.c"). //1: = Use KOS_CPU Internal Disk. (to allow each booster have it's file) } PRINT "LOADED - LandingZone: "+LandingZone:NAME. // Init Common (After "LOADED - LandingZone"): runpath("boot/common.c"). //Wait until booster is "Free" from main rocket: LIST PROCESSORS IN ALL_PROCESSORS. WHEN TRUE THEN { LIST PROCESSORS IN ALL_PROCESSORS. if ALL_PROCESSORS:LENGTH > 2 PRESERVE. } PRINT "Booster is Free". // Boosters still on main rocket attached? -> Wait for the call... if ALL_PROCESSORS:LENGTH > 2 { //Wait for all processors... WHEN ALL_PROCESSORS:LENGTH <=2 THEN { reboot. PRESERVE. } //Wait for SEP1 or SEP2: WAIT UNTIL NOT CORE:MESSAGES:EMPTY. SET CODE_RECEIVED TO CORE:MESSAGES:POP. PRINT "RECEIVED MSG - CODE_RECEIVED: "+CODE_RECEIVED. reboot. } else core:doaction("Open Terminal", true). if (SHIP:VERTICALSPEED > 1) //and KUniverse:ActiveVessel = SHIP //if (altitude > 10000) { update_phase_title("[2] STAGE-1 SEPARATION... ",0). unlock throttle. UNLOCK STEERING. SAS ON. RCS ON. wait 1. wait 5. update_phase_title("[3] FLIP MANEUVER ",0). SAS ON. RCS ON. AG6 ON. //retrograde set sasmode TO "RETROGRADE". wait 1. LOCK STEERING TO SHIP:RETROGRADE. wait 3. } // if KUniverse:ActiveVessel = SHIP // stage. //Activate 3 engines: update_phase_title("(ACTIVATE 3 ENGINES) ",0). activate3engines(). // For main core: if vehicle_type = "Falcon Heavy" engines_thrustlimit_to (100). //Back to 100% now RUNPATH( "boot/Falcon-Return.c"). CLEARSCREEN. print "GRATZ: Another Booster landed safely!".
  9. I loaded the demo base: (career save): Here the direct link SPACE-X Realism Overhaul Configs [WIP] PATH: Dropbox\Kerbal\Pmborg-RealFalcons-v2\saves\InterStar\DEMO-BASE-DroneShip-LZ1-LZ2-ISS.sfs (In KSP 1.10.1 is normal that you cant load that ISS)
  10. Log: https://www.dropbox.com/s/6z2k268ouqurlvn/Player-for-civ-1.10.1.zip?dl=0
  11. For me the original version CivilianPopulation v3.0.0.9 published, work apparently in 1.10.1, if something is not working... I did not noticed yet. I used this craft to test: https://kerbalx.com/pmborg/CivilianPopulation-tstbed
  12. Hello @TheMultiVitamin I am still using "civilian population" in 1.9.1, and work great as before, once the current version (the latest from @linuxgurugamer) was compiled in 1.8.1 but work also on 1.9.1 compiled against 1.9.1 libs and also like stated in OP Title . I added now "civilian population" to my SpaceX "test bed" mod environment, just to do a simple test in KSP 1.10.1 All is working fine for me in KSP 1.10.1:
  13. Right Soon, as soon as I will be happy with the results.
  14. Hello, I am still working on KOS code, I just published already some files only.
  15. Hello, We can expect it to release sometime in the fall of 2021. Please check more details here: https://www.pcgamer.com/kerbal-space-program-2-release-date-multiplayer-everything-we-know/
  16. Hello @Kartoffelkuchen, While I was reviewing all in detail found an error in falcon 9 fairing mass. I added the fix in a cfg file: //Falcon-1 mass 0.136t //Falcon-9 mass 1.7t //Falcon-Heavy mass 2.0t @PART[KK_SPX_FalconPayloadFairing]:FINAL { @mass=1.7 }
  17. Hello, I have done an almost final version for this release 1 of the Realism Overhaul Configs [WIP] All phases of flight now have a tone/ring to highlight a phase change in flight. etc...
  18. Terrains are nice, but please don't forget that planets also have clouds, or at least should have it as an option natively in KSP core:
  19. Hello Hello @Kartoffelkuchen I can clarify that, sometimes there are a bit of confusion about that. The Cargo Dragon version, don’t have SuperDraco engines, because it don’t have Launch Escape System (LES). The SuperDraco engines are being used on the SpaceX Crew Dragon 2 only, in LES, designated in SpaceX as "SuperDraco launch abort system". This System in mandatory for a NASA crew mission. What is disabled for NASA flights, is the vertical landing system which allows the Craft to land vertically, that was replaced by the Drogue chutes and the Main parachute with Mark 3 design. But the vertical landing system can be certified if some customer is interested on it. The Draco engines are used for the ISS orbit injection fine tune approach and ofc that the Draco thrusters are also ignited for the de-orbit burn. About the "SpaceX Falcon Heavy v1.2 Block-5" the last craft was updated, along with all other parts and pieces need for the demos, several details to improve the R.O. configs. Realism Overhaul Configs [WIP]
  20. The most important function of the 4 Crew Dragon 2 fins are to provide aerodynamic stability during an abort mission. But with only 2 fins and some software updates, its possible to make them work as 4.
  21. Almost don't appear at a first look... but is here on red indeed
  22. @linuxgurugamer @HebaruSan @Kartoffelkuchen Hello, @Lisias LOGS: KSP-log-with-MoarFEConfigs-solved-the-problem.zip KSP-log-without-MoarFEConfigs.zip ModuleManager-with-MoarFEConfigs-solved-the-problem.zip ModuleManager-without-MoarFEConfigs.zip https://www.dropbox.com/sh/9yzp5aahtv9ybgc/AABWQd3XeRQb3j8R2XG2iXTXa?dl=0 Strings to Search: KK_SPX_F9LandingLeg_scaled [...] PartLoader: Compiling Part 'Launchers Pack/Rockets/SpaceX/KK_F9FT_landingLeg_rescaled/KK_F9FT_landingLeg_s/KK_SPX_F9LandingLeg_scaled' [...] PartLoader: Part 'Launchers Pack/Rockets/SpaceX/KK_F9FT_landingLeg_rescaled/KK_F9FT_landingLeg_s/KK_SPX_F9LandingLeg_scaled' has no database record. Creating. So in resume: K:\SteamLibrary\steamapps\common\Kerbal Space Program-1.9.1\GameData\Launchers Pack>findstr /S /I "category" *.cfg | find /i "None" | find /v "Squad" | find /V "RealismOverhaul" Rockets\SpaceX\KK_F9FT_landingLeg_rescaled\KK_F9FT_landingLeg_s.cfg: category = None Only this part in "Launchers Pack" have this situation of having: "category = None" K:\SteamLibrary\steamapps\common\Kerbal Space Program-1.9.1\GameData>findstr /S /I "KK_SPX_F9LandingLeg_scaled" *.cfg Launchers Pack\Rockets\SpaceX\KK_F9FT_landingLeg_rescaled\KK_F9FT_landingLeg_s.cfg: name = KK_SPX_F9LandingLeg_scaled There is no other cfg files, using the landing legs to scale it or clone it, so its a final cfg file. Conclusion?: In the end it is supposed to be like that and we can ignore this error, the part aparettly work anyway... .. but can we can also do/suggest something the get rid off that uggly error? and this was the suggestion: If we install "MoarFEConfigs" and the error is gone, so why not install/"define it" as a dependency (in ckan)? From the tests that I have done, I don't see any disadvantage, but maybe there is some other "loose end" that I didn't got
  23. Maybe @Lisias can help here with a Magic Touch on scale cfg files. What do you think?
  24. Hello @HebaruSan, Lets wait for for @Kartoffelkuchen I think that probably was just something never noticed before, sometimes developers create dependencies that are not aware immediately, it seams to me the case. Thanks!
×
×
  • Create New...