|
From: Michael B. <mic...@ve...> - 2003-04-09 05:16:40
|
On Mon, 2003-04-07 at 22:06, Joe Venzon wrote: > > I think that if we paste the > > trace and noise bmp together with some blending, it might look right. =20 > How did the old code do it? I'm curious why you don't just use the old c= ode and render the SDL surface to the texture every frame or so. >=20 > Joe Venzon >=20 Basically it currently works like this. Setup three different SDL surfaces, two of these are the waterfall displays, the third is a scratch surface used for copies. Step one. Start by plotting 360 (minus the baffle area) background noise pixels. this is done six times (3 timescales * 2 displays). Step two. Every 1/5th second plot one pixel per contact on each timescale on each display applicable display with a slight random variance to get a nice swath for the trace. Step three. Every second blit into the scratch surface the contents of the 0-60 second history window, minus the last line. Turn around and blit it back to the display surface one line lower, and erase the first line and fill it backup with background noise. Every 30 seconds do the same for the 0-30 minute display. Every 2 minutes do the same for the 0-2 hour display. Duplicate Step three for the second sonar window. Divide the times above by what ever timescale we are at. All this happens even when you are not "in" the sonar station via a thread. When you are at the sonar station add blitting the sonar screens too the station. |