Re: [Flightgear-devel] Implementing realistic radar inside the Flightgear engine

2012-11-28 Thread Adrian Musceac
On Wednesday, November 28, 2012 09:51:06 Renk Thorsten wrote:
  I know the advanced weather system uses a C++ random area terrain sampler
  written by Torsten Dreyer.
 
 Yes - but the way this is currently set up it wouldn't help you - it just
 samples various averages and variances of the elevation, it can't be used
 to give you a profile of the terrain.
 
 * Thorsten

I know, I was inspired by it when I wrote my own terrain sampler for the radio 
part.

Since we're talking terrain sampling, today I was again inspired by James' 
work on the navdata cache, and modified the radio terrain sampler to use a 
sqlite database holding elevation data. This little experiment made me reach a 
couple of conclusions:
1. This method is way slower than the scenery method, like 20-30 times slower, 
but works somewhat ok.
2. The elevation database for a 10x10 degree SRTM region is huge even with our 
filtered data: ~ 700 MB
3. This method allows elevation sampling even when terrain is not loaded, but 
does not provide material information, of course.

Now, if I could only find out and eliminate the speed bottlenecks with sqlite 
(I have no previous experience with it's C API), maybe this could be an 
interesting thing.

Cheers,
Adrian

--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Implementing realistic radar inside the Flightgear engine

2012-11-27 Thread Adrian Musceac
Hi,

I've seen a couple of external radar clients for Flightgear being developed 
right now.
I think that these days, with the advent of Canvas and other improvements, it 
should be possible and desirable to have a realistic radar station inside 
Flightgear.

At the moment, I'm only concerned about radar ranges and interference of 
terrain obstructions, weather, ground clutter.
For this purpose, I propose a template implementation of radar transceivers 
and transponders:
It is not possible to provide a detailed terrain picture on every antenna 
rotation. Sampling all terrrain 360 degrees around the station would cripple 
performance. Thus, I would just take all positions of aircraft inside the 
nominal range and perform radio calculations on them, using larger sampling 
distances and simpler routines for aircraft above a treshhold flightlevel.
If terrain around the antenna is obstructing the signal, or weather affects 
it, we can simulate that correctly.

Transponder responses are also a candidate for the new radio code. Like in 
reality, it is possible to have radar contact but lose transponder id because 
of radio issues.

Awaiting comments,
Adrian

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Implementing realistic radar inside the Flightgear engine

2012-11-27 Thread Stuart Buchanan
On Tue, Nov 27, 2012 at 1:03 PM, Adrian Musceac wrote:

 Hi,

 I've seen a couple of external radar clients for Flightgear being developed
 right now.
 I think that these days, with the advent of Canvas and other improvements,
 it
 should be possible and desirable to have a realistic radar station inside
 Flightgear.


I recently implemented a vertical terrain clearance radar for the Douglas
A4F Skyhawkd (a4f) using a combination of Canvas and Nasal terrain
lookups.  The code is checked into git if you are interested.

My main concern when writing it was minimizing the number of terrain
lookups per radar sweep.  For the vertical mode this is quite
straightforward as I've simplified the sampling to getting the elevation of
points every 1nm ahead.

I've still to look at the horizontal modes, but I suspect it would need a
Nasal enhancement to perform terrain intersection tests based on a
lat/lon/heading/pitch combination. I haven't looked into how much effort it
would be to add that yet, though I suspect it should be fairly
straightforward given that we already have similar function handling
mouse-clicks for the ufo.

-Stuart
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Implementing realistic radar inside the Flightgear engine

2012-11-27 Thread Adrian Musceac
On Tuesday, November 27, 2012 15:23:13 Stuart Buchanan wrote:
 
 I recently implemented a vertical terrain clearance radar for the Douglas
 A4F Skyhawkd (a4f) using a combination of Canvas and Nasal terrain
 lookups.  The code is checked into git if you are interested.
 
 My main concern when writing it was minimizing the number of terrain
 lookups per radar sweep.  For the vertical mode this is quite
 straightforward as I've simplified the sampling to getting the elevation of
 points every 1nm ahead.
 
 I've still to look at the horizontal modes, but I suspect it would need a
 Nasal enhancement to perform terrain intersection tests based on a
 lat/lon/heading/pitch combination. I haven't looked into how much effort it
 would be to add that yet, though I suspect it should be fairly
 straightforward given that we already have similar function handling
 mouse-clicks for the ufo.
 
 -Stuart

Hi Stuart,
I'm fairly aware of how AG radar modes work, from f16 detailed documentation, 
but know next to nothing about terrain clearance radar.
I will check this out and provide feedback if I can. I have no idea though 
about Nasal terrain sampling performance. I need to read more about this. I 
know the advanced weather system uses a C++ random area terrain sampler 
written by Torsten Dreyer.

However, I should have made it clear in my previous message that I was 
referring to ground-to-air radar, hardcoded as a subsystem, with only the 
visual interface written with Canvas/Nasal.

Cheers,
Adrian

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Implementing realistic radar inside the Flightgear engine

2012-11-27 Thread Vivian Meazza
Stuart,

 

The Buccaneer in fgdata has had a terrain clearance radar for many years
now, using just the technique you describe. It's written in C++. It has a
horizontal mode - but I never got it to work satisfactorily at a frame rate
I liked.

 

Vivian 

 

From: Stuart Buchanan [mailto:stuar...@gmail.com] 
Sent: 27 November 2012 13:23
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] Implementing realistic radar inside the
Flightgear engine

 

On Tue, Nov 27, 2012 at 1:03 PM, Adrian Musceac wrote:

Hi,

I've seen a couple of external radar clients for Flightgear being developed
right now.
I think that these days, with the advent of Canvas and other improvements,
it
should be possible and desirable to have a realistic radar station inside
Flightgear.

 

I recently implemented a vertical terrain clearance radar for the Douglas
A4F Skyhawkd (a4f) using a combination of Canvas and Nasal terrain lookups.
The code is checked into git if you are interested.

My main concern when writing it was minimizing the number of terrain lookups
per radar sweep.  For the vertical mode this is quite straightforward as
I've simplified the sampling to getting the elevation of points every 1nm
ahead.

I've still to look at the horizontal modes, but I suspect it would need a
Nasal enhancement to perform terrain intersection tests based on a
lat/lon/heading/pitch combination. I haven't looked into how much effort it
would be to add that yet, though I suspect it should be fairly
straightforward given that we already have similar function handling
mouse-clicks for the ufo.

-Stuart



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Implementing realistic radar inside the Flightgear engine

2012-11-27 Thread Renk Thorsten

 I have no idea  
 though about Nasal terrain sampling performance.

Pretty good these days - whenever a convective weather system is set up, we use 
about O(1000-2000) terrain elevation sampling points to generate the 
cloud-terrain interaction, they're done at a rate of 20 per frame. On my old 
computer, this is visible in the framerate indicator as a temporary reduction, 
on my new computer it doesn't even show. 

If you evaluate 1-5 rays per frame, you're certainy not causing massive 
performance drain.

 I know the advanced weather system uses a C++ random area terrain sampler
 written by Torsten Dreyer.

Yes - but the way this is currently set up it wouldn't help you - it just 
samples various averages and variances of the elevation, it can't be used to 
give you a profile of the terrain.

* Thorsten
--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel