Board index FlightGear Development Spaceflight

Space Shuttle

Discussion about development and usage of spacecraft

Re: Space Shuttle

Postby GinGin » Fri Aug 11, 2017 12:02 am

Awesome Thorsten for load shedding and accurate FC behavior, I remember that it went from 14 kw to 10 after réorganisation of electricity distribution, so cool.

Yeah it was STS 13 ahah

Thanks for your comment Brag, indeed Thorsten and all the team can be proud of what they achieved, to have such a strong backbone and just a few minor bugs for a complicated machine to simulate is quite an achievement !!

Yes, I like to share my journey with this sim, and hope its gonna convince those who are hesitating to dive into this complex sim.
I played a lot to aviation and spatial sim, I have to say it's by far one of the most complex I have ever played.
I would never have thought that it was possible to simulate at this level the flying brick couples of years ago, keep up the good work Team shuttle :)
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle

Postby Thorsten » Sat Aug 12, 2017 7:02 pm

Btw, I think you can test out the IMU system now - it ought to work with all alignment methods, as well as have a valid thermal management and redundancy management/fault detection. And using some guesstimates it's hooked up to the power grid - you can save power by moding IMUs into standby...

Just need to smooth some edges on the COAS interface....

Next in line is droop guidance for late stage 2 dynamics - the main problem is getting this fast enough, so I've been expanding the trajectory prediction into a power series to do this in real time and am testing accuracy against the actual solution right now.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby Hooray » Sat Aug 12, 2017 7:34 pm

Thorsten wrote in Sat Aug 12, 2017 7:02 pm:Next in line is droop guidance for late stage 2 dynamics - the main problem is getting this fast enough, so I've been expanding the trajectory prediction into a power series to do this in real time and am testing accuracy against the actual solution right now.


FWIW, depending on how much can be saved using a space-time or time-memory tradeoff, you could compute lookup tables using Nasal vectors/hashes (or both) and serialize those to disk - e.g. using JSON, which is basically equivalent to the syntax used by Nasal.

You would basically compute your lookup tables once and then use a nested for-loop to read the lookup tables and serialize/write those to a custom file in $FG_HOME/Export, at that point you can then copy the whole thing into a folder where it can be loaded at runtime using the helpers available in io.nas

(using JSON would be much less verbose than using PropertyList/XML, but obviously not as efficient as using a binary serialization format).

Basically, this would be equivalent to programmatically creating a complex texture and storing that on disk to save reduce the runtime overhead (treating the texture as a multi-dimensional lookup table).

https://en.wikipedia.org/wiki/Space%E2% ... e_tradeoff
https://en.wikipedia.org/wiki/JSON

PS: The code snippets originally provided by Andy actually contain a helper routine that serialize Nasal data structures to a subset of JSON (to be found in $FG_ROOT these days)

EDIT: Since we previously talked about the same idea, I added a few snippets of code to the wiki: http://wiki.flightgear.org/Howto:Serial ... es#Finally

Subject: String manipulation and file I/O (pm2thread)

Thorsten wrote:Thanks.

Let me perhaps give the context (one pic for two points...):

Image

Some of the displays of the Shuttle contain ideal trajectories. These would be mission-specific though, so it'd be ultimately cool to just swap data files to get the displays adjusted. Right now the trajectory data is hard-coded into the Nasal controller for the display, but I'd rather be more elegant.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Space Shuttle

Postby GinGin » Sat Aug 12, 2017 10:45 pm

Wow nice for the IMU
I m finishing IMU workbook and I will start test next week.
I m still struggling a bit with present current and desired Ref matrix.
Back to some more nominal flight after all those failure ahah

Ah droop guidance that's cool
I guess we gonna test some single engine ops 3 scenario, very cool .
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle

Postby Thorsten » Sun Aug 13, 2017 5:16 am

FWIW, depending on how much can be saved using a space-time or time-memory tradeoff, you could compute lookup tables using Nasal vectors/hashes (or both) and serialize those to disk - e.g. using JSON, which is basically equivalent to the syntax used by Nasal.


Yeah, I've been making a living off numerical math solving...

The droop trajectory prediction is an 8-parameter function, six of which you know for the current state of the vehicle and two of which you need to optimize over - trying to pre-can that as a table doesn't get you very far.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby Hooray » Sun Aug 13, 2017 8:00 am

Assuming that you have a function that merely operates using Nasal space variables, you could try running a helper function in a background thread, and setting a flag (global variable) once that is finished - checking said flag from the main loop using a conventional timer.

The callback you pass to the Nasal thread creation routine would ideally be 100% self-contained then, i.e. no access to other data structures or APIs:

Code: Select all

var myComputationFinished = 0;


var myComputation = func() {


};

thread.newthread( func myComputation( [1,2,3,4,5,6] ) );



I've seen such worker threads to perform really well as long as you only do numerical stuff there, e.g. >= 100hz even on average hardware (keep in mind, it's not framerate limited, except when the GC kicks in)
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Space Shuttle

Postby Thorsten » Sun Aug 13, 2017 10:21 am

I rather like the power series, as it is quite fast enough (polynomials aren't really performance-consuming).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby Hooray » Sun Aug 13, 2017 10:34 am

alright, the code in the wiki may still come in handy at some later point in time, because you were once asking about storing a pre-computed Nasal data structure on disk to read it back into a vector at a later time, so I will just leave it there - the concept itself should feel pretty familiar to you with your GLSL background - it really is akin to procedurally creating a texture and storing it on disk to reduce the runtime footprint.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Space Shuttle

Postby amalahama » Sun Aug 13, 2017 3:25 pm

Thorsten wrote in Sat Aug 12, 2017 7:02 pm:Next in line is droop guidance for late stage 2 dynamics - the main problem is getting this fast enough, so I've been expanding the trajectory prediction into a power series to do this in real time and am testing accuracy against the actual solution right now.


Droop guidance? What is about? I thought you already finished stage 2 guidance - it wasn't perfect but did the job just right.

Regards
amalahama
 
Posts: 149
Joined: Mon Mar 28, 2016 10:54 am

Re: Space Shuttle

Postby Thorsten » Sun Aug 13, 2017 3:38 pm

Basically it's about single engine completion of aborts (TAL mostly) - there is a kinematic regime in which the loss of a second engine can't be handled by normal guidance (so you will lose a lot of altitude) but does not require a contingency abort (you will stay out of the atmosphere till end of propellant and do an OPS 3 rather than OPS 6 entry). Droop guidance bridges that region.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby GinGin » Sun Aug 13, 2017 3:59 pm

You see it on this graphic

Image

At one point, called single engine ops 3 , if you loose 2 two engines, its not gonna be contigency entry anymore but a more standard one using OPS 3 software.
Basically, the shuttle will not fall below 265000 feet before ET separation

As said Thorsten, its a bridge for 2 engine failure between contigency abort and TAL intact abort at SE engine TAL point
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle

Postby GinGin » Wed Aug 16, 2017 10:27 pm

I am testing a bit more Orbital Operations, really stunning view with HD Earthview

Image

Image


I liked a lot also the warm up time for Bay lights, very realistic

Image

Image


I will test tomorrow Star Tracker and the whole IMU implementation :)
I was like 2 hours into the flight, just beginning IMU alignement and game crashed :(

Oh, yes, small question, I couldn't deploy Ku antenna, it remained on stow... any hints?
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle

Postby Thorsten » Thu Aug 17, 2017 6:06 am

Were its various systems powered?

It wants antenna, signal processor and antenna heater powered (circuit breakers!), electrical power and the PB-door open to respond to the switch commands.

(And it needs to be mechanically intact, but there's no scenario or automatic way to damage it, you'd need to set that by hand).

I was like 2 hours into the flight, just beginning IMU alignement and game crashed


Toughie... was there any meaningful error message? I personally have not much experience in long-term testing, presumably the VA-folks have sessions of 8 and more hours...

Best is probably regular usage of the save function and give some feedback what of the internal state should be added to a saved session - at least that gets you back to the same state vector.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby GinGin » Thu Aug 17, 2017 6:30 pm

(circuit breakers!)


I missed one indeed, thanks !!


For the crash, I was playing with Spec 21 and Star tacker, but I don't think it's related, maybe time compression, I was playing a bit with it.
Going above 8x doesn't seem to be a right idea :) Missions gonna be a bit longer
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle

Postby GinGin » Thu Aug 17, 2017 10:25 pm

One or two questions.

First about event timer, I can't use it, don't remember if it's implemented or not? Switches work well, but time doesn't load.

Image



First time I have this bug, I switched time from GMT to MET through Spec 2, and MET stayed blocked at 8mn43sec, GMT was still working, you had that before?

Image


Last question concerning IMU Spec, for x/roll and y/pitch, informations seem coherent between Inertial value on ADI and value on Spec 21, however for the yaw compenent, it's not the same than the Z axis in the IMU page, weird ?


Image
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest