Board index FlightGear Development Canvas

MapStructure OANS Map ? (by Merspieler)

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: MapStructure OANS Map ? (by Merspieler)

Postby merspieler » Fri Jul 30, 2021 2:51 pm

And why do you talk about 850? Current XP data is 1100...
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: MapStructure OANS Map ? (by Merspieler)

Postby Hooray » Fri Jul 30, 2021 3:01 pm

feel free to refer to Gijs' comments, and/or the official X-Plane specs (the breakage was introduced during the migration from 810 to 850, like he said): https://developer.x-plane.com/article/a ... 0-version/

For the full context, refer to the quoted comments and/or the links posted, and you will see that this has been extensively discussed over the years - which is why "writing a parser", is probably not going to solve your problem at this point (Scott and legoboyvdlp also mentioned the API specifically, which is supported by using a dedicated MapStructure controller).

Either way, best to do a little research first, and then discuss your findings with other contributors, before rolling up your sleeves and "coding a parser" that may not even be required (and that won't be a showstopper for the implementation of an OANS until you have figured out how to implement 90% of the other functionality....)
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: MapStructure OANS Map ? (by Merspieler)

Postby merspieler » Fri Jul 30, 2021 3:05 pm

Yeah... but since 850 there are the polygons... and 1100 does have them too... so why wouldn't you go to the latest version?
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: MapStructure OANS Map ? (by Merspieler)

Postby Hooray » Fri Jul 30, 2021 3:20 pm

all of this, and more, is fully answered in the quoted comments and posted links - aka: an exercise for the reader :wink:

(obviously, you could also raise this on the devel list once again, but the comments made by Stuart and Scott are fairly "recent", i.e. are from 2020 - in the context of WS 3.0)
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: MapStructure OANS Map ? (by Merspieler)

Postby Johan G » Fri Jul 30, 2021 3:40 pm

I might be mistaken, but as I understand it the current TerraSync scenery (World Scenery 2.x) have a mix of airports using apt.dat version 8.10, 8.50, and 10.50 features. It might be nice to be able to portray the airports as they look in the scenery. :wink:
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: MapStructure OANS Map ? (by Merspieler)

Postby Hooray » Fri Jul 30, 2021 3:54 pm

The relevant difference between different format versions were nicely summarized by legoboyvdlp, Scott and Stuart/Gijs - so no need to rehash everything here. Suffice to say, it seems there's a fairly usable parser available already according to Scott, and that it's primarily the FGPositioned/Nasal scripting layer (cppbind) that may need to be reviewed/updated to bring it up to par with the relevant functionality to expose relevant information to scripting space, like Gijs suggested.

Either way, it seems that Stuart is already in the loop, due to his involvement with WS 3.0 - and given his FG1000 project, he seems like the best person to reach out to, in order to discuss if/how and when to expose the corresponding functionality to scripting space, so that the Canvas system has better access, too.
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: MapStructure OANS Map ? (by Merspieler)

Postby legoboyvdlp » Fri Jul 30, 2021 6:57 pm

Yeah; thanks to D-ECHO's texture work and some fixes I did the latest TerraGear parser is mostly compatible with apt.dat between versions 850 and version 1130 including the new linear features. I've no idea what the status of the parser for WS3.0 is though.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: MapStructure OANS Map ? (by Merspieler)

Postby Hooray » Sat Jul 31, 2021 9:20 am

Thanks for the update, your postings/summary in the archives has also been very useful.
While I can definitely locate the Canvas/Nasal side of things covering FGPositioned and the corresponding Nasal "ghosts" (cppbind objects), I am not very familiar with the WS 3.0 side of things - so maybe you could share some pointers (file names/links) so that we can look up whether the updated parser is a part of TerraGear/SimGear or whether it's already available/used by FlightGear itself, too - primarily I am asking because of Gijs' comments about 850 not being supported/used yet. Thus, it would be helpful to determine where the disjoint really is located - for instance, merspieler mentioned wanting to code up a parser from scratch, whereas my impression is, that we are not really lacking a parser per se, but rather missing some plumbing (ideally only at the cppbind level)?

Some background: with cppbind being the boost-based "glue" layer that connects the C++ world and the Nasal world, so that "objects" can be seamlessly exchanged between both worlds - and FGPositioned being all about the spatial SQLite-based database to hold navaids and other POI data and expose it to C++ space (and thus to Nasal space via cppbind).

Overall, a few more pointers might be helpful, even if just to prevent people from doing redundant/unnecessary work, because they're missing the full picture - i.e. where exactly we're lacking the plumbing. However, once again, I don't consider any of this a showstopper - arguably, updating the Nasal APIs to also expose 850-style airport data, should not be that complicated (and is probably much less work than coding a parser in Nasal space - then again, there remains the issue of getting patches reviewed/discussed and committed).

However, with Stuart, Scott and Gijs obviously being in the loop already, getting related patches discussed might stand a pretty good chance already - but first of all, we need to determine what we've got, and what's missing and then take it from there. Either way, filing a dedicated ticket for the issue might still be a good way forward to ensure that people can more easily follow things, without having to follow the forum or search the archives (which obviously isn't our strongest forte)

It seems, here's Scott's commit titled "GenAirport: Support apt.dat version 1100 parsing": https://sourceforge.net/p/flightgear/te ... ec36e58f0/
So the question remains, how much of this is available in/used by FlightGear for navdb building/processing - either way, at least we've got C++ code in TerraGear that could probably be leveraged to update the FlightGear-side of things if needed.

For reference, here's the original apt loader used in FlightGear: https://sourceforge.net/p/flightgear/fl ... loader.cxx

(and if that's indeed the case, we should consider generalizing such generic functionality to live in SimGear, so that it can be more easily used by FlightGear and related tools)
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: MapStructure OANS Map ? (by Merspieler)

Postby merspieler » Sat Jul 31, 2021 12:21 pm

with cppbind being the boost-based "glue" layer


hm... https://wiki.flightgear.org/Deboosting_FlightGear ... wouldn't it be better to wait until that is done, instead of adding more to it to be untangled?
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: MapStructure OANS Map ? (by Merspieler)

Postby Hooray » Sat Jul 31, 2021 2:13 pm

merspieler wrote in Sat Jul 31, 2021 12:21 pm:
with cppbind being the boost-based "glue" layer


hm... https://wiki.flightgear.org/Deboosting_FlightGear ... wouldn't it be better to wait until that is done, instead of adding more to it to be untangled?


In a perfect world, maybe.
In reality: no.

Keep in mind that 1) the wiki is not an official place to communicate any project goals (in fact, I myself assembled the page you are referencing above) - also, 2) just because some core developer(s) state their wishes, that doesn't automatically imply any urgency/priority or even a "consensus" among core devs in general, that something is agreed upon and being worked on by others, or even just encouraged by others.

3) cppbind is a self-contained component, it using boost under the hood has nothing to do with its code being widely used by other core code - in fact, even if you were to replace the boost parts in cppbind, the functional interface of it would remain 99.9% identical (especially with modern C++ idioms).

Realistically, "deboosting" FlightGear/SimGear isn't going to happen anytime soon, unless additional core devs consider the current situation a problem, and get involved in addressing the issue. The background here being, that over the years, using boost has actually been encouraged by some core devs - in fact, in some of my own merge requests, James himself reviewed my patches and requested that I'd use boost constructs instead of standard C++ ...

All of which is to say, priorities are changing over time - and just because people tend to share their wish lists in a more or less public form, that doesn't commonly affect the way the project is running or being worked on - I mean, let's face it, we have something called the "project roadmap" with a bunch of items on it, that are really only being worked on/backed by a single contributor - which is why some stuff has never materialized over the years, despite being widely promoted (think the HLA/RTI development), or why other stuff is taking years to materialize without anything being visible, despite numerous public announcements that feature X/Y/Z would be about to be finished "soon".

You only need to look at the PUI dilemma: everybody and their dog basically agrees that PUI has to go, but very few people are interested in contributing to that portion of the work - and the few that are indeed interested in contributing to address the situation, are interested in different approach - such as modernizing PUI, replacing PUI using Qt5/QQ2, creating Phi or instead using a Canvas back-end to translate existing dialogs - with the Qt5 replacement having been announced to be almost ready for release for several years now: https://wiki.flightgear.org/PUI#Replacement_status

Nevertheless, it would be shortsighted to stop maintaining PUI/XML dialogs, just because the Qt5/QQ2 solution might become available "soon" - in fact, had we done that, none of our dialogs would be actively maintained because of the situation.

While that may sound a little irritating, that's unfortunately how things work behind the scenes (and have been working for years) - and even if you were to ask on the devel list, you won't find a single core developer there to suggest that you stop using/contributing to cppbind just because it happens to be using boost - that's akin to asking people to stop driving cars unless they own a Tesla :lol:

Seriously though, there are a bunch of important items that more people have on their own agenda because these translate into tangible improvements (compositor, composite-viewer etc), rather than "nice-to-haves" like reducing compilation times or getting rid of boost - especially because the exact same people who now want to get rid of it, have been pushing for its adoption for years.

The external cppbind interface is basically going to remain unchanged - and basically you cannot replace/update cppbind without wider test coverage, because it's widely used by many critical canvas components - basically, cppbind is there to stay, just like the canvas is there to stay - just because some folks don't agree with stylistic matters or dependencies, that doesn't magically mean that we'll have contributors interested in updating working code that happens to be fairly complex, too.

In other words, the one benefit that can be had from getting rid of boost in cppbind is reduced build times, and maybe more standard use of modern C++ constructs - however, even the recent push for wider adoption of modern C++ has been causing some friction among contributors.

Either way, getting rid of boost in cppbind isn't critical at all - there are more urgent issues, and you'll be hard pressed to find a single core devs to suggest that cppbind shouldn't be used currently just because it happens to use boost: whenever you're using a Canvas based feature, you are automatically using boost, too.

And that's also the crux of it: developers are generally not motivated to update working code just for sake of it, there must be an actual optimization/improvement. Which is hard to even just ...imagine in the case of boost/cppbind - build times typically don't matter to people on multicore systems with 64+ gb of RAM and 16 cores :lol:

Also, the way cppbind is structured, it being used by FlightGear (it living in simgear!), has nothing to do with "untangling" things: boost is internally used by cppbind, i.e. behind the scenes - so, you can definitely deboost cppbind, without modifying the external interface significantly, let alone breaking it entirely (cppbind being a way to expose data structures between Nasal and C++, basically sitting in between the property tree and scripting layer)

Image

All that being said, most of the original FGPositioned APIs are predating cppbind by several years, which is to say that code was written (by James!) years before the canvas and cppbind showed up in the archives - which in turn means, you can also contribute to the FGPositioned side of things, without having to tinker at all with cppbind.

... that however, would be more tedious - as in having to write 100 lines of C++ code to accomplish something that cppbind will do with less than 20 lines - your choice :lol:
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: MapStructure OANS Map ? (by Merspieler)

Postby merspieler » Sat Jul 31, 2021 2:55 pm

thanks for explaining
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: MapStructure OANS Map ? (by Merspieler)

Postby Hooray » Sat Jul 31, 2021 4:02 pm

Getting rid of boost is basically a build time optimization, and makes it a little easier to compile FlightGear from scratch, i.e. fewer dependencies (and a fairly large one at that, but still not quite as hefty as OSG or Qt5 ...)
Either way, it doesn't really fix any actual "bugs" or runtime problems. It's basically in the same league as pImpl-style optimizations. I suppose, most people will find it more interesting to fix actual problems - also, while boost in cppbind isn't causing any actual problems, porting the existing code base, does require a fair amount of meta-programming, and the kind of familiarity with modern C++ and boost specifically, that someone wanting to get rid of boost, probably doesn't have in the first place, and also isn't interested in acquiring, because of their distaste for boost - in other words, once you succeeded at replacing boost in FlightGear (especially in cppbind), you have become a boost/C++ expert already (and the few ones involved in the project are more likely to be interested in fixing real problems or implementing interesting features).
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

Previous

Return to Canvas

Who is online

Users browsing this forum: No registered users and 7 guests