Board index FlightGear Development Aircraft

New Boeing 787-8 GIT

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: New Boeing 787-8 GIT

Postby jentron » Sat Feb 18, 2012 1:17 pm

omega95 wrote in Sat Feb 18, 2012 5:19 am:
jentron wrote in Sat Feb 18, 2012 5:10 am:The FAA takes a dim view of flying GPS fixes instead of navaids.

The basic plan for holding is to fly inbound on the radial until you pass the navaid, do a 180 degree standard rate turn (2 minutes to complete in an airliner, iirc), fly an opposite track for about 2 minutes (this is a track not a heading, you should correct for cross winds), turn a 180 degree standard rate turn (you should be back on the radial now) and fly inbound on the radial crossing the navaid at exactly 2 minutes, if you arrive early or late adjust the outbound time to correct for tailwind/headwind, repeat.


Right, that's what it does so far, (but you can specify the hold time in the CDU, it's 1 minute by default)... Now, we're having an issue of wind. Let's say we have a crosswind, so while turning, we'll have a head wind on 1 turn and a tail on another, getting us to deviate from the page.

How do we fix that?


You can choose (and remember) a heading based on GPS track for the outbound leg. Apply the opposite correction on the inbound leg.

Or let the autopilot fly the radial inbound, note the difference between track and heading, and apply opposite difference when outbound. If you intercept the inbound radial at the end of your turn, you did well. If you miss it, you can come up with a new heading correction for the next leg.

Ron
Aircraft: F-4E, Cessna 182RG, Fi-156 Storch, Diamond DA20 Katana and Eclipse, Ercoupe, LZ-129, Gossamer Albatross
Airports: CYKF, CNC4, KHIF, 42U, KOXB, 4MD1
jentron
 
Posts: 453
Joined: Thu Jul 26, 2007 2:41 am
Version: custom
OS: Linux

Re: New Boeing 787-8 GIT

Postby redneck » Sat Feb 18, 2012 2:02 pm

The current Nasal code for the holding pattern doesn't work, and I don't want to use the route manager. I want to do something LIKE what the route manager does.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

Re: New Boeing 787-8 GIT

Postby redneck » Sat Feb 18, 2012 8:37 pm

Well, Omega managed to come up with a solution. However it's incomplete, and he's asleep now. Maybe we'll have it working tomorrow, since I can't figure it out. It gets me to the fix, then tracks away from it indefinitely, instead of using the groundspeed-based distances we specified, which we did convert from nm to degrees.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

Re: New Boeing 787-8 GIT

Postby redneck » Sun Feb 19, 2012 1:33 am

Hey guys! You're not going to believe this! We've successfully made spaghetti!!!

EDIT: Took out the last point in the pattern. Very large improvement as seen here. Now, if it could just stick to the radial I specified....
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

Re: New Boeing 787-8 GIT

Postby omega95 » Sun Feb 19, 2012 5:54 am

Right, with some more trigonometric work on it, we've managed to complete successful (I think) auto-holds. In the below screen-shot from the FGTracker, we're holding with a hold time of 120 seconds around LOA (VOR near KIAH) at 0 degrees radial.

At the time of the screen-shot, we're in the third "lap" and as you can see, other than the turn after the entry, the aircraft actually retraced it's last lap :D , the only problem is that it looks like shit... No, I mean it, it looks like shit. :lol:

Image

We're still holding, so to see how it looks all the way, click here.

To fix the 'shit' look, we could try playing with the PID controller. :wink:

EDIT : The tracker won' t show the proper hold after the 4th lap, as we exit the hold (works now :D ), played around a bit, changed radial to 180 and hold time to 60... Now, testing a teardrop entry.

The whole thing (holding-pattern.nas, holding-pattern.xml) is up on git, so if anyone can help us fix the weird path, that'd be awesome. :mrgreen:
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1223
Joined: Sat Jul 30, 2011 12:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04

Re: New Boeing 787-8 GIT

Postby Hooray » Sun Feb 19, 2012 10:24 am

It doesn't look too bad actually, but in a "no winds" situation, the pattern should be shaped more regularly.
Did you actually have a look where the irregularities come from (Nasal algorithm or PID controller)?
Also, what about the ground speed and bank angle during the hold/turns: are they pretty much constant, or do they change somehow (that would obviously introduce such irregularities)?

FWIW, the algorithms driving "real thing" are documented here:
http://www.google.com/patents/US20040230351 (see the section titled "Claims")

And algorithmic wind compensation is discussed here:
http://www.patentstorm.us/patents/55533 ... ption.html

And here, you can find all the trigonometry (including formulas) involved:
http://www.freepatentsonline.com/7003383.html
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: New Boeing 787-8 GIT

Postby ckruetze » Sun Feb 19, 2012 12:33 pm

Hooray wrote in Sun Feb 19, 2012 10:24 am:It doesn't look too bad actually, but in a "no winds" situation, the pattern should be shaped more regularly.
Did you actually have a look where the irregularities come from (Nasal algorithm or PID controller)?
Also, what about the ground speed and bank angle during the hold/turns: are they pretty much constant, or do they change somehow (that would obviously introduce such irregularities)?

FWIW, the algorithms driving "real thing" are documented here:
http://www.google.com/patents/US20040230351 (see the section titled "Claims")

And algorithmic wind compensation is discussed here:
http://www.patentstorm.us/patents/55533 ... ption.html

And here, you can find all the trigonometry (including formulas) involved:
http://www.freepatentsonline.com/7003383.html


Is looking at those patents really a good idea?
Including algorithms copied from patented work or even getting inspiration from them might lead to the patent holder getting upset. Which could lead to a lot of legal trouble for the project.
At the very least it won't be possible to release the code under the GPL.

Christian
ckruetze
 
Posts: 32
Joined: Sat Jun 11, 2011 12:06 pm

Re: New Boeing 787-8 GIT

Postby Hooray » Sun Feb 19, 2012 1:40 pm

I knew someone would say that ... I would have probably objected, too.
But, just think about it:

Honestly, it's not like you are creating competition by replicating a real life device in a flight simulator.
We have dozens of such occurences already in FlightGear, i.e. where existing (patented) functionality is duplicated, be it in the form of avionics or whatever.

Seriously, the purpose of a flight simulator is to SIMULATE the real thing, this usually does include modeling things very closely to the original. For example, the GPWS is of the most complex systems implemented in C++ currently - it is much closer to the real thing than any other system modeled in FlightGear. It is quite obvious that the developer used extensive documentation to recreate the instrument in FG, quite possibly also the original manuals.

Yet, it is quite obviously still making dozens of assumptions and simplifications which are specific to the FG use and context.
So, I really wouldn't be overly worried here to be honest.

All of us here are spare time contributors, nobody is going to spend weeks or even months, trying to duplicate the exact algorithms of some device in FlightGear.

MSFS and X-Plane do provide much better support for modern avionics than FlightGear does currently, without causing legal trouble.

FWIW, all linked patents do make extensive references to "common knowledge" actually, WRT how these devices are implemented in general. This knowledge alone would already be useful to apply here, even without looking at the specific algorithms used.
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: New Boeing 787-8 GIT

Postby redneck » Sun Feb 19, 2012 7:10 pm

I noticed an issue with the auto hold today. If you're not headed directly to the hold fix when you engage auto hold, then the entry it chooses may no longer be correct by the time you get there. To do this, I created a special counter, which, when you reach the hold fix, will count up. It starts at zero. Unfortunately, when I try to implement it, I get an error. I can't seem to find it, and, if FG is reporting it, it's getting buried too fast by a bunch of mp junk so that I cannot find it. I'm posting the chunk where I believe the error is being generated. If you someone could point it out to me, that would be great.

Code: Select all
if ((phase == 0) or (me.count == 0)) {
         if ((diff1 <= 110) or (diff2 <= 70)) {
            entry = 0; ## Direct Entry
            setprop(htree ~ "phase", 1);
            }
         elsif ((diff1 > 110) and (diff2 <= 180)) {
            entry = 2; ## Teardrop Entry
            setprop(htree ~ "phase", 7);
            }
         else{
            entry = 1; ## Parallel Entry
            setprop(htree ~ "phase", 7);   
            }
         setprop(htree ~"entry", entry);

      }


EDIT: Found another issue. For some reason, it will NOT switch to a different entry type if you get out of one hold, and go into another hold, which requires a different entry.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

Re: New Boeing 787-8 GIT

Postby omega95 » Mon Feb 20, 2012 4:25 am

Hmm, You've only posted the condition that keeps checking for entries. But the the problem might be where you actually do the 'count += 1'. If you've put it 'inside' the start of phase 2, (when you leave the fix and start your outbound turn) it should work great but if I remember correctly, you put it in the flyto(y,x) function. Remember that you're running the fly(y,x) function in every entry, so it automatically increases count.

A nice idea would be to run 'print(b787.hold.count);' in your nasal console or set it to a property and find out when it's changing during runtime. :wink:

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

Re: New Boeing 787-8 GIT

Postby redneck » Mon Feb 20, 2012 5:00 am

The complete code is available on GIT now. Anyone who wants to fly automated holds will have to make the following change to line 99:

Code: Select all
if ((phase == 0) or (count == 0)) {


to

Code: Select all
if (phase == 0) {


EDIT: Fixed. Changes will be up shortly.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

Re: New Boeing 787-8 GIT

Postby ormaaj » Mon Feb 20, 2012 10:30 am

ckruetze wrote in Sun Feb 19, 2012 12:33 pm:At the very least it won't be possible to release the code under the GPL.

Christian

Using patented algorithms/techniques is no obstacle to the GPL or virtually any other license for that matter. If it were you'd have to search patents in every country in the world to be able to GPL it. The GPL doesn't concern itself with patents.
ormaaj
 
Posts: 11
Joined: Tue Sep 27, 2011 11:12 pm

Re: New Boeing 787-8 GIT

Postby ckruetze » Mon Feb 20, 2012 2:00 pm

ormaaj wrote in Mon Feb 20, 2012 10:30 am:
ckruetze wrote in Sun Feb 19, 2012 12:33 pm:At the very least it won't be possible to release the code under the GPL.

Christian

Using patented algorithms/techniques is no obstacle to the GPL or virtually any other license for that matter. If it were you'd have to search patents in every country in the world to be able to GPL it. The GPL doesn't concern itself with patents.

Cool, didn't know that.
So what you are saying is I can take a patented algorithm (with or without the permission of the owner) and then I can legally publish it in GPLed software and the owner of the patent can do nothing against his algorithm being used for free?
ckruetze
 
Posts: 32
Joined: Sat Jun 11, 2011 12:06 pm

Re: New Boeing 787-8 GIT

Postby sgofferj » Mon Feb 20, 2012 2:56 pm

No! You - of course - need the owner's permission. You can't just take arbitrary property of others and publish it under the GPL without their consent.
What ormaaj wrote, just means that patents and GPL are not legally mutually exclusive.
It just doesn't make a whole lot of sense, economically, for the owner to go through the hassle of patenting an algo and then releasing it under GPL, what the owner would practically do when giving you permission to use his patented algo in your GPL'd work.

And in fact, you DO have to check patents before you publish any type of software, GPL or not, otherwise you do risk being sued for patent infringement.
That is exactly the reason why the FSF and other organizations are fighting against software-patents, because it's next to impossible to check all possibilities and almost everything is already patented.
FG 3.1 GIT / Opensuse 12.3 / Phenom II X4 / GForce GTX560
Stefan's little Flightgear corner | The Finnish Weather Center | Wolves in Finland

Working on: EFTP
COM: IAX2:home.gofferje.net/stefan (MO-FR 0700-2000 UTC, SA+SU 0900-2000 UTC)
sgofferj
 
Posts: 790
Joined: Mon Dec 05, 2011 4:13 pm
Location: EFTP
Callsign: OH-SW
Version: 3.1 GIT
OS: Opensuse

Re: New Boeing 787-8 GIT

Postby ormaaj » Mon Feb 20, 2012 4:23 pm

sgofferj wrote in Mon Feb 20, 2012 2:56 pm:What ormaaj wrote, just means that patents and GPL are not legally mutually exclusive.

Yes this is correct. Infringing a patent in the country where you live is technically illegal. Didn't want to hijack the thread with a long explanation. For those not already aware of all of this, see: http://www.debian.org/reports/patent-faq
Last edited by ormaaj on Sat Feb 25, 2012 7:17 am, edited 1 time in total.
ormaaj
 
Posts: 11
Joined: Tue Sep 27, 2011 11:12 pm

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 9 guests