Sign in to follow this  
Guest Stormshadow

.inf Parameters - Trouble again :( !

Recommended Posts

Hi all,I'm trying to modify part of a mesh scenery using LOD11. I'm using the LOD calculator to retrieve the NW coordinate of the mesh scenery I'm trying to modify. The coordinates of part of the scenery are:N35.893152E14.5048343LOD calculator gives the following N and W limits which I take are the NW coordinates of the scenery:Lat = 35.903320312Lon = 14.472656250I insert these values in the inf file and the resample program generates an invalid BGL.I understand that LOD11 is made up of 4 by 4 LOD13 cells (correct?). When I insert the NW coordinate of the LOD11 cell right above the LOD11 cell I'm working in at the moment, the BGL generated is valid!Here's my inf file:[Destination] LOD = 11 DestDir = "C:Program FilesMicrosoft GamesTerrain Tutorial" DestBaseFileName = "TerrainSector1" UseSourceDimensions = 1 [source]Type = ElevS16LSBSourceDir = "C:Program FilesMicrosoft GamesTerrain Tutorial"SourceFile = "santander.dem"CellType = S16LSBLat = 35.903320312Lon = 14.472656250NumOfCellsPerLine = 257NumOfLines = 257CellXdimensionDeg = 0.0002288818359375CellYdimensionDeg = 0.00017166137890625ScaleinMeters = 1.0What's wrong!!?Storm

Share this post


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

Could it be that using LOD11 is not the best of solutions?? I mean I'm calculating the NW coordinate using LOD calculator which gives the N, S, E, W boundary limits and I take the N and W coordinates as the Lat and Lon of the scnery as outlined in the inf I pasted in. So I guess the NW should be fine...Storm

Share this post


Link to post
Share on other sites

Does your source data have 258x258 data points? Contrary to the impression given in the SDK, the cell dimensions are the sizes of the spaces between the points, and are calculated as follows:CellX - width in degrees/(cols-1)CellY - height in degrees/(rows-1)This is a small difference, but may account for the effect you are seeing.Steve

Share this post


Link to post
Share on other sites

Steve,Source data has got 257 x 257 data points. Whats baffling me is that keeping the same source data, and changing only the NW coordinate of the LOD11 cell to the LOD11 cell right above results in correct bgl generation.As I said, I'm using LOD calculator to compute the NW coordinate...Storm

Share this post


Link to post
Share on other sites

I get the same numbers with my spreadsheet. My guess is that it is a rounding off/precision problem somewhere. I don't know how many decimal places MS actually carries in its calculations. You might try increasing the CellX and CellY dimensions very slightly and see what happens. I'd start by adding 1 to the last significant digit Resample displays with your current inf. You may only need to change one of them. (Not a very satisfying approach, but it may confirm the nature of the problem.)

Share this post


Link to post
Share on other sites

I've been playing around with the numbers but to no avail...this is frustrating!!Storm

Share this post


Link to post
Share on other sites

Can any1 help out in the problem I encountered...this is really frustrating - 1 LOD11 cell compiles perfectly but the LOD11 cell just below this results in an invalid BGL being generated...Thanks to all,Storm

Share this post


Link to post
Share on other sites

After painstaking experimentation, I noticed that for the LOD11 cell which resulted in a correct BGL being generated, the BGL generation was invalid when I removed the last digit in the Lat coordinate so I figured out (as Steve correctly pointed out, cheers m8), that the problem lies in the number of decimal places the coordinates are represented in.What I did then is add a 5 to the Lat coordinate of the LOD11 cell which was giving wrong results in the first place and voila, the BGL compiled perfectly much to my delight!!!The terrain is visible in FS2002 so no problems there. Will keep you posted if I encounter other probs...till then,Cheerios,Storm

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