Development > Development

Increasing RADAR resolution?

(1/1)

Radar1:
Hello!

First as a sidenote: I've been hacking away at BridgeCommand for a project of mine and been able to easily tweak it for my needs so far. Thank you very much for having shared your work like this!

I'm now trying to increase the angular resolution of the RADAR, beyond the hardcoded 360 lines per revolution limit. Before I lose too much time searching for what I might break along the way I thought I'd ask those that are familiar with the codebase: can I assume that everything I need is contained in RadarCalculation.cpp or do you know if messing with it might have unintended consequences for the rest of the simulation?

forum_admin:
Hi, yes, I think everything you need should be in RadarCalculation.cpp

Radar1:
Thanks for the reply, I was able to do it and indeed it looks like I did not break anything else. BC rapidly hits performance issues when increasing RADAR resolution too much though! My machine can only comfortably run it up to 1024 angles x 512 cells for now.

forum_admin:
Yes, a lot of the slow down comes in the conversion of the radar picture into a 2d image (in RadarCalculation::render). In this the contents of scanArrayToPlot are used to re-draw a part of an image (irrlicht IImage) radarImage. This is later converted into a texture, and what you're actually seeing on screen is a 3d rendering of this plane mesh with the texture applied.

I've wondered about speeding this up by using plane mesh that has been generated with two triangles for each radar 'pixel' and setting the vertex colours directly. I suspect that this would be faster, but I haven't yet tried it.

Navigation

[0] Message Index

Go to full version