bridgecommand / bc

Bridge Command ship simulator
https://www.bridgecommand.co.uk
Other
56 stars 24 forks source link

Boat not visibile in radar image when using higher radar resolution #46

Closed VariabileAleatoria closed 5 months ago

VariabileAleatoria commented 1 year ago

Hi, using the bc version compiled from git commit b7a033eae89101c97ed891cbbf4af1ade1e1ab5d I'm facing the following issue: when setting an higher resolution from bc5.ini (RADAR_AngularRes=4096 RADAR_RangeRes=512) boats' shapes on the radar display are not drawn in a visible way. In the following images there is a comparison between default resolution (RADAR_AngularRes=360 RADAR_RangeRes=128) and the aforementioned. 360

4096

SNoble6 commented 1 year ago

I have the same issue

bridgecommand commented 1 year ago

Thanks for pointing this out. It's related to the way the radar scan is implemented in src/RadarCalculation.cpp around line 641, which effectively simplifies a contact to a line. I think this can probably be improved by a relatively small change, which I'll investigate.

bridgecommand commented 1 year ago

Commit 86e865c should fix this. The radar contact detection is now doing an additional ellipse check based on the contact's width and length. This should also resolve the problem of buoys becoming invisible on the radar when close.