1
0
Fork 0
flightgear/Bucket/testbucket.cxx
curt 91efc5ad87 Added a new "newbucket.[ch]xx" FGBucket class to replace the old
fgBUCKET struct and C routines.  This FGBucket class adjusts the tile
width towards the poles to ensure the tiles are at least 8 miles wide.
1999-02-08 23:52:13 +00:00

32 lines
610 B
C++

// test new bucket routines
#include "newbucket.cxx"
main() {
double lat = 21.9625;
double lon = -110.0 + 0.0625;
/*
while ( lon < 180 ) {
FGBucket b1( lon, lat );
long int index = b1.gen_index();
FGBucket b2( index );
cout << lon << "," << lat << " ";
cout << b2 << " " << b2.get_center_lon() << ","
<< b2.get_center_lat() << endl;
lon += 0.125;
}
*/
FGBucket b1;
for ( int j = 2; j >= -2; j-- ) {
for ( int i = -2; i < 3; i++ ) {
b1 = fgBucketOffset(lon, lat, i, j);
cout << "(" << i << "," << j << ")" << b1 << "\t";
}
cout << endl;
}
}