Jump to content

[1.10.1] KK's SpaceX Pack v.6.5 - 01/11/2020


Recommended Posts

36 minutes ago, HebaruSan said:

See this explanation (emphasis added):

By "fixing" that exception, you introduce unintended behavior (making a part appear that is supposed to be hidden). In reality, rather than depending on MoarFEConfigs, this mod conflicts with it. But it may be possible to avoid that if a better method was used to achieve the same thing, as in:

Almost don't appear at a first look... but is here on red indeed :)

BLClpEc.png

 

Edited by pmborg
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

1 hour ago, pmborg said:

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.

 

Don't think you'll get decent aerodynamic stability with 2 fins only, that thing will just yaw away but I'm not an expert on aerodynamics (yet). 

Not that it matters anyway since the Cargo Dragon 2 won't have active abort ability with the removed super dracos and the trunk will still have 4 fins for Crew Dragon. The two fins here are simply to provide more (the same) area for the solar panels.

Edited by Kartoffelkuchen
Link to comment
Share on other sites

Hello

6 hours ago, Kartoffelkuchen said:

Don't think you'll get decent aerodynamic stability with 2 fins only, that thing will just yaw away but I'm not an expert on aerodynamics (yet). 

Not that it matters anyway since the Cargo Dragon 2 won't have active abort ability with the removed super dracos and the trunk will still have 4 fins for Crew Dragon. The two fins here are simply to provide more (the same) area for the solar panels.

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".

maxresdefault.jpg

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]

Link to comment
Share on other sites

I'm seeing the following error:

PartCompiler: Cannot clone model 'Launchers Pack/Rockets/SpaceX_BFR/KK_Raptor/KK_Raptor' as model does not exist

I don't know if it's a typo or not

Looks like the mu file is missing

 

I dug a bit further, I did find the Raptors under SpaceX_ITS/Raptor, so maybe it's a leftover config?

Edited by linuxgurugamer
Link to comment
Share on other sites

1 hour ago, boierito said:

Hello @pmborg I installed the files for 1.9.1 but when I try to start the KOS for any falcon rocket, some files are missing. Can you help me?

Hello, I am still working on KOS code, I just published already some files only.

Link to comment
Share on other sites

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:

phoDcxR.png

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!".

 

Edited by pmborg
Link to comment
Share on other sites

9 hours ago, pmborg said:

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:

phoDcxR.png

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:


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 (altitude > 50000) 
{
	update_phase_title("[2] Sleep during Separation        ",0).
	unlock throttle.
	UNLOCK STEERING.
	SAS OFF.
	shutDownAllEngines().
	wait 5.

	update_phase_title("[3] STEERING TO RETROGRADE   ",0).
	SAS ON.
	AG6 ON. //retrograde
	set sasmode TO "RETROGRADE".
	wait 1.
	LOCK STEERING TO SHIP:RETROGRADE.
	wait 3.

	//Activate 3 engines:
	update_phase_title("[4] Activate 3 engines   ",0).
	wait 1.
	AG2 OFF. 	//Reset 3 main engines
	AG2 ON. 	//Activate 3 main engines
	wait 1.
	RCS OFF.
}

// For main core:
if vehicle_type = "Falcon Heavy"
{
	//Back to 100% now:
	LIST ENGINES IN myVariable.
	FOR eng IN myVariable {
		set eng:THRUSTLIMIT to 100.
	}.
}

RUNPATH( "boot/Falcon-Return.c").
// RUNPATH( "boot/PhaseIII-Land.c" ). //Normal Land profile.

CLEARSCREEN.
print "GRATZ: Another Booster landed safely!".

 

ETA?

Link to comment
Share on other sites

14 hours ago, boierito said:

ETA?

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.

 

Edited by pmborg
Link to comment
Share on other sites

47 minutes ago, pmborg said:

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 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.

 

What about falcon heavy boosters, they will be landing at the same time?

Link to comment
Share on other sites

7 hours ago, boierito said:

What about falcon heavy boosters, they will be landing at the same time?

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.

Edited by pmborg
Link to comment
Share on other sites

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?

 

 

Edited by pmborg
Link to comment
Share on other sites

@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

Edited by pmborg
Link to comment
Share on other sites

5 hours ago, pmborg said:

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.

Ok, thanks for your answer, if you need testers you can contact me for testing purposes

Link to comment
Share on other sites

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.
}

 

Link to comment
Share on other sites

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().

 

Edited by pmborg
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...