Board index FlightGear Support Graphics

create HUD

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).
- please upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

create HUD

Postby alexcherpi » Fri Mar 13, 2015 1:55 pm

Hi all,

I run flightgear 3.4 on windows7.
Can you give me the steps to create a simple HUD ?
I want to display some texte in it in real-time.

Thanks
alexcherpi
 
Posts: 6
Joined: Wed Feb 04, 2015 1:53 pm

Re: create HUD

Postby Necolatis » Fri Mar 13, 2015 2:23 pm

I think a good place to start is

http://wiki.flightgear.org/Head-up_display

and

http://mapserver.flightgear.org/git/?p= ... ud;hb=HEAD

You basicly create a hud.xml file, place it in your aircraft folder somewhere, and refer to it from the aircrafts .-set.xml file inside the <sim> tags.

sorta like this:

<hud>
<path n="1">Aircraft/myPlane/Systems/hud.xml</path>
</hud>
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1941
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: create HUD

Postby AndersG » Fri Mar 13, 2015 9:17 pm

If you don't specifically want a HUD, but just want to permanently display some properties on the screen you can use the Nasal screen class:

Add to the <nasal> element in the -set file:
Code: Select all
 <nasal>

  <OSD>
   <script>
# On-screen displays
var left  = screen.display.new(20, 10);
var right = screen.display.new(-300, 10);

# Add some properties to display
left.add("/fdm/jsbsim/sim-time-sec");
left.add("/orientation/heading-magnetic-deg");
left.add("/fdm/jsbsim/hydro/beta-deg");
left.add("/fdm/jsbsim/hydro/pitch-deg");
left.add("/fdm/jsbsim/hydro/roll-deg");

right.add("/fdm/jsbsim/hydro/v-kt");
right.add("/fdm/jsbsim/hydro/vbx-fps");
right.add("/fdm/jsbsim/hydro/vby-fps");
right.add("/fdm/jsbsim/propulsion/boiler/steam-absolute-pressure-psi");
right.add("/fdm/jsbsim/propulsion/engine/steam-mean-pressure-psi");
right.add("/fdm/jsbsim/propulsion/engine/power-available-hp");
right.add("/fdm/jsbsim/propulsion/engine/power-required-hp");
right.add("/fdm/jsbsim/propulsion/engine/engine-rpm");
right.add("/fdm/jsbsim/propulsion/engine/advance-ratio");
right.add("/fdm/jsbsim/propulsion/engine/thrust-lbs");
right.add("/fdm/jsbsim/propulsion/engine/shaft-position-norm");

   </script> 
  </OSD>

 </nasal>

(The properties above are just examples and many only exist in a particular aircraft, uh, ship.)

If you only want to see the properties in some specific views that can also be done, e.g. by using a view handler. See e.g. my Short Empire aircraft.

/Anders
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2437
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: create HUD - Resolved Topic

Postby acherpil » Wed Apr 01, 2015 8:55 am

Hi,

Thanks, I resolved it using HUD. I created a new customized one for me.

Alex
acherpil
 
Posts: 3
Joined: Mon Mar 02, 2015 5:25 pm


Return to Graphics

Who is online

Users browsing this forum: No registered users and 7 guests