Board index FlightGear Development

Instrumentation properties and how to update them

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Instrumentation properties and how to update them

Postby Dirk7589 » Thu Apr 20, 2017 5:46 pm

Hello Everyone,

I am new to the forum and Flight Gear, so forgive me if this post is in the wrong location. I am looking for information about the instrumentation properties. I have a system where I have exported the FDM and I am performing some computations on the model. I would like to display this updated information in the simulators instrumentation cluster, without changing the FDM. Through the properties editor I know I can change the instrumentation/altimeter/indicated-altitude-ft property, but the value is immediately updated by another source.

Does anyone know how I might disable this update or choose the source of the instrumentation data? Thank you in advance for all your help.

Sincerely,
Dirk
Dirk7589
 
Posts: 6
Joined: Thu Apr 20, 2017 5:34 pm

Re: Instrumentation properties and how to update them

Postby it0uchpods » Thu Apr 20, 2017 6:59 pm

Hi
You cannot change that one, since that is what the altimeter is reading. You can change any instrument without changing the FDM.

What are you trying to change it to?

Kind Regards,
Josh
it0uchpods/WTF411

FlightGear Aircraft Developer
A3XX Development Team
User avatar
it0uchpods
 
Posts: 2133
Joined: Tue Oct 06, 2015 12:51 pm
Callsign: WTF411/Octal
IRC name: it0uchpods
Version: 2017.2.1
OS: Windows Vista x64

Re: Instrumentation properties and how to update them

Postby Dirk7589 » Thu Apr 20, 2017 7:29 pm

Hello Josh,

I'm actually working on a security project where we are trying to intentionally show the pilot erroneous information in the cockpit. I noted that changed say the altitude in the FDM changes the actual position in the aircraft. Ideally, I would have information from the FDM and then feed the instrumentation in the simulation with my values. I'm currently trying to build the sources to Flight Gear. I'm open to directly editing the source of flight gear if necessary.

Is the instrumentation what they call a tied property? I would have expected the values in the instrumentation to be coming from another system like the pitot tubes which would evaluate the FDM and report an altitude for instance.

Thanks,
Dirk
Dirk7589
 
Posts: 6
Joined: Thu Apr 20, 2017 5:34 pm

Re: Instrumentation properties and how to update them

Postby jam007 » Thu Apr 20, 2017 7:36 pm

The easiest is probably to modify the instrument xml-files so the animation is based on your properties not the normal instrument properties.
Like this:
1) you take the reading from /instrumentation/altimeter/indicated-altitude-ft and manipulate it (internally by nasal or externally by udp communication) and stores your manipulated property in eg: /instrumentation/altimeter/manipulated-altitude-ft

2) you change the xml-file for the plane's altimeter so it reads /instrumentation/altimeter/manipulated-altitude-ft when it animates the altimeter rather than the original.
jam007
 
Posts: 459
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.1.2
OS: Ubuntu 16.04

Re: Instrumentation properties and how to update them

Postby Dirk7589 » Thu Apr 20, 2017 7:42 pm

That sounds like a very reasonable solution to me. I didn't realize I can create custom properties like that. Would I simply use the generic protocol over udp and send a value using the custom property name?

If there is a wiki example I should look at, I would be happy to. Thanks so much for the support, what a great community
Dirk7589
 
Posts: 6
Joined: Thu Apr 20, 2017 5:34 pm

Re: Instrumentation properties and how to update them

Postby it0uchpods » Fri Apr 21, 2017 4:02 am

You can create a custom property just by defining it somewhere. Then you can write to it any way you want. I usually use nasal for such failure systems.

Kind Regards,
Josh
it0uchpods/WTF411

FlightGear Aircraft Developer
A3XX Development Team
User avatar
it0uchpods
 
Posts: 2133
Joined: Tue Oct 06, 2015 12:51 pm
Callsign: WTF411/Octal
IRC name: it0uchpods
Version: 2017.2.1
OS: Windows Vista x64

Re: Instrumentation properties and how to update them

Postby Thorsten » Fri Apr 21, 2017 5:30 am

I'm actually working on a security project where we are trying to intentionally show the pilot erroneous information in the cockpit


If you need a fairly sophisticated working example, let me refer you to the Space Shuttle's (devel version) area navigation simulation.

https://sourceforge.net/p/fgspaceshuttl ... ment/tree/

(In particular, you may want Nasal/TAEM_guidance.nas, especially the area_nav_set class, Nasal/sensors.nas (containing the instrument simulation code) and Nasal/state_vector.nas (containing the state vector updates via filter application).

There's the possibility of any numbers of TACAN receivers or the air data systems failing or providing wrong information in addition to the expected natural drift of instruments and inaccuracies of TACAN receivers used over a large range, and a simulation of the Kalman filtering to combine possible errorneous information into the best possible guess for the state vector - basically you can select a navigation failure scenario and then solve it by the original Shuttle procedures.
Thorsten
 
Posts: 8159
Joined: Mon Nov 02, 2009 8:33 am

Re: Instrumentation properties and how to update them

Postby jam007 » Fri Apr 21, 2017 10:56 am

Dirk7589 wrote in Thu Apr 20, 2017 7:42 pm:If there is a wiki example I should look at, I would be happy to.

See Generic protocol
and Howto: Create a generic protocol
and some info on instrument xml-files and properties
jam007
 
Posts: 459
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.1.2
OS: Ubuntu 16.04

Re: Instrumentation properties and how to update them

Postby Dirk7589 » Fri Apr 21, 2017 1:49 pm

Thank you all so much for the deep and detailed information. I will have a look at all the material everyone provided and see what I can get working. I will let you all know how I progress.

Thanks,
Dirk
Dirk7589
 
Posts: 6
Joined: Thu Apr 20, 2017 5:34 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest