Board index FlightGear Development Spaceflight

Space Shuttle

Discussion about development and usage of spacecraft

Re: Space Shuttle

Postby Hooray » Sun Feb 21, 2016 11:48 pm

I haven't looked at their commit logs, but I think we did suggest using translations/transformation - clipping was suggested afterwards IIRC (thanks for clarifying though, I have added your advice to the corresponding wiki articles)
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 » Mon Feb 22, 2016 7:27 am

Richard mentioned clipping early on, which is why I assumed it'd be a standard way to do it.

Translation alone doesn't do the trick as the bar just moves around. Translation/scale is a bit more tricky because you need to know the exact pixel size and position of the rectangle in the assumed coordinate system to compute the right trafo - which took me six tries to get right. So there's a lot of hand-editing involved, but it's now a viable workflow.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby Hooray » Mon Feb 22, 2016 12:29 pm

given that, and looking at the recent commits, I would definitely suggest to encapsulate the corresponding logic in a helper function, so that it is easier to update things if/when a more "direct" method becomes available.

For that, you really only need to look at the repetitive code blocks and move them to a function that returns a factor (a so called "generator") so that you can move invariants to the generator, which will make it much easier to update the logic later on
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 » Mon Feb 22, 2016 12:59 pm

And there it is - fully integrated with the sim:

Image

(Here I've simulated a He regulator failure after which the center engine He purge no longer works, so the engine controller initiates an automatic engine shutdown as the engine might explode if not purged...)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby legoboyvdlp » Mon Feb 22, 2016 1:01 pm

So, what would happen if that engine did go bang? Is it goodbye, and time to send up another Orbiter for one of those fancy rescue missions?
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Space Shuttle

Postby Thorsten » Mon Feb 22, 2016 1:10 pm

Image



(that engine isn't very far away from the external tank...)
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby Hooray » Mon Feb 22, 2016 1:18 pm

That's looking really good - so far, we've only been discussing "instancing" for semi-static symbols (e.g. those commonly shown on a PFD or ND), and for that, Canvas texture maps turned out to work fairly well - however, such EICAS/EFIS-like instrumentation would benefit from a slightly more flexible method, so that we can change attributes like color, size, translation (transformation) by referencing an existing Canvas element and adding a custom osg::StateSet to it:

How to display Airport Chart?
TheTom wrote:I will add a new element type to render symbols from a "Cache-Texture" to improve speed of canvasses showing lots of symbols like eg. the navigation display. You will basically be able to set position (maybe rotation) and index of the symbol in the cache-texture and possibly a color for each instance...


Richard also the question of efficient instancing a few pages earlier in this this thread:
Subject: Space Shuttle
Richard wrote:I'm currently not sure if we can share the canvas elements across displays, so I've made copies of everything for each display. The implementation as it stands is still a work in progress and I'm sure there will be more changes later. The important thing is to get the avionics built and once we reach a point where most of the displays are done then we can optimise it.



Summary at:
http://wiki.flightgear.org/Canvas_Devel ... Instancing
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 legoboyvdlp » Mon Feb 22, 2016 1:28 pm

Er.... not so good, then...
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Space Shuttle

Postby TheTom » Tue Feb 23, 2016 11:22 am

Thorsten wrote in Mon Feb 22, 2016 7:27 am:Translation alone doesn't do the trick as the bar just moves around. Translation/scale is a bit more tricky because you need to know the exact pixel size and position of the rectangle in the assumed coordinate system to compute the right trafo - which took me six tries to get right. So there's a lot of hand-editing involved, but it's now a viable workflow.


You could also use getBoundingBox() or getTightBoundingBox() (should not make a difference for axis aligned rectangles..) on the elements to get the exact size and position of the rectangles.
TheTom
 
Posts: 322
Joined: Sun Oct 09, 2011 11:20 am

Re: Space Shuttle

Postby Thorsten » Tue Feb 23, 2016 1:08 pm

Thanks - that sounds useful.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby wlbragg » Tue Feb 23, 2016 9:06 pm

There is also another "hidden" stray panel. It is hidden in the bulkhead.

Image
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Space Shuttle

Postby Richard » Wed Feb 24, 2016 1:05 am

wlbragg wrote in Tue Feb 23, 2016 9:06 pm:There is also another "hidden" stray panel. It is hidden in the bulkhead.


I checked my original blend (i.e. the earliest one that I still have based on the blendswap). The panel was in there. I will have to get the original again as I just realised it might have not been selected when I rotated to get the right orientation for our coordinate system.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: Space Shuttle

Postby Thorsten » Wed Feb 24, 2016 8:19 am

And the next one in and wired up:

Image

APU 1 off, hydraulic pressure supplied by electric pump. APU 2 running in high speed mode with hydraulic pump fully engaged, APU 3 running in normal mode with hydraulic pump partially engaged.

No temperature yet in the range where coolant is required, so no water usage registering yet.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby Thorsten » Wed Feb 24, 2016 4:25 pm

Image

... and finally the SPI. Thanks goes to Gijs for creating the SVG templates for those!
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Space Shuttle

Postby legoboyvdlp » Wed Feb 24, 2016 4:49 pm

Oh my goodness, Thorsten -- and imagine, in any other less crazy flight simulator, you'd have to pay perhaps a hundred dollars. And you are doing this for free.
Grand job.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 5 guests