Board index FlightGear Development Canvas

Canvas RADAR driver for MapStructure (was: Mirage 2000-5)

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: Canvas RADAR driver for MapStructure (was: Mirage 2000-5

Postby Hooray » Wed Jan 13, 2016 11:24 pm

if you want to restrict radar filtering to certain types of objects, it would make sense to use a vector of strings for that:

Code: Select all
var filterByList = ["aircraft", "carrier", "multiplayer"];
var myRadar = radar.new (type: filterByList);
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: Canvas RADAR driver for MapStructure (was: Mirage 2000-5

Postby 5H1N0B1 » Tue Feb 16, 2016 10:22 pm

Ok. This is not finish, I still got work, but it's nearly completly independent from the mirage.
I'll also produce lot more comment. Make a transpondeur detection. work on more different mode.make things even more configurable by users.

You might have a look. I think as it is like that you can already use it for the radar.
The files is named radar2.nas and is initialized by the m2000.nas

Please tell me if this way is the more convenient for you to integrate this in the canvas.
The link is here :
https://dl.dropboxusercontent.com/u/109 ... 000.tar.gz
It is free to use as long as my name stay in it (I means, that is my work, and take lot, lot of time :mrgreen: )
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 222
Joined: Thu Aug 30, 2012 10:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: Canvas RADAR driver for MapStructure (was: Mirage 2000-5

Postby Hooray » Tue Feb 16, 2016 10:24 pm

Just FYI: Richard mentioned, in private, that he'd be interested in adopting/extending some of your radar related work on his aircraft - for that, it would make sense to be totally agnostic to the aircraft/instrument, because he's using a special MFD framework on the f15
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: Canvas RADAR driver for MapStructure (was: Mirage 2000-5

Postby 5H1N0B1 » Tue Feb 16, 2016 10:41 pm

Yeah we exchanged a little too. The terrain and doppler option are cool. Leto/Necolatis also adopted some of the code on the gripen.
Everything we talk before is done on this object :
You have a radar.new with nearly 20 optionnals parameters.
And there is also an function :
Code: Select all
update: func(tempCoord = nil, tempHeading = nil, tempPitch = nil)

That return a "target" object.
this "target" object that is { parents : [Target,geo.Coord.new()]};
As I coded it before make it a geo.Coord child, I think the geo.coord function are not well initialized in it, and I have to work a little more.
The idea, after that is done is, like I said one year ago to put the radar code on missile.so I'm nearly at this step. :)
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 222
Joined: Thu Aug 30, 2012 10:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: Canvas RADAR driver for MapStructure (was: Mirage 2000-5

Postby Hooray » Tue Feb 16, 2016 10:48 pm

from a design/coding standpoint you are doing the right thing if your code is about to support different aircraft/instruments, and can be used on/for different missiles (think scripted AI objects) - the one thing that will be very important here is supporting multiple independent/concurrent instances. At that point, people can use this even on multiplayer/bombable etc

For the Canvas/MapStructure (ND) use-case, we will primarily need to be able to configure/customize the radar so that people can use your class to display all sorts of "targets" (think AWACS/ATC aircraft etc)
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: Canvas RADAR driver for MapStructure (was: Mirage 2000-5

Postby 5H1N0B1 » Tue Feb 16, 2016 11:03 pm

I got actually 2 instance running together on the code I gave you. Totally independent. The next step it to give the possibility for them to be linked.
I do not need specific variable anymore. That allows 2 or more running instance.

Some function remains specifics, but Ill make them disappear.
I do it step by step :)
I think as it is now, it should be soon reusable by others.
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 222
Joined: Thu Aug 30, 2012 10:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: Canvas RADAR driver for MapStructure (was: Mirage 2000-5

Postby Hooray » Tue Feb 16, 2016 11:17 pm

for debugging purposes, you could look at marius_a's fgcamera work and add an MP/AI camera to your AI missiles and see if it matches the radar display
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 2 guests