Jump to content
Sign in to follow this  
rhumbaflappy

LWMViewer tool for FS2004

Recommended Posts

Guest jimkeir

Hi all.I've put together a tool to display the FS2004 LWM files, as an aid to designers. It's still very much under development, but it can already help with showing where add-on scenery will have problems with the default FS2004 lakes/rivers/airport flattens. Locations are given as lat/long as well as the area and cell IDs.I'm looking at adding support for FS2004 VTP files, but haven't decoded the entire file format yet. If anyone has information on this, I'd appreciate a look.Download at http://www.jimkeir.co.uk/LWMViewer.zip . Controls are simple: keypad +/- for zooming, click or keypad arrows for scrolling around, keypad 5 to recenter and reset zoom.Regards,Jim Keir.

Share this post


Link to post
Share on other sites

Hi Jim:this is great - I just loaded up a FS9 HP9*.bgl file and a FS2002 HYP*.bgl file and both work perfectly, even if loaded at the same time; this will indeed be a big help for LWM editing tasks.Is there a reason why some polygons are outlined in red instead of black?One comment: I believe you have the legend backwards. LOD8 grid sections are called "Cells" and LOD13 sections "Areas". I find this very confusing myself, as in my cognitive world "areas" are bigger than "cells". Alas, apparently not in the mind of the person who came up with this convention ;-)Would it be possible to also display the elevation of the LWM polygon beneath the cursor?Thank you very much for this great tool!Cheers, Holger

Share this post


Link to post
Share on other sites
Guest christian

Hi Jim,I keep following your posts, although I'm not replying. I'm too busy converting my lakes at this stage. Once I have my whole GIS data (coast, lakes, poly rivers) in the correct GIS form that will export the whole lot to LWM polys in one mouse click, I can worry about the FS2004 format again. I actually thought I had it already, but then my GIS data crashed FS2004 in FS2004 format.Cheers, Christian

Share this post


Link to post
Share on other sites
Guest Simpit

Hello Christian-Which GIS are you using? I have often thought this would be the way to go... allow conversion of GIS data to what we need.Simpit

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.> Is there a reason why some polygons are outlined in red instead of black?Yes - the red-outlined polys are what I think are the new-style variable height areas. It seems to fit, because they tend to show up on appropriate parts of rivers. As for the legend; yep, it's probably wrong :) I'll reverse the titles, and add an extra panel to show the height. FYI, my 'debug' version also loads and displays some VTP files. There are still things I don't understand in them though - there's a new VTPWidePoint command which I've not worked out fully.Regards,Jim Keir.

Share this post


Link to post
Share on other sites
Guest christian

ArcGIS 8.2. I've written a small module to do the job. The data needs a bit of preparation (has to be a shapefile and needs splitting into LOD13 quads, easy to do with the geoprocessing wizard though, I've written a small macro to generate a grid layer). The tools are really just developed to do the job for me with NZ data. Don't know if I will find the time to make it a tool that I could be easily distributable...Cheers, Christian

Share this post


Link to post
Share on other sites
Guest Simpit

Interesting.I was talking to Justin Tyme of Fsgenesis about his GIS, Manifold, and the potential of him writing a plugin for that particular program to do basically the same thing. I am an Autocad user from way back and have often thought about writing an export routine from that program.Do you think there is any way to come up with some open source "pseudocode" that anyone with a particular brand of GIS could use as the basis to come up with a translator/converter for that particular program? I'm thinking more on the algorithm level...Derek

Share this post


Link to post
Share on other sites
Guest christian

I'm not using any special algorithms really. My code just reads shapefile polys and writes them into BGLC code (so it simply reads coordinates and writes them into a text file). I'm using the inbuilt functionality of ArcGIS 8 to split the geographical data into LOD13 or LOD8 grid sized polygons. I was contemplating if I would program such an algorithm, but since there are a lot of special cases to be dealt with, I left it in the end, since it's much easier to use ArcGIS directly.Cheers, Christian

Share this post


Link to post
Share on other sites
Guest cwright

Jim, many thanks for a *great* tool! I only wish I had it a year earlier. When developing AutoAsm I spent many happy hours constantly re-loading FS and slewing across to find all the errors. With your program it would have been much, much easier and would have saved countless hours of work. Best regards, Chris

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.I've updated this a bit: it now shows which files it has loaded, supports drag-and-drop, optionally uses FSConnect or FSUIPC to 'track' the position in FS9 and shows most of the other files that come with the sim.I've worked out most but not all of the new VTP format, so all the corresponding objects are visible:- AB : airport polygons- FL : flattens (usually match the airports)- HL : Shorelines- HP : LWMs- RD : Roads- RR : Railways- ST : Rivers- UT : Utilities (power pylons etc)There are some others, such as PK9*.BGL, which it will also display. If nothing happens when you load a file, it contains no LWM or VTP data.There are still some places where it gets it wrong, so I'll post a full description of the format as soon as I fix those errors. In the meantime, enjoy and please be patient if it does occasionally display crazy paving over half the country :)Also, I don't have a registered copy of FSUIPC, so I've not been able to test that. Can someone let me know if it works?URL as before: http://www.jimkeir.co.uk/LWMViewer.zipRegards,Jim Keir.

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi again...OK, one last(?) update. I've fixed the remaining display bugs as far as I can tell, and added an 'autoload' option for the FS9 link. Same file, same place. I'll try to throw together a description of the file formats tonight.I've requested a program key for FSUIPC; if that gets issued, I'll build the key into the program and re-post. Also, if I can get a little feedback on its stability, I'll post it to the file download area here.Regards,Jim Keir.

Share this post


Link to post
Share on other sites

Hi Jim.Although I'm sure you'll get your key to FSUIPC, you may consider using FDSConnection from http://www.flightdecksoftware.com/They have code that is almost identical to FSUIPC's IPC, and you may distribute the module with the tool. Although it's still in development, it should work well for you. I used it in TCalc2004 without any problems.That avoids the key problem with FSUIPC. You may not be aware of it, but each version or name change of your program will require a new key... I found that annoying, and tool users would as well.Dick

Share this post


Link to post
Share on other sites

Hi Jim,In trying your tool, I tried pulling in an AP file and loading all the matching files. This caused an error resulting in a Send/Don't Send report to MS. I guess the AP files are the airport files that Lee Swordy looks at to do the AFCAD magic.If I pulled in the same file with the other letter extensions, i.e, HP, etc., I didn't get the error.The particular file I used was AP926210.bgl as a reference.You latest post indicates you have another update, but when I downloaded from your site, it was still the 11/25/2003 8:28AM version.W. Sieffert

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.Er, yeah. Sorry - I uploaded it to the wrong folder :( I've fixed it now, so try again. If you still get the same version, try clearing your browser's cache.For information, I've now got a program key for FSUIPC, and the details for the other DLL mentioned in another post and I'll add them tonight, as well as checking the ??926210 files. BTW, the AP* files aren't shown anyway, they don't seem to contain any terrain-related information.Regards,Jim Keir.

Share this post


Link to post
Share on other sites

Hi Jim,Got the new version. Thanks! Just to let you know, I use a registered copy of FSUIPC and the functions seem to work.I put FDSConnection.dll in the modules folder but wouldn't know which one is providing the input/output if they are both in the loop. I need FSUIPC since I use WideFS.W. Sieffert

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...