Hi,

In my scenery compression effort (which tries to ship the world scenery on a
single DVD) I've hit some minor snags. I know you guys are busy preparing
the "1.0" release, but nevertheless I would like to put this on the record
to be addressed later on:

I found a few zero length .btg.gz scenery files (in total about a dozen) on
the world DVDs #3 and #4. This would typically only affect users who fly in
Asia (Eastern hemisphere). I wonder if FlightGear will handle it gracefully
if it encounters a tile that it fails to load for this reason.

I found another slight discrepancy when converting back each tile's geodetic
center coordinate to a bucket - this function might be slightly buggy: In a
few cases it returns a different bucket number than given by the original
file name of the tile. I can work around this problem, but I wonder if other
parts of FlightGear might be affected by this bug.

Here's a snippet of code that illustrates how I load a .btg.gz file and used
to generate a bucket from it's geodetic center coordinate:

SGBinObject source;
bool result = source.read_bin(filename);
if (result == true)
{
    SGBucket bucket(SGGeod::fromCart(SGVec3<double>(source.get_gbs_center2
().sg())));

    // resulting bucket index does not always match up with the source
tile's file name.
    long index = bucket.gen_index();
}

Here is a few sample tiles that after loading return the index shown in the
right hand column.
So for example after loading 2097472.btg.gz from the scenery DVDs (or from
the terrasync mirrors)
and running it through above code snippet, the resulting bucket index will
be 2130240.

\DVD1\Terrain\w060s90\w052s85\2097472.btg.gz: 2097472 =-> 2130240
\DVD1\Terrain\w070n80\w068n84\1846160.btg.gz: 1846160 =-> 1878928
\DVD1\Terrain\w090s90\w090s86\1474832.btg.gz: 1474832 =-> 1507600

You might notice that all of these coordinates appear to be near extreme
North or South latitudes, so this may give a hint what triggers the bug.
Overall I would say this problem affects "only" a few thousand tiles out of
some 800,000 in total. Listing them all here would get me quickly kicked off
the list though ;)

Christian
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to