Space Shuttle Ultra 1.25 Revision B development

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Oh, that bit...:facepalm:

I'll see how much of this display I can get implemented over the holidays. Most of the problem is finding the bits of data to actually display, not the display itself...

If in doubt, just ask. Practically, the stuff would be supplied by the DPS, but I can not tell, when it will be really able to do that (All data displayed in the Shuttle cockpit is some how depending on the computers, without the computers, most displays would be blank, only OMS/MPS or HYD don't get provided by the GPCs).
 

jevans

Member
Joined
Nov 27, 2010
Messages
37
Reaction score
0
Points
6
Location
Cumbria
I've been using the Orbiter API functions for all the values so far, as I could see that the GPC's and NAV system can't provide them yet. It wouldn't be too difficult to convert them when the GPC code can do this.

The thing I haven't been able to work out is how to get the DAP, throttle, speedbrake modes and so on. I can see there's code relating to 'bundles', which is what the switch classes appear to be connected to, but how I get the data out the other end remains a mystery to me. Could you explain how that works?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I've been using the Orbiter API functions for all the values so far, as I could see that the GPC's and NAV system can't provide them yet. It wouldn't be too difficult to convert them when the GPC code can do this.

The thing I haven't been able to work out is how to get the DAP, throttle, speedbrake modes and so on. I can see there's code relating to 'bundles', which is what the switch classes appear to be connected to, but how I get the data out the other end remains a mystery to me. Could you explain how that works?

Bundles are just objects that each represent a number of analog or discrete lines, for slow DC signals (not serial digital data streams!). We use them to separate the VC from the simulation model, so there are no direct accesses to switches if possible. The data flow there is one-directional: It goes from a single DiscreteOutput to zero or more DiscreteInputs. You can also poll the bundles directly, but that way is not very robust, since changes in the bundle structure (eg, line order) would mean you need to change the way you read the data in your code, instead of just defining once where to get the data. Also it would be then harder to implement cable failures and defects, if you would poll them directly.

Once we have more time for detail stuff, the RCS would also be controlled by such bundles, going from the MDMs to the RJDs, which would require a small extension of the capabilities of the bundles (handling pulses instead of slow signals)

You would get all such flight data from the IDPs, so, even if the GPCs don't yet send messages to the IDPs with the calculated air data, it would be nice if you could implement the dirty fix inside the IDP, so we can easier switch to a proper simulation model.

How you connect IDPs and MDUs, is up to you, there is nothing in the interface that requires complex communication, since such stuff rarely reaches the astronauts. GPCs and periphery is different, since the behavior of the GPCs depends a lot on the Shuttle Bus behavior and requires it.

I currently allocate my freetime on the VAB, for getting the "proper way" (tm) running ASAP, I would also need more time finishing the MDMs. Most switches in the cockpit go to MDMs, which are polled by the GPCs. But I have not yet finished the IO modules, I just stopped at the PROM programs. It would take a while to explain what needs to be done there, so somebody else could finish it... it is a whole lot of detail work distilled from the Operational Data, waiting to be implemented. Like analog signals being converted to digital in 10 data bits with some status bits. Or discrete Output Modules permitting pretty complex binary math for setting/resetting signals.

For the air data and the inertial sensors, it is even possible to tell on which MDM they are connected and which format the data has that they produce, switches are a bit harder, there is a lot of guess work involved. Every switch has in reality three redundant outputs, we currently model them with just one output.

For the GPC code, the stuff would be a bit more complex in the final version: you would create a process object for the service routine for the IDPs, schedule it to be executed 12.5 times per second (eg). The routine takes the data calculated by other processes (eg, velocity from ADTA, GPC or IMU SOP), formats it in a memory buffer into messages and enqueues a DMA operation that writes the data from the memory into the desired Shuttle Bus channel to the desired IDP... yes, that is computer science, but it would work with both C++ x86 code simulating the software and AP-101S emulation code without requiring complete different versions of the Shuttle hardware simulation. It is virtualized to fit.

---------- Post added at 09:17 PM ---------- Previous post was at 07:43 PM ----------

Can somebody remind me once per week to write a book about the code details and conventions that we use in SSU? I want to be able to say "RTFM".
 

jevans

Member
Joined
Nov 27, 2010
Messages
37
Reaction score
0
Points
6
Location
Cumbria
Ok, thanks. That seems slightly clearer, I'll have a go at those tomorrow.

I must admit I'm still not totally clear on the speed display. I found this in the SCOM:

On ascent and on entry above Mach 0.9, the M/V
tape displays Mach number, relative velocity
(Vrel), or inertial velocity (Vi)...The Vrel is in feet
per second in relation to the Earth. Vi is in feet
per second and does not consider the rotational
speed of the surface. The actual parameter
displayed is always Mach number
; the tape is
simply rescaled above Mach 4 to read Vrel (MM
102, 304, 305, 602 and 603 with the tape labeled
M/VR) or Vi (MM 103 and 601 with the tape
labeled M/VI). The scale ranges from 0 to 27.0K
feet per second, with a scale change at Mach 4
(4.0M).

The bit in bold is a bit confusing. So is the number in the box always mach, with the tape in kft/s? Seems odd, or I could be completely looking at this the wrong way.

Apologies for the stupid questions, better get it right the first time than have to fix it later.:thumbup:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
The bit in bold is a bit confusing. So is the number in the box always mach, with the tape in kft/s? Seems odd, or I could be completely looking at this the wrong way.

Is it the current revision of the SCOM or an old one? It doesn't sound very strange though, anyway, since it makes sense: The scale of the tape changes below 4.0 - which is how it was done in the mechanic cockpit.

I am relying on the most recent revisions for reference... if somebody would have a set of older revisions around, it would be nice for a later phase to have them, so we can include the history of the shuttle better.

In doubt, I believe the Workbook (Chapter 5.6) more than the SCOM though.
 

jevans

Member
Joined
Nov 27, 2010
Messages
37
Reaction score
0
Points
6
Location
Cumbria
This is SCOM revision OI-33, from 2008. It's the same in the workbook.

Mach 4 =4.466 kft/s, according to google, so when the indicator passes over mach 4 does it suddenly switch units and flick up to indicating 4.47 (in kft/s) instantaneously?

I just don't understand how the transition from one unit to the other is handled, as mach 4 does not equal 4 kft/s.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
This is SCOM revision OI-33, from 2008. It's the same in the workbook.

Mach 4 =4.466 kft/s, according to google, so when the indicator passes over mach 4 does it suddenly switch units and flick up to indicating 4.47 (in kft/s) instantaneously?

I just don't understand how the transition from one unit to the other is handled, as mach 4 does not equal 4 kft/s.

Not at sea-level. But at altitude, it would be different. Mach 4 should be approximately 4000 kft/s at about 30 km altitude.

http://www.aerospaceweb.org/question/atmosphere/q0112.shtml

The flicker by switching units should be really tiny then, almost smooth. Remember, that the Shuttle travels in very narrow corridors.
 

jevans

Member
Joined
Nov 27, 2010
Messages
37
Reaction score
0
Points
6
Location
Cumbria
At what point of 'completeness' do you think the new PFD and so on should be checked in? Should I just wait until it's completely done to put it up here?

I also managed today to write a rather embarrassing memory leak into the module - it leaked a whole bitmap every frame...
The clue was when Orbiter crashed after a few seconds.:lol:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
At what point of 'completeness' do you think the new PFD and so on should be checked in? Should I just wait until it's completely done to put it up here?

When it compiles, runs coarsely approximately as advertised and does not contain such...

I also managed today to write a rather embarrassing memory leak into the module - it leaked a whole bitmap every frame...
The clue was when Orbiter crashed after a few seconds.:lol:

errors. ;)

I know that memory leaks do happen and sneak into commits sometimes, but they should be fixed before commits, if they are known. Memory leaks are one of the most annoying kinds of bugs to be hunted, that you know where the data was created does often not tell you enough, about why it is still there. Differential debugging, by using version control and diffs is the most successful way.

Otherwise, there is no real damage that you can cause by adding such a useful feature. If there is still work to be done, it can happen after being committed. Better commit as often as you see fit, this way you can make use of the version control for finding bugs.
 
Last edited:

jevans

Member
Joined
Nov 27, 2010
Messages
37
Reaction score
0
Points
6
Location
Cumbria
Don't worry, I'll make sure there's no leaks before you see it.:)

I'll admit I'm not used to working with proper source/version control - I usually work as a solo developer.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I'll admit I'm not used to working with proper source/version control - I usually work as a solo developer.

Don't worry, it is not that hard. You don't need much discipline, otherwise I wouldn't be able to use it. :cheers:

Just look for TortoiseSVN, that circumnavigates the worst shallows.
 
Last edited:

jevans

Member
Joined
Nov 27, 2010
Messages
37
Reaction score
0
Points
6
Location
Cumbria
That's what I'm using. It seems slightly enthusiastic about placing icons on files that aren't under svn, but never mind.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
That's what I'm using. It seems slightly enthusiastic about placing icons on files that aren't under svn, but never mind.

That is better than no icons on files that should have them. :lol:
 

jevans

Member
Joined
Nov 27, 2010
Messages
37
Reaction score
0
Points
6
Location
Cumbria
Today I sorted the leak, then worked out how to do tapes for the velocity and so on. You can see the tapes for alpha and H dot are done, now to do the M/V and H ones, which are the ones that are slightly more complex, with scale changes. There is a g-meter in the corner that pops up when in the right OPS MM, and I'm just getting started on the HSI. Looking OK, I think!:)

meds3.png
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Today I sorted the leak, then worked out how to do tapes for the velocity and so on. You can see the tapes for alpha and H dot are done, now to do the M/V and H ones, which are the ones that are slightly more complex, with scale changes. There is a g-meter in the corner that pops up when in the right OPS MM, and I'm just getting started on the HSI. Looking OK, I think!:)

Try to put the tapes into classes, there are many visual modifiers and other effects in the MEDS, which could be done great as decorator design pattern.
 

SiameseCat

Addon Developer
Addon Developer
Joined
Feb 9, 2008
Messages
1,699
Reaction score
2
Points
0
Location
Ontario
Checked in some changes to the GPC code; instead of doing everything in the Atlantis class, I'm splitting the GPC code into different classes. Let me know if there are any compile issues or new bugs appearing.

There's also a new SimpleGPCSystem class that acts like the SubsystemDirector class to manage all the GPC code. All the actual GPC stuff is implemented by driving from the SimpleGPCSoftware class. I've also changed the IDP and MEDS classes slightly to use the new GPC code; this shouldn't affect jevans' changes to the MEDS stuff.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
is it compatible to this processing diagram?

PASS-UserInterface-BD.png
 

SiameseCat

Addon Developer
Addon Developer
Joined
Feb 9, 2008
Messages
1,699
Reaction score
2
Points
0
Location
Ontario
Not really. I'm basically splitting up the code that's in the Atlantis class, without making significant changes. The GPCSoftware class does pretty much everything - it handles keyboard input and draws on the MDU, as well as the actual GNC operations required. The GPCSystem class just forwards PreStep/PostStep etc. calls and keyboard input and display drawing calls to the GPCSoftware instances.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,774
Reaction score
2,535
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Well, as long as we don't simulate failures, this should be enough.
 
Top