Sign in to follow this  
scott967

Flatten.bgl

Recommended Posts

Is there a programme I can use to create bgl files from flatten information (rather than have flatten lines in the scenery.cfg file), in the same way thatExcBuilder does for 'excludes'?Martin

Share this post


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

Excellent. Should have posted this before wasting time on my fruitless trawl through Google results! Many thanks George! Martin

Share this post


Link to post
Share on other sites

This works really well - created a new flatten bgl in a couple f minutes. Success first time (which always augurs well!).However, I have a lot of other flatten lines in my scenery.cfg: can I convert them to bgls using this programme without having to do it by slewing to each one in FS9? I can't see any way to enter my co-ordinates manually.Thanks again,Martin

Share this post


Link to post
Share on other sites

>> I can't see any way to enter my co-ordinates manually.Yes, just create an Area16 scasm file and can add your own lat/longs.George

Share this post


Link to post
Share on other sites

Hi again George, he says sheepishly.... I thought I'd have no problem with Scasm as I use it to recompile edited FS8 scenery files, but I haven't used file slike this before and am not getting anywhere. Can I ask for you help again please?This is an example flatten .sca file, which I made by importing co-ordinates from FS9:; SCASM file created by FSTflatten.exeCopyright(www.fs-traveler.com)Header ( 1 50.375558203233 50.3712368349913 155.635851391683 155.615009830355)LatRange ( 50.3712368349913 50.375558203233)Set ( areamx 64 )Area16N Elevation ( 0 50.3731369039227 155.615009830355 ;1 50.3712368349913 155.616968571908 ;2 50.3735775761794 155.635851391683 ;3 50.375558203233 155.634698781403 ;4 )END16Here is a manual flatten, from the scenery.cfg:Flatten.0=280.0,S05 55.60,E105 30.05,S05 55.71,E105 30.05,S05 55.78,E105 29.45,S05 55.60,E105 29.45Clearly, I have to convert minutes & seconds to decimals, but, if you have the time, could you possibly show me what the .sca file would look like for this flatten, so I can compare (and learn!)? Which figures go where, and what's in the header - I'm getting confused?!Thanks again,Martin

Share this post


Link to post
Share on other sites

Don't worry too much about this - I can see now that it would be quite a lot of work to answer the questions above: I have made a test flatten using the programme, and by comparing the sca file with my original co-ordinates I should be able to work out what is going on in and how to incorporate my own figures.Martin

Share this post


Link to post
Share on other sites

It's which figures go into the header section I'm not sure about - and in which order (esp. with minus numbers, for south). But there aren't that many combinations possible so I will surely work it out by trial and error if nothing else!M

Share this post


Link to post
Share on other sites

From the Scasm doc:Header( type [*] TopLat BottomLat RightLon LeftLon ) This command MUST be the first in your main scenery input file. It generates the BGL-file header which defines the boundaries of the area covered by your scenery file.* If the optional * character is entered the correct order of RightLon and LeftLon is not tested. You will need this option only if your scenery is crossing the date line (180th meridian). Normaly not used! type 1...4 this number has something to do with your FS5 *.VIS files. The following numbers are associated with: 1 visual scenery (sect 9), synth blocks (sect 1..6) FS98 AFD-BGL's 2 FS5.0 crop duster world, do not use it. 3 navaids as VOR, ILS, NDB, Markers 4 airport menu (FS5 style), ATIS LatRange( BottomLat TopLat ) This command has to follow the Header command. The FS5 scenery is organised in latitude bands and this instruction defines one of them. There can be several latitude bands in one scenery file (.BGL file) but SCASM can only handle one of it per source file. If your scenery covers a large north to south distance, lets say more than 2 to 3 degrees you have to use different source files for each latitude band.You then have the option to combine the resulting .BGL files with the help of SCLINK.The LatRange instruction is used for all BGL-sections except forground tiles (Seed's/sections 1 to 6),BGL libraries,RAW output,Section 19 data (Exclude & Exception) andnew facility BGL's (section 20).

Share this post


Link to post
Share on other sites

Well, I made a flatten.bgl manually using scasm - and to my disbelief it worked first time! It took me half an hour staring at the numbers - and there were only four co-ordinates! - but I dare say I'll speed up as I do more.So today I have created my own little airport from scratch (i.e. where there wasn't one before in FS), flattened the terrain with a bgl and edited the airport bgl to my liking. A little way off before I'm uploading my new photo-real London Heathrow to AVSIM, or whatever, but I feel quite pleased, I must say.It's a bit 'worrying' that these days I spent way much more time doimg this sort of thing than actually flying!Thanks for your helpful comments,Martin

Share this post


Link to post
Share on other sites

>It's a bit 'worrying' that these days I spent way much more>time doimg this sort of thing than actually flying!A warning - it is very addictive if you are not careful. I have forgotten how to fly and my sim has been stuck in Slew Mode for so long that it will need a sledge hammer to get it back out again :-)

Share this post


Link to post
Share on other sites

I'm beginning to understand that! Mind you, my earlier pride (for want of a better term) in what I'd done today has been seriously deflated by the fact that the flatten bgl files I've been trying to write for two hours now refuses to work at all! I can't even get fstutilities to flatten the area by 'drawing round it' either. Driving me nuts!!! If I don't get it to work by tomorrow I might post the four co-ordinates here along with my scasm and see if someone can tell me what's wrong.M.

Share this post


Link to post
Share on other sites

I am beginning to wish I'd never heard of flatten lines: I am about ready to scream. If any patient soul knows what might be going on here....None of my flatten bgls had any effect at all (I was sure I was creating them correctly) so, just as a test, I moved my plane half a kilometre or so away and just tried out a simple tetragonal flatten (by slewing the a/c), raising the land 100 metres or so. Restarted FS9. The mound was there (so the programme was working and I was doing things correctly) - but also all my previously 'dead' flattens suddenly showed up fine too. Things got even more confusing:...if I now delete the test bgl that just created that 100m hill, all of my other flattens disappear along with it. I checked my 'hill' sca file and it has four entries, none at all connected with the flatten bgls I have been trying to create!This sounds so unlikely, I can't help but think that my PC is playing jokes on me. I am ready to leave the flattens I have in the scenery.cfg and forget making bgl files out of them, I've wasted almost all day today on this. It is SO frustrating. If anyone can suggest why my coastal flattens only work when the test 'hill' flatten is also in the scenery folder, I'd be very glad to know!! I'll copy the 'hill' sca and one of my coastal flatten sca here - just in case it provides an obvious answer.Aaaaaagh! (Told you I was ready to scream).M.This bgl:Header ( 1 53.2442066412792 53.2417835016689 -4.54239447652554 -4.54684818258613)LatRange ( 53.2417835016689 53.2442066412792)Set ( areamx 64 )Area16N Elevation ( 0 53.2429891530762 -4.54239447652554 ;1 53.2442066412792 -4.54609733981385 ;2 53.2434757980921 -4.54684818258613 ;3 53.2417835016689 -4.54397043807177 ;4 )END16 only works if this one is also present (?!):Header ( 1 53.25108392451 53.2496258373138 -4.52408688248383 -4.52613793483067)LatRange ( 53.2496258373138 53.25108392451)Set ( areamx 64 )Area16N Elevation ( 12.19 53.2502363574564 -4.52432157422123 ;1 53.25108392451 -4.52408688248383 ;2 53.25108392451 -4.52613793483067 ;3 53.2496258373138 -4.52613793483067 ;4 )END16

Share this post


Link to post
Share on other sites

I would probably try using LWMPoly instead of Area16N. Sbuilder and/or Ground2k4 work well for this:Set( BUF 8192 )Header( 1 54 53 -4 -5 )LWMFileHeader:cell00LWMAreaDrawPoly( 1 2 9 17 )LWMPoly( 4 2 100 204 208 153 168 167 151 231 180 )LWMIndexList( 1 374 104 3 0 0 )LWMEndhttp://forums.avsim.net/user_files/150158.jpgscott s..

Share this post


Link to post
Share on other sites

Thanks. I'm getting into a slightly steeper learning curve than I anticipated here to be honest though! I solved this problem late last night (patched it up, really) by getting rid of my 'hill' and making another flatten bgl, inland as before but at the default terrain level, so it doesn't show. Again, without this extra 'blank' flatten bgl, all my other flattens at the coast are just cancelled out. Weird. I can't see how they are connected.Also, if I change the name of this blank bgl, like from temp.bgl to EGOV_flatten.bgl, all the flattens stop working again. I tried different names: EGOV.bgl it won't accept and the bgls don't work. x.bgl is OK and all the bgls work to flatten the terrain. This is very odd to me - I thought you could call these files what you wanted, and when you restarted FS the new file name was registered. Not so with this little ****** of a file. It has a mind of its own!!! (Which after all this is almost more than I can say for myself).M.

Share this post


Link to post
Share on other sites

That is a strange one alright. I've never had a file name problem. Does that also happen if you create a new scenery area with just the flatten in it?scott s..

Share this post


Link to post
Share on other sites

Not sure but I'll try out later. I have flatten lines swimming around in my brain now, like some kind of bad trip......I have been having problems also with fst flatten making bgl files that do nothing - in other words, when you restart FS9 there is no scenery library activity goes on and the terrain remains just as 'unflat' as it was before. The only common factor I can see in these instances is where (for some reason), I am making flattens on land, but FSNavigator shows the area to be just off the coast in the sea. (?! - I did recompile FSN last week)). When this happens and the flatten area (only according to FS Navigator, I repeat) is half in the sea half on land, I get these 'dead' bgl files. If I move further inland, then usually things are OK. Anyone get this too? I don't remember a 24-hour period in which I have seen so many odd things happening in FS9!!!BTW, I have twice noted that FSTFlatten.exe, although I don't have the programme open on my taskbar, shows up as running in Task manager - and is shown as using 95% of my CPU!! Has anyone else had this problem? A bug in the programme? It explains (I think?) why I kept getting those d****d "Flight Simulator has encuontered an error and must close..." messages; at least, now that I check Task manager and close FST Flatten if this is going on, I haven't had any more problems.M.

Share this post


Link to post
Share on other sites

There is no reason why you cannot have a flatten in the sea, I have used them under afcads with raised runways, however I don't do this any more.FSNav gets information from the default coastlines. If you are using add-on scenery, that may be using modified files.If the flatten is not effective, it is probably in an inactive scenery folder or the area has the wrong priority.George

Share this post


Link to post
Share on other sites

Hi George. I certainly use flattens in the sea, to correct the odd mound of water for instance, but I was just guessing that the discrepency I mentioned was causing the error. Probably not a very likely guess, I agree.Not aware of having any other add-ons for the area I was working in (Papua New Guinea!), FSGenesis mesh apart, so didn't think the priority would be an issue. You may well be right though..I've got another few airports to do/create in my current little project, then I am going to have a go at flying for a change! (Downloaded VOZ 2 yesterday lunchtime - with all this flattening and excluding, haven't had time even to look at it yet! First reports are some awful fps killers in it...).M.

Share this post


Link to post
Share on other sites

I hate to rain on a parade, but I think SBuilder's interface would solve all the hassles of having to manually hand-code ASM files to create a flattening polygon. In SBuilder, all you need to do is make a multi-sided polygon, and set its properties to a flattening mask and set its elevation. You can then change the dimensions and the polygonal layout by using SLEW mode in Flight Simulator to get the desired shape of the polygon, as well as its size.-Steve

Share this post


Link to post
Share on other sites

Steve,I think he is trying to replace the Flatten.n commands in the scenery.cfg. In this case he already has the coords of the rectangle.George

Share this post


Link to post
Share on other sites

In this case you can create the poly in sbuilder, and edit the lat/long for each point using your known values, although it is probably easier IMHO to load a map and append the default flatten file as the starting point.scott s..

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