Jump to content

Race Around The World


Recommended Posts

Here's an entry clocking in at 21:50

Maximum speed was a leisurely 3,600 m/s however the auto-pilot took a shortcut...through the atmosphere! :confused:

Sure there were some slight disadvantages, such as the near fatal heat, but also one very nice advantage. The wing's lift-to-drag ratio of 2 provided 120kN of down force for the cost of only 60kN of thrust to counteract the drag and maintain a constant speed. The vessel certainly won't win any awards in the looks department, but the inflatable heat shield has reasonably low drag and remarkable heat resistance as an unconventional nosecone.

The journey was entirely controlled by a kOS script, derived from the script used for the Around the world in 80 minutes challenge. I'd highly recommend scripting for this challenge as it allows consistent repeatable test runs, really helping you to refine and tweak your design. For any interested folks who'd like to use it for inspiration the script is contained below.

Spoiler

@lazyglobal off.

// Desired cruising altitude and speed
local altitudeSetpoint is 35000.
local airspeedSetpoint is 3600.

// Save runway location so vessel can navigate towards it during final approach
local kscRunway is latlng(-0.0485, -74.7255).

// Mutable vessel state
local upsideDown is true.
local approachingKsc is false.
local stoppedAtKsc is false.

// Increase roll control threshold and response
set steeringmanager:rollcontrolanglerange to 45.

// Initialise PID controllers with constants tuned to a specific craft
local maxVerticalSpeed is 450.
local minVerticalSpeed is -1200.
local altitudePid is pidloop(0.15, 0.00002, 0.5, minVerticalSpeed, maxVerticalSpeed).
set altitudePid:setpoint to altitudeSetpoint.

local maxPitchAngle is 45.
local minPitchAngle is -30.
local verticalSpeedPid is pidloop(0.5, 0.0002, 0.1, minPitchAngle, maxPitchAngle).
set verticalSpeedPid:setpoint to 0.

local maxThrottle is 1.
local minThrottle is -1.
local airspeedPid is pidloop(0.05, 0.006, 0.006, minThrottle, maxThrottle).
set airspeedPid:setpoint to airspeedSetpoint.

// Trigger staging when empty
when stage:resourceslex:liquidfuel:amount = 0 then {
    stage.
    when stage:resourceslex:liquidfuel:amount = 0 then {
        stage.
        when ship:airspeed > airspeedSetpoint then stage.
    }
}

// Create descent triggers once craft is far enough away from KSC
when kscRunway:distance > 200000 then {
    when kscRunway:distance < 130000 then {
        set altitudePid:setpoint to kscRunway:terrainheight - 10.
        set verticalSpeedPid:minoutput to -45.
    }
    when kscRunway:distance < 30000 then {
        upsideDown off.
        approachingKsc on.
    }
    when kscRunway:distance < 4000 then {
        gear on.
        brakes on.
    }
    when ship:groundspeed < 0.1 then stoppedAtKsc on.
}

// Main control loop that keeps vessel at desired heading, altitude and speed
until stoppedAtKsc {
    // Yaw
    local desiredCompassAngle is choose kscRunway:heading if approachingKsc else 270.
    // Pitch
    set verticalSpeedPid:setpoint to altitudePid:update(time:seconds, ship:altitude).
    local desiredPitchAngle is verticalSpeedPid:update(time:seconds, ship:verticalspeed).
    // Roll
    local desiredRollAngle is choose 180 if upsideDown else 0.    
    // Update controls
    set steering to heading(desiredCompassAngle, desiredPitchAngle, desiredRollAngle).
    set throttle to throttle + airspeedPid:update(time:seconds, ship:airspeed).
}

 

Edited by ManEatingApe
Link to comment
Share on other sites

On 4/13/2020 at 11:32 AM, ManEatingApe said:

Here's an entry clocking in at 21:50

Maximum speed was a leisurely 3,600 m/s however the auto-pilot took a shortcut...through the atmosphere! :confused:

 

The shortcut through the atmosphere reduces distance traveled by about 250km.  However above the atmosphere it is possible to achieve greater speeds, and so less time to complete an orbit.  The difference with the atmospheric approach is in the much higher acceleration and deceleration at the start and end of the flight.

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