Board index FlightGear Development Spaceflight

Space Shuttle

Discussion about development and usage of spacecraft

Re: Space Shuttle

Postby Thorsten » Thu Mar 26, 2015 6:41 pm

I've got so many questions regarding space flight in FG right now, but I guess each of them can be answered with "Yes, it's possible, but someone needs to implement it.


:-)

Well, one can always try...

I made some good progress today with figuring out how to code the RCS control logic. I've got the roll axis sorted out already, the others are a bit more tricky, pitch depends on CoG and yaw always generates a roll component which needs to be countered... And I did checks that the thrust agrees with what my book says.

I've also been cleaning up the HUD to display some stuff that's actually needed for the shuttle - like apoapsis and periapsis, total acceleration, current mode for the controls, ...

What's a bit annoying is that we can't initialize in space - so I always have to launch into a short ballistic hop to test the RCS setup (well, I did dry firing tests on the ground of course). What's more annoying is that the FG interface (controls/ and consumables/ ) seems to support way fewer engines and tanks than JSBSim does - but even for a simplified RCS, I need a grand total of 17 thrusters (the real one has 38...). Well, there are ways to work around this.
Thorsten
 
Posts: 11122
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle

Postby Bomber » Thu Mar 26, 2015 7:45 pm

Yeh it's really annoying that the requirements of flight model developers seems to have been relegated to second place over aesthetic.
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1934
Joined: Fri Dec 14, 2007 7:06 pm
OS: Windows XP and 10

Re: Space Shuttle

Postby Thorsten » Fri Mar 27, 2015 7:23 am

But just imagine how much more annoying it would be if the visuals wouldn't be there...
Thorsten
 
Posts: 11122
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle

Postby Bjoern » Fri Mar 27, 2015 1:08 pm

Well, your RCS experiment answers one of my would-be questions, the AP/PE display on the HUD another one.

The rest would concern automated ascent/reentry, reentry itself, payload operations, a persistent world*, moving scenery objects (MIR, ISS, Hubble), docking and a cockpit for the shuttle**.
But, as I've said, they can all be answered by a single reply. :)


* Deployed satellites actually staying deployed.
**Is the one from Orbiter open source?
Do a barrel roll!
User avatar
Bjoern
 
Posts: 384
Joined: Fri Jan 06, 2012 10:00 pm
Location: Nearest: THF
Version: Next
OS: ArchLinux, Win 7

Postby firefly » Fri Mar 27, 2015 3:42 pm

The rocket flame looks nice
Last edited by firefly on Fri Mar 27, 2015 7:15 pm, edited 1 time in total.
User avatar
firefly
 
Posts: 86
Joined: Thu Jul 24, 2014 2:15 am
Callsign: Firefly
Version: 3+
OS: Windows 10 (it's OK)

Re: Space Shuttle

Postby Thorsten » Fri Mar 27, 2015 4:20 pm

The current state of the shuttle HUD mode: in the upper left is the current control mode (we currently have 'thrust vectoring' on ascent and 'RCS rotation' implemented, we'll get 'RCS translation' and 'aerodynamical' in the future). Below are orbital parameters, and as you can verify from apoapsis and periapsis, I made it. Upper right snows pitch, roll and yaw rate - very handy for stabilizing the craft using the RCS.

Image

And... a fully functional RCS rotation mode - here's the system firing for a yaw correction:

Image

I believe the RCS capability is quite accurate, at least location and vac. thrust of the system is quite close, though I did simplify it a bit. The control logic is fairly complicated, since the thursters are in a triangular configuration, so you get all sorts of other torques leaking in.

The rest would concern automated ascent/reentry, reentry itself


I believe an AP mode would be quite capable of flying an ascent (it's not that unstable, if I can fly it, an AP certainly can...), but I'm not really interested in coding that. Re-entry dynamics I don't yet know - but this is JSBSim we're using here, which means there's basically no restriction in complexity - if we happen to need lift/drag curves as functions of Mach number to get the hypersonic regime right, we can do it.

As for the rest, I don't know. One probably needs to write a dedicated AI object class in orbit.

A 3d cockpit - well, let's say we have plenty of really good 3d modelers. Anyone up for the task?
Thorsten
 
Posts: 11122
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle

Postby IAHM-COL » Fri Mar 27, 2015 4:24 pm



Holy KRAP Thorsten
You are my new idol!

That's what I've called a Space Odissey quality screenshot.
And I am a total Kubrick fan, and I wouldnt use such qualifier any lightly!
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4064
Joined: Wed Aug 08, 2012 5:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Space Shuttle

Postby zlsa » Fri Mar 27, 2015 6:14 pm

Space shuttle cockpit, mesh only (no textures): http://www.blendswap.com/blends/view/74692

It's obviously way too detailed but it would be a good base to build a low-poly version off of.
zlsa
 
Posts: 145
Joined: Fri Feb 14, 2014 2:29 am
Callsign: N275A
Version: 3.5 git
OS: Linux

Re: Space Shuttle

Postby IAHM-COL » Fri Mar 27, 2015 6:18 pm

looks nice zlsa.

[disclaimer: space shuttle is not a project of mine]

i dont know about others, but for me a CC-BY license is a deal-breaker. A.K.A, not GPLed.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it? Probably not, because if they don’t recognise their freedoms, they’ll let their freedoms fall
User avatar
IAHM-COL
Retired
 
Posts: 4064
Joined: Wed Aug 08, 2012 5:40 pm
Location: Homey, NV (KXTA) - U.S.A
Callsign: HK-424D or ICAO4243
Version: 3.7-git
OS: Linux

Re: Space Shuttle

Postby www2 » Fri Mar 27, 2015 7:30 pm

So fare i know is the requirements of CC-BY you gift credits and the and competial with the GPL.

This the quote form th FSF site about CC-BY 4.0 but i believes that this count also for the CC-BY 3.0
Creative Commons Attribution 4.0 license (a.k.a. CC BY) (#ccby)

This is a non-copyleft free license that is good for art and entertainment works, and educational works. It is compatible with all versions of the GNU GPL; however, it is not recommended for use on software.
www2
 
Posts: 260
Joined: Thu Apr 16, 2009 1:58 pm

Re: Space Shuttle

Postby bcoconni » Fri Mar 27, 2015 8:11 pm

For even more realism, there is also an option in JSBSim that adds the gravitational torque to the accelerations. It can be activated by setting the property simulation/gravitational-torque to 1.

The gravitational torque is described in "Spacecraft Gravitational Torques", NASA SP-8024, May 1969 and is a result of the gravity gradient along the spacecraft dimensions. Basically it tends to align the axis of greater inertia with the gravity direction and in most cases, it generates an undamped oscillation which needs to be counteracted if you want your spacecraft attitude unchanged with respect to the Earth. Due to the fact that the torque is quite small, the oscillation period can be of the order of 1 or 2 hours. In the case of the Shuttle it would tend to move the spacecraft nose down pointing to the Earth or up pointing to the stars depending on the initial conditions.
bcoconni
 
Posts: 41
Joined: Sat Nov 13, 2010 2:27 pm
Location: France
IRC name: Bertrand0
Version: Git
OS: Linux

Re: Space Shuttle

Postby Hooray » Fri Mar 27, 2015 8:40 pm

Thorsten wrote:
Bjoern wrote in Fri Mar 27, 2015 1:08 pm:The rest would concern automated ascent/reentry, reentry itself, payload operations, a persistent world*, moving scenery objects (MIR, ISS, Hubble)
* Deployed satellites actually staying deployed.

One probably needs to write a dedicated AI object class in orbit.


I don't know what kind of workarounds are currently used to make this work (i.e. in terms of different coordinate systems) - but the AI system is pretty simple under the hood - and if all you need is some way to provide "stable" computations/updates without introducing GC issues (i.e. no Nasal), you could probably use the property rule system to dynamically position/update such "AI objects" - internally, the AI system doesn't bother how it is controlled, i.e. while values can be directly written to position/transform a 3D model, those can also be other properties.

So for prototyping purposes, you would not even need to touch Nasal - as long as there is some kind of formula for computing the position of an object in orbit, that computation can also be handled by the AP/property rule system.
Coordinate systems could obviously be an issue depending on what is currently used and assumed though.

Assuming that you would only ever have one ISS/Hubble object etc, this could even be a hard-coded property rule system computing the position/orientation etc dynamically and updating a few properties - most of the time, this would not even be visible, not unlike the sky dome and its stars being properly positioned. So if those properties are actually being used for transforming and showing a 3D model would depend on viewer distance (think LOD)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Re: Space Shuttle

Postby erik » Fri Mar 27, 2015 9:43 pm

Thorsten,

I found this JSBSim related reset file which supposedly should set up the shuttle in a working condition:
http://jsbsim.cvs.sourceforge.net/viewv ... xt%2Fplain

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: Space Shuttle

Postby Thorsten » Sat Mar 28, 2015 6:34 am

For even more realism, there is also an option in JSBSim that adds the gravitational torque to the accelerations. It can be activated by setting the property simulation/gravitational-torque to 1.


Cool. I suspect the mass distribution of the orbiter isn't quite there yet to get something really realistic out, but it sure can't hurt to use the option.

I found this JSBSim related reset file which supposedly should set up the shuttle in a working condition:


Ah - yes, passing parameters directly to JSBSim looks promising. Thanks!

So for prototyping purposes, you would not even need to touch Nasal - as long as there is some kind of formula for computing the position of an object in orbit, that computation can also be handled by the AP/property rule system.
Coordinate systems could obviously be an issue depending on what is currently used and assumed though.


I think you need to be able to specify the orbit using orbital elements (otherwise you get mad...) whereas the positioning must happen in planet-centered (xyz)-world coordinates (or lat/lon/alt). It's pretty straightforward (I doubt too many people really realize how much of an easier job Orbiter has for flight dynamics computations - two-body orbits are really simple compared with airplanes).

Someone needs to do it, I think that's like the auto-pilot guided launch something I'm not really interested in.
Thorsten
 
Posts: 11122
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle

Postby Thorsten » Sat Mar 28, 2015 6:25 pm

Got the OMS implemented and tested, in addition to an engine status part in the HUD. Full orbital maneuvering is now possible - the RCS can do yaw, pitch and roll, and I managed to do a few minute prograde burn with the OMS. I think the flight dynamics is now ready for a release - just need to polish the rest a little - perhaps by next week.

The flight path marker of the HUD makes a decent marker for the prograde direction, I wonder if there's something simple to use for retrograde to align for the de-orbit burn. Any HUD-designers, let me know.

Some impressions from test flights - I did some tweaks to Earthview, with grain overlay for terrain and a hires cloud structure texture adding fake detail.

Image

Image
Thorsten
 
Posts: 11122
Joined: Mon Nov 02, 2009 8:33 am

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest