Board index FlightGear Development Canvas

Excluding Canvas MapStructure/Radar targets (reposted) ?

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.

Excluding Canvas MapStructure/Radar targets (reposted) ?

Postby Hooray » Tue Jul 26, 2016 5:00 pm

Necolatis wrote:Do you know how to get the Canvas ND Framework radar to show only echoes that are inside a certain radarcone, instead of 360 deg around?

- Necolatis

yeah, there is a searchCmd method that serves as the "filter" for all echoes - you can add arbitrary heuristics/logic there to exclude targets based on range, azimuth, elevation etc
We kinda covered the whole thing in the "Canvas Radar" article, which goes into great detail on implementing custom filters to include/exclude targets based on such heuristics.

Depending on the layer you are working with, you need to open the corresponding "lcontroller" file in $FG_ROOT/Nasal/canvas/map - e.g. TFC for AI/MP traffic. Anyway, like I said the Canvas Radar article has tons of details covering this sort of thing
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,
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Posts: 11977
Joined: Tue Mar 25, 2008 8:40 am

Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest