Everything will be calculated in scene coordinates, so lat/long.
Everything will be calculated in scene coordinates, so lat/long.
Thanks... let me continue with this new thought... may have to provide you some more code
I tried you suggestion and it doesn’t seem to work. I must be missing something in the discussion. I have included my code for the project. Can you help? I attached a zip file.
Should be able to build it and run (windows). Puts up a map gui and a flight plan gui. Either select a predefined set of points or enter your own., the click on “flyingâ€. The version as is works the way I would expect it to work but it is using pixel per degree conversions instead of scene coordinates. If you change the PIXELFACTOR to 0 then the code will attempt to do the conversion in latitude,longitude.
Under lat, lon approach I want the reseet the scene parameters with each new set of waypoints and all processing to be based on the lat, lon boundaries.
Problems I am having are:
1) It won’t reestablish the scene boundaries every time a new set of waypoints is supplied. (works in the pixel conversion approach).
2) It won’t o zoom in on the scene with things staying center oriented; everything moves up and out of view, no longer accessable.
3) Would like the scene mouse double click to return the mouse position in the scene lat, lon.
4) Would like the scroll drag to work. When I do the mouse double click the scene drag stops working.
5) Finally when I do this version under Linux, when you zoom in white lines begin to appear. As the object moves across the screen white spacing is left behind. Like some background isn’t updating
Thanks for help
Hi All,
Sorry to revive an old thread but I am trying to do the same thing and am a little confused... If I set up my scene as suggested by Master Wysota (90, -180, 180, 360) so I get a conversion to lat/lon coords, but I only want to view
a very small area, for example a 250nm radius around a given lat/lon point, how do I then have the view "zoom in" to display only that area and maintain the lat/lon coord conversion for that area? I am trying to make a radar/sonar type of
display using lat/lon points...
Thank you in advance,
tim
Calculate the rectangle containing your radar circle (world coordinates), about 6 degrees wide/high, and call QGraphicsView::fitInView()Alternatively, you can call QGraphicsView::centerOn() with the centre point of your radar and then scale to suit.
Hi Chris,
Thank you for your reply. I will try your suggetion...
tim
Bookmarks