Board index FlightGear Development Canvas

NavDisplay & MapStructure discussion (previously via PM)

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hyde » Tue Jun 03, 2014 12:28 pm

O.K. Now pushed the changes. Thanks.
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Tue Jun 03, 2014 12:34 pm

Thank you, and sorry for the "delay" WRT to the fix - however, like I said, I posted the one-liner and expected that the issue would be resolved that way, especially because the 777 contributors already have commit access - so we really didn't prioritize committing something for which a fix had already been posted. Overall, fgdata:master is obviously "in flux" and permanently changes. While it is true that only "finished & working" stuff should be committed IDEALLY, many fgdata committers don't exactly follow that rule either. So there's really no need to feel frustrated about such thing, it would have been better to raise it again.

going to test the whole thing now to see if we broke anything
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Tue Jun 03, 2014 5:28 pm

Now that Hyde has committed Philosopher's latest changes, I'd be interested in getting some more feedback on performance.
Here, I am using the ufo @ksfo circling in a shuttle climb at >= 2000 kts GS and getting roughly 30 fps and 40-60 ms.

Image
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Hyde » Wed Jun 04, 2014 11:29 am

I find a small bug.
Active way point indication (pink star mark) on the both ND and map is shifted 1 short.
You can specify it on PLAN mode. Way point of aircraft mark should be active way point.

Thanks,
Hyde
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Wed Jun 04, 2014 12:53 pm

to check what it is doing, see the searchCmd() function in $FG_ROOT/Nasal/canvas/map/WPT.lcontroller: https://gitorious.org/fg/canvas-hackers ... roller#L55
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Fri Jun 06, 2014 8:27 pm

Referring to your bug report: http://code.google.com/p/flightgear-bug ... il?id=1486

searchCmd() is fairly trivial and should be based entirely on the original code:

Code: Select all
var searchCmd = func {
    printlog(_MP_dbg_lvl, "Running query: "~name);
 
    var fp = flightplan();
    var fpSize = fp.getPlanSize();
    var result = [];
    for (var i = 1; i < fpSize; i+=1)
        append(result, WPT_model.new(fp, i));
    return result;
};


Especially coords/cmd handling seems to differ here

Without being really familiar with the flightplan() API, given your bug report, it seems our handling of the first wpt needs to be reviewed, Gijs' original code deals with it differently:
https://gitorious.org/fg/canvas-hackers ... e.draw#L47

I need to read up on the flightplan() API first, but maybe Gijs can quickly provide some feedback regarding the differences here ?
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Gijs » Fri Jun 06, 2014 8:37 pm

I cannot check the details right now, but IIRC the API doesn't return waypoints, but legs. So for the first (or last) leg you need to draw and thus iterate over two waypoints. Maybe that's what's going wrong here?

I haven't been able to checkout the ND lately, but I will make sure to do so in the upcoming weeks. There's a lot to catch up with :-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9364
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Fri Jun 06, 2014 8:39 pm

ok, thanks for getting back in touch - yes, there's a lot to catch up with, but those changes should improve and clean up the old code. According to the bug report, it's the last WPT symbol that's missing ATM, is that correct ?

http://wiki.flightgear.org/Canvas_MapSt ... map_dialog
Image

PS: If at all possible, please try to make bug reports that do not depend on aircraft, i.e. better use the dialog, because it is easier to use & troubleshoot for people not familiar with the aircraft.
The back-end code is 100% shared, i.e. identical.
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Philosopher » Fri Jun 06, 2014 8:56 pm

sorry, I have to check in and finalize all my changes - in fixing this I introduced a minor bug as well that I should fix before Hyde would report it too ;), but I got this fixed.
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Fri Jun 06, 2014 9:38 pm

okay, thanks for the heads-up, won't take a look then until your changes are committed.
From a testing standpoint it might actually be a good idea to save some flight plans in $FG_ROOT at some point, so that we can more easily reproduce such issues, and validate behavior - possibly even in a scripted fashion.

@Gijs: If/when you get a chance to test things, it would be also good to carefully check the WXR stuff, because I adapted that purely by looking at the code, so there may be some regressions there...

BTW: performance-wise, the standalone map-canvas dialog should also give a good idea about the max performance that can be obtained by the ND code and existing issues (lag), and the standalone ND mode should demonstrate what performance is currently possible without optimizing things further there, i.e. regardless of any aircraft-specific issues like cockpit/texture complexity and aircraft specific Nasal code.
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Philosopher » Sat Jun 07, 2014 2:53 am

okay, fixed both bugs, pushed updated bug report etc... Too bad I don't have more time! :D
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sat Jun 07, 2014 11:15 am

okay, thank you. The changes look good to me, and I just tested it, the route also seems to be complete now.
I agree that the original route drawing code wasn't exactly straightforward, I also once tried to port it and introduced a few regressions :oops:
But your current code looks very clean and straightforward to me!

At some point, we could probably unify leg handling for both layers, i.e. RTE and WPT, and use a shared model.
And don't worry, if Hyde finds something else that is broken, I can probably take a look
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Hyde » Sun Jun 08, 2014 4:48 pm

if Hyde finds something else

Sorry, I've found. :D
1. Route display is flickering every 10 or 20seconds. I think display is erased and redrawn at that time.
That redrawn is sometimes missed and display is gone along with Flight History on the canvas map and come back on later flickering.

2. Airport icon is not displayed when Route Manager is activated and not erased when deactivated.

3. Canvas pop up has white display with following nasal error.
Not a canvas.Canvas:
at /home/hyde/work/FlightGear/fgdata/Nasal/canvas/gui.nas, line 139

Let me know if they are difficult to fix, I will submit the issue report.
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sun Jun 08, 2014 5:03 pm

Hyde wrote in Sun Jun 08, 2014 4:48 pm:1. Route display is flickering every 10 or 20seconds. I think display is erased and redrawn at that time.

you can open the RTE files and add print("redrawing route"); to the RTE.symbol file to see if that's the case.
If it's related to searching, it would be in sync with searchCmd()


That redrawn is sometimes missed and display is gone along with Flight History on the canvas map and come back on later flickering.

I've seen similar problems related to airports and airport labels being off-scale and transform 1-2 frames too late.

2. Airport icon is not displayed when Route Manager is activated and not erased when deactivated.

I am not sure, but I don't think we ever even thought about doing that, or did it work that way originally ?

3. Canvas pop up has white display with following nasal error.
Not a canvas.Canvas:
at /home/hyde/work/FlightGear/fgdata/Nasal/canvas/gui.nas, line 139

A complete stack trace would be better to see where that got triggered - but this could be related to some tooltip I guess ?


Let me know if they are difficult to fix, I will submit the issue report.

yes, sounds like a good idea - but I'll have a look to see if I can reproduce things.
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Philosopher » Sun Jun 08, 2014 5:09 pm

I personally think it's a little bug with Tom's update system for geos, it doesn't seem to update instantly but next frame is /my/ guess. Need to get in touch with him about that and a couple other things, but no time this week(s).
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

PreviousNext

Return to Canvas

Who is online

Users browsing this forum: No registered users and 10 guests