Board index FlightGear Development Nasal

787 MFD Vertical Profile Nasal (prev. Calculating Elevation)

Nasal is the scripting language of FlightGear.

Re: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby omega95 » Fri Feb 03, 2012 7:11 pm

I used a different method to get teh color coding to work. :mrgreen:

1. Shaded Area Terrain

Image

2. Line Terrain (In the real VSD, it's not shaded so I'm gunna' stick with this)

Image

I'll also replace the WAypoint IDs with Waypoint VNAV Altitudes and make lines across with the Waypoint IDs on top (like in the real one) :)
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby omega95 » Fri Feb 03, 2012 7:44 pm

Did some more work on the VNAV Altitudes :D

Image

I'm done with that for now... Once we get a working lateral TCAS, we'll try to implement that in vertical mode. At the moment, the VSD is embedded into the 787's MFDs' NAV page (which explains the lateral navigation lines of code)... To generalize it, do I separate it with just the screen area? And, should I change all /controls/navigation props to /instrumentation/vsd :?:
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby Hooray » Fri Feb 03, 2012 8:01 pm

Looking great!
What about the issues you mentioned (indexing, floating point)?
Do you still want me to look at the code?

Regarding generalization, I suggest the following:
  • use separate VSD specific property tree branches, otherwise people would inevitably need to adopt the same ND, too - right?
  • it should be possible to instantiate multiple VSDs at the same time, i.e. PF/PNF (copilot,captain)?
  • it would probably make sense to make some more settings configurable (such as horizontal range/vertical scale)?
  • changing those settings for one VSD shouldn't affect the other VSD, right?
  • the modified code I sent you, also put the sampling interval into a variable, this would allow listeners to be used, so that these variables can be easily updated (property tree)


BTW: TCAS -even in real life- is currently limited to vertical evasion maneuvers, lateral TCAS is work in progress: http://en.wikipedia.org/wiki/Traffic_co ... imitations

If you want me to take a look, you can either send me an archive containing the implemented aircraft/instrument, or just use a gitorious merge request so that I can pull your changes.
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: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby omega95 » Fri Feb 03, 2012 8:07 pm

or just use a gitorious merge request so that I can pull your changes.


How do I do that exactly? I have git installed (using FG git too) and stuff and I know how to pull, but not to send a merge request.. As it is, what am I going to merge it to? The 787 (one I'm working on) doesn't even have a complete FDM, just systems, models and a temporary FDM. :oops:

And, If you could wait a day, (it's midnight here) I can separate the VSD from the rest of the ND and upload it (or if I find out how, then merge into git).
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby Hooray » Fri Feb 03, 2012 8:44 pm

omega95 wrote in Fri Feb 03, 2012 8:07 pm:
or just use a gitorious merge request so that I can pull your changes.

How do I do that exactly? I have git installed (using FG git too) and stuff and I know how to pull, but not to send a merge request.. As it is, what am I going to merge it to? The 787 (one I'm working on) doesn't even have a complete FDM, just systems, models and a temporary FDM. :oops:


Merge requests are documented here: http://wiki.flightgear.org/Merge_request#Merge_requests

But, I suggest to do this only AFTER backing up all your important FG-related data, to ensure that you don't lose any data.
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: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby omega95 » Sat Feb 04, 2012 5:02 am

Finally, I found a way around the floating point issue! :D

I shoulda' thought of this before, all I did was replace the animations where the x.5 doesn't result with x.49999999999999.

Code: Select all
<animation>
      <type>textranslate</type>
      <object-name>elevation21.5</object-name>
      <property>/controls/navigation/vert-profile/nm21.49999999999999</property>
      <factor>0.00001115</factor>
     <axis>
        <x>0.0</x>
        <y>-1.0</y>
      </axis>
</animation>


Works now :)

Image

-------------------------------------------------------------------

Now, you don't have to be afraid of this anymore... just look at the VSD when you fly. :lol:

Image
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby Johan G » Sun Feb 05, 2012 9:44 pm

I guess we no longer can fly as we see fit (C-FIT). :wink: :lol:

Great work by the way (I've honestly only looked at your screen shots and read the topic though). :D 8)
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: 787 MFD Vertical Profile Nasal (prev. Calculating Elevat

Postby stuart » Sun Feb 05, 2012 11:57 pm

(Addressing Hooray's question of whether we could pass cloud position between the cloud subsystem and wxradar)

The short answer is Yes. Unfortunately, it would require a bit of coding - at the moment we basically convert the cloud location into OSG-space and then forget about it.

I haven't looked at the wxradar code at all, but rather than making the cloud locations available to wxradar, it might in fact be easier for the wxradar to query the cloud information for a given span, convert that to OSG-space to pick up any collisions.

I'm not in a position to volunteer to do that right now though :(.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1629
Joined: Wed Nov 29, 2006 10:56 am
Location: Edinburgh
Callsign: G-MWLX

Previous

Return to Nasal

Who is online

Users browsing this forum: No registered users and 1 guest