Board index FlightGear Development Spaceflight

Launchpad elevation for Space Shuttle

Discussion about development and usage of spacecraft

Launchpad elevation for Space Shuttle

Postby PlayeRom » Tue Oct 20, 2020 1:37 pm

Is it possible to increase launch pad and gantry position above the Earth level? Because when I will set exactly on Launch Complex 39 it's look terrible:

Image
PlayeRom
 
Posts: 96
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Launchpad elevation for Space Shuttle

Postby wkitty42 » Tue Oct 20, 2020 2:13 pm

the sim drops the craft, all craft, onto the scene and they generally find the proper elevation... in this case, the ramp is loaded a little late so the craft and tower land on the ground instead of the ramp... i'm not sure what the best method of fixing this timing problem is, tho...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Launchpad elevation for Space Shuttle

Postby PlayeRom » Tue Oct 20, 2020 2:18 pm

Yes, that's true, the ramp is loaded as the last, as a part of scenery I guess.
My SP-ROM YT channel
PlayeRom
 
Posts: 96
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Launchpad elevation for Space Shuttle

Postby Fritz » Tue Oct 20, 2020 2:33 pm

First the terrain is loaded, then the aircraft (I guess the launch pad tower is part of the Shuttle "aircraft"), and then the scenery objects (in this case the ramp). I guess it's not feasible to change this order because it can take a minute or more until all objects are loaded on a built-up airport. So, in theory, the Shuttle must recalculate its elevation some time after spawning, but that's probably easier said than done...
Fritz
 
Posts: 283
Joined: Tue Apr 26, 2016 11:04 pm
Location: Bavaria, Germany, near ETSL
Version: 2018.3.6
OS: Windows 7 Prof.

Re: Launchpad elevation for Space Shuttle

Postby PlayeRom » Tue Oct 20, 2020 2:51 pm

I was hoping that there is some property for manually adjust the elevation of launchpad, like lat and lon. That would be enough for me.
My SP-ROM YT channel
PlayeRom
 
Posts: 96
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Launchpad elevation for Space Shuttle

Postby Thorsten » Tue Oct 20, 2020 5:22 pm

the sim drops the craft, all craft, onto the scene and they generally find the proper elevation... in this case, the ramp is loaded a little late so the craft and tower land on the ground instead of the ramp... i'm not sure what the best method of fixing this timing problem is, tho...


That's usually true, but not in this case, as we need a special choreography to get the Shuttle onto a pad. So, the Shuttle is actually initialized in the air (you don't usually see that because that happens when the splash screen is on) while a command is given to place the launchpad. A few seconds later we kinda hope the launchpad is there, and the Shuttle (on its drop down from 30.000 ft) gets a reposition command which initialized just above the pad that's now hopefully there, and the Shuttle drops gently into the high-damping spring constants of the rear contact points.

If it works that is.

The problem with the ramp seems to be the flame trench - I suspect the call to place the launchpad picks up the ramp just fine, but the altitude it returns is down in the flame trench - so that's where the pad seems to appear. It's hard to judge from the picture, but I don't think we're placed at ground altitude.

So I don't think there is an 'easy' solution - you can manually add an altitude offset to the pad placement call and in theory that should do the trick (it's in the aptly named file Nasal/launchpad.nas), but it's only ever going to work for this particular spot and screwing up everything else.

There is no way to do that without modifying the code.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Launchpad elevation for Space Shuttle

Postby wkitty42 » Tue Oct 20, 2020 6:21 pm

Thorsten wrote in Tue Oct 20, 2020 5:22 pm:
the sim drops the craft, all craft, onto the scene and they generally find the proper elevation... in this case, the ramp is loaded a little late so the craft and tower land on the ground instead of the ramp... i'm not sure what the best method of fixing this timing problem is, tho...


That's usually true, but not in this case, as we need a special choreography to get the Shuttle onto a pad. So, the Shuttle is actually initialized in the air (you don't usually see that because that happens when the splash screen is on) while a command is given to place the launchpad. A few seconds later we kinda hope the launchpad is there, and the Shuttle (on its drop down from 30.000 ft) gets a reposition command which initialized just above the pad that's now hopefully there, and the Shuttle drops gently into the high-damping spring constants of the rear contact points.

yeah, this is what i was trying to say without going into too much detail...

maybe the detection of the altitude of the top of the ramp could be moved over a little or a fake/invisible bar laid across the flame trench so the shuttle would read the bar's elevation instead of the bottom of the pit?

i just got to where i was specifying coords just off to the side of the ramp and launching from there... i think i had the ramp stuff work only a few times... that after i figured out to disable fuel-freeze, auto-coordination, and something else that caused the shuttle to tip over when the engines were fired...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Launchpad elevation for Space Shuttle

Postby Fritz » Tue Oct 20, 2020 8:08 pm

If the flame trench is the problem, maybe it would work (kind of by luck) if the Shuttle/launch complex is turned by 90° as it should be?
Fritz
 
Posts: 283
Joined: Tue Apr 26, 2016 11:04 pm
Location: Bavaria, Germany, near ETSL
Version: 2018.3.6
OS: Windows 7 Prof.

Re: Launchpad elevation for Space Shuttle

Postby wlbragg » Tue Oct 20, 2020 10:01 pm

It's been awhile since I looked at any of this but I do recall the pad was not in the correct orientation as you pointed out.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Launchpad elevation for Space Shuttle

Postby Thorsten » Wed Oct 21, 2020 6:44 am

The pad uses whatever orientation you specify at startup, there's no default coded.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Launchpad elevation for Space Shuttle

Postby PlayeRom » Wed Oct 21, 2020 12:29 pm

It's look like the flame trench is not a problem, I rotated and moved the launchpad in many ways and the launchpad was always standing on the ground instead of on the ramp.
At the moment I "fixed" it by nasal file like Thorsten mentioned, so my Nasal/launchpad.nas is:
Code: Select all
var compute_launchpad = func {
    var alt = getprop("/position/altitude-ft");
    var terrain_alt = getprop("/position/altitude-agl-ft");
    var place_alt = (alt - terrain_alt) + 90.0; #214
    place_pad(place_alt - 60.0); # <- my mod here
}

var place_pad = func (place_alt) {
    var lat = getprop("/sim/presets/latitude-deg");
    var lon = getprop("/sim/presets/longitude-deg");
    var heading = getprop("/sim/presets/heading-deg") + 90.0; #getprop("/orientation/heading-deg");

    var lat_to_m = 110952.0;
    var lon_to_m  = math.cos(getprop("/position/latitude-deg")*math.pi/180.0) * lat_to_m;
    var m_to_lon = 1.0/lon_to_m;
    var m_to_lat = 1.0/lat_to_m;

    var delta_lat = 0.0 * m_to_lat;
    var delta_lon = 0.0 * m_to_lon;

    geo.put_model("Aircraft/SpaceShuttle/Models/Launchpad/launchpad.xml", lat + delta_lat, lon + delta_lon, place_alt, heading); # <- using place_alt here

    if (getprop("/sim/config/shuttle/place-gantry") == 1)
    {
        settimer( func {geo.put_model("Aircraft/SpaceShuttle/Models/Launchpad/gantry.xml", lat + delta_lat, lon + delta_lon, place_alt, heading);}, 8.0);  # <- using place_alt here
    }
}


Image

But starting from a place other than Launch Complex 39A gives the unexpected effects like levitation of the platform and gantry with shuttle stand on the ground.
My SP-ROM YT channel
PlayeRom
 
Posts: 96
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Launchpad elevation for Space Shuttle

Postby Thorsten » Wed Oct 21, 2020 1:15 pm

It's look like the flame trench is not a problem


If that's the case, could you temporarily undo your changes and try to start FG paused till you see the Shuttle hangs in the air and then unpause? If the issue is the time to load the ramp model, this procedure should extend it somewhat.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Launchpad elevation for Space Shuttle

Postby PlayeRom » Wed Oct 21, 2020 2:50 pm

Thorsten wrote in Wed Oct 21, 2020 1:15 pm:
It's look like the flame trench is not a problem


If that's the case, could you temporarily undo your changes and try to start FG paused till you see the Shuttle hangs in the air and then unpause? If the issue is the time to load the ramp model, this procedure should extend it somewhat.


Clever, but still with troubles, in pause mode only the space shuttle is on the air (without launchpad), I see the ramp loaded so I unpause, then shuttle is going down and the launchpad appears inside a ramp so the problem still occurs. But I noticed that the launchpad is a litle above the ground level then previously (when I started without pause).
So it looks like the launchpad is now positioned at the flame trench level XD
Last edited by PlayeRom on Sat Oct 24, 2020 12:28 am, edited 1 time in total.
My SP-ROM YT channel
PlayeRom
 
Posts: 96
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Launchpad elevation for Space Shuttle

Postby PlayeRom » Wed Oct 21, 2020 3:09 pm

I succeed with pause trick when I change lat and lon to keep away of flame trench:

Image
My SP-ROM YT channel
PlayeRom
 
Posts: 96
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Launchpad elevation for Space Shuttle

Postby eatdirt » Thu Oct 22, 2020 12:21 pm

I succeed with pause trick when I change lat and lon to keep away of flame trench:


Good Job!
I am going to pervert this trick for putting the launchpad onto Truman :mrgreen:
eatdirt
 
Posts: 1012
Joined: Wed Aug 15, 2018 3:06 pm

Next

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 3 guests