Sign in to follow this  
Guest laurentC

VECTOR MAP (KINDA) RESPONSE

Recommended Posts

Hi all,As planned earlier (previous Tony's post : signs in airports vector map) we wanted :1) to create a very low time consuming (for me !) add-on and an easy to add database (for you !)2) to have a nifty tool to find your way in airportsAfter some tests it turned out that a chart of the airport was the easiest way to keep with the tower taxiways commands.LFPO for instance has so many signs (see the included example) that it would have been really boring to add them manually in a database !Then I prepared an easy addon for airports charts ...Two examples are provided : LFPO and KSFO.The handwork is quite easy : 1) just have a pic then convert it in PBM file2) fill two notable points (opposed thresholds are the best and easy points)Cheers,Download the test file below022805_ROTW_Airport_Charts.ziphttp://rotw.simvol.org/beta/Project_Airpor...port_Charts.ziphttp://forums.avsim.net/user_files/108356.gif

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Very interesting, Laurent.Thanks for your precious job.PS: I have not tried the DLLsound. I hope to succeed us within the weekend.

Share this post


Link to post
Share on other sites

Could this just be done with the normal chart viewer, i.e create an ECW format of the image, and a simple .map file with just the corners as reference points?Chris WallaceOttawa, Canada

Share this post


Link to post
Share on other sites

Laurent, the map solution works great. Is there an easy way to provide zoom? It might be able to replace the vector map altogether if it had zooming capability. Also, how does one turn the map's orientaton to equal that of the vector map. And one more thing..... can the circle icon be an airplane icon? This is great work, Laurent. tony

Share this post


Link to post
Share on other sites

Chris, for comparison purposes, I've tried writing a *.map file for the ksfo airport map and find that FLY2 locks up. I am sure it has to do with some error in the file. Here's the text. I guessed on some entries, from down ..... ---- begin map ---- ---- map name ---- ksfo airport map ---- size in pixels ---- 1006 630 ---- tile size in pixels ---- 256 ---- map type ---- 5 ---- ECW file ---- ksfo.ecw ---- pos plotting ---- 1 ---- coverage area ---- 37 38'N 122 24'W 37 37'N 122 22'W ---- lat lon grid map ---- 20 5 ---- grid entry ---- ---- lat lon ---- 37 38'N 122 24'W ---- x y ---- 344 230 ---- end entry ---- ---- end map ----tony

Share this post


Link to post
Share on other sites

Tony,> ---- lat lon grid map ----> 20> 5> ---- grid entry ----> ---- lat lon ----> 37 38'N> 122 24'W> ---- x y ----> 344> 230> ---- end entry ----The entry specifies the dimensions of the lat/lon to x/y lookup points. Fly is expecting to read an array of 20 x 5 = 100 points, and you only have one. Using11may work, but I'm not sure what Fly would do with only one reference point. I'd recommend:22then specify four points at the corners of the image.Chris WallaceOttawa, Canada

Share this post


Link to post
Share on other sites

Hi all,I didn't tried the normal ECW method because I thought it was quite difficult for the common user to proceed without errors : among our goals was an easy way to add signs to a (vector) map for the most common simmer who is more interested by the flight than the files handling.Furthermore, getting the precise coordinates of the angles isn't so easy by hand.So I thought ECW way was to be reserved to packages made by simmers specialists.I know we could also have compiled a tool that would have prepared in a nifty way the *.map file and *.ECW file, but, first, I was trying to figure out how to handle rendering charts (this was my funny part of the implicit deal), and second, I didn't want to spend too much time on this addon (there was also a third : portability).Said that, we can also make some attempts now to compile a tool for ECWS ...Turning the map to get the magnetic variation like the vector map would have been funny but the resulting trig. computation would have also been hightly CPU time comsuming (more if as presumed you would have turned on both chart and vector map). To keep things easier I fixed due north charts in order to avoid trigonometry difficulties.Zooming ? I need to find an easy way or a trick around here ... remember we are stuck with PBMs not BMPs.In the meantime, you can have charts with different resolutions for any PBM size you want. We are not limited by the actual size of the original BMP file, nor by the rendering viewer. Yes, we can have an airplane icon instead of the circle icon : I postponed this feature because I first wanted to know if the addon was acceptable for our planned goals ... if you are, well, I'll place one quickly.Another point to think about is the actual size of the chart viewer : is it too large ?Cheers,laurentC (rotw)

Share this post


Link to post
Share on other sites

Hi Chris,Thanks for the advises : very interesting.ECW files can be made yet with existing tools ... I'll try to use your counsels for a *.map converter ... if I could !Take care,laurentC

Share this post


Link to post
Share on other sites

Good discussion, Laurent.>I didn't tried the normal ECW method because I thought it was>quite difficult for the common user to proceed without errors>: among our goals was an easy way to add signs to a (vector)>map for the most common simmer who is more interested by the>flight than the files handling.Maybe, although I'd guess that even creating a PBM and adding a line or two to a control file is more work than a lot of people want to do. With the exception of guys like Tony and other die-hard Fly!'ers, people are lazy :-)>Furthermore, getting the precise coordinates of the angles>isn't so easy by hand.>So I thought ECW way was to be reserved to packages made by>simmers specialists.Yes, that's a fair comment.>Turning the map to get the magnetic variation like the vector>map would have been funny but the resulting trig. computation>would have also been hightly CPU time comsuming (more if as>presumed you would have turned on both chart and vector map).>To keep things easier I fixed due north charts in order to>avoid trigonometry difficulties.Real-time rotation of large raster images just isn't feasible IMO. (The exception is for texture-mapped images but that would add a lot of complexity in this case)>Zooming ? I need to find an easy way or a trick around here>... remember we are stuck with PBMs not BMPs.>In the meantime, you can have charts with different>resolutions for any PBM size you want. We are not limited by>the actual size of the original BMP file, nor by the rendering>viewer. Not to beat a dead horse, but this is an advantage of ECW that it can be (relatively) quickly zoomed in and out on the fly. There is no easy way to resize a PBM in memory without expanding it out to a full 32-bit image, resampling, then re-converting back to PBM. This is possible, and probably wouldn't be too slow, but it would consume a bit of memory would be fairly complicated to implement. If you want to go this route, it would probably be best to forget about PBM and use an open file format like JPG and the free jpeglib library to load and convert the images. After loading the original image, create copies in memory at certain fixed zoom levels, and then just copy pixels directly from the images in memory to your drawing surface.>Another point to think about is the actual size of the chart>viewer : is it too large ?How are you creating the display window? Do you know about the FUI widget? If you create a window template (.WIN) for a normal resizeable window, and put a widget inside it, then you will get all the normal window management code from Fly! including moving, resizing, close button, etc. but your DLL has full control over what to draw. If I have time I'll put up an example on the Wiki and link it to here.Chris

Share this post


Link to post
Share on other sites

Hi Chris, Tony, Dany and all,I took advantage of the widget indeed ... but I wasn't aware that I could also control the window properties with the normal APIs.That's really interesting and it allows many user friendly adjustements.I agree with your remarks ... thus I will almost try to prepare a tool that takes advantage of the ECW technique ... probably I'll need some help with the tags ...Cheers,laurent

Share this post


Link to post
Share on other sites

In the meantime, I took a pfd image of ksfo, converted it to jpg, then converted it to an ecw image. I created a map file, but still cannot have the map show up in FLY2. tony

Share this post


Link to post
Share on other sites

... uh ! Me too ! I can't go any further in the same process ...I keep trying to tweak tags ...Can you post your map file ?Take care,laurent

Share this post


Link to post
Share on other sites

...in your previous post ---- coverage area ----37 38'N122 24'W37 37'N122 22'WI think the order is lower left and upper right, then I would invert both points in the area defined below.laurentC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this