Please login or register.

Login with username, password and session length

News:

Registration is only required if you want to post, and is not needed to read any posts. To avoid excess 'spam' accounts, all accounts where no posts have been made will be deleted after two weeks. Please register again if you wish to post.

Author Topic: Increasing RADAR resolution?  (Read 4360 times)

December 09, 2021, 11:06:45 AM
  • Member
  • **
  • Posts: 2
    • View Profile
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?

December 11, 2021, 07:30:39 AM
Reply #1
  • Administrator
  • Member
  • *****
  • Posts: 146
    • View Profile
Hi, yes, I think everything you need should be in RadarCalculation.cpp

December 12, 2021, 02:10:12 PM
Reply #2
  • Member
  • **
  • Posts: 2
    • View Profile
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.

December 12, 2021, 10:03:37 PM
Reply #3
  • Administrator
  • Member
  • *****
  • Posts: 146
    • View Profile
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.