1
0
Fork 0

[bucket_span] Align with SimGear implementation

This commit is contained in:
Scott Giese 2019-04-02 19:15:10 -05:00
parent e90d8a0593
commit 18f7e35c1d
2 changed files with 28 additions and 36 deletions

View file

@ -123,36 +123,32 @@ const string airspace_texture_path = "/usr/local/share/FlightGear/data/Textures/
// return the horizontal tile span factor based on latitude
double sg_bucket_span( double l ) {
if ( l >= 89.0 ) {
return 360.0;
} else if ( l >= 88.0 ) {
return 8.0;
} else if ( l >= 86.0 ) {
return 4.0;
} else if ( l >= 83.0 ) {
return 2.0;
} else if ( l >= 76.0 ) {
return 1.0;
} else if ( l >= 62.0 ) {
return 0.5;
} else if ( l >= 22.0 ) {
return 0.25;
} else if ( l >= -22.0 ) {
return 0.125;
} else if ( l >= -62.0 ) {
return 0.25;
} else if ( l >= -76.0 ) {
return 0.5;
} else if ( l >= -83.0 ) {
return 1.0;
} else if ( l >= -86.0 ) {
return 2.0;
} else if ( l >= -88.0 ) {
return 4.0;
} else if ( l >= -89.0 ) {
return 8.0;
if (l >= 89.0) {
return 12.0;
} else if (l >= 86.0) {
return 4.0;
} else if (l >= 83.0) {
return 2.0;
} else if (l >= 76.0) {
return 1.0;
} else if (l >= 62.0) {
return 0.5;
} else if (l >= 22.0) {
return 0.25;
} else if (l >= -22.0) {
return 0.125;
} else if (l >= -62.0) {
return 0.25;
} else if (l >= -76.0) {
return 0.5;
} else if (l >= -83.0) {
return 1.0;
} else if (l >= -86.0) {
return 2.0;
} else if (l >= -89.0) {
return 4.0;
} else {
return 360.0;
return 12.0;
}
}

View file

@ -30,9 +30,7 @@ my $DIRSEP = '/';
sub bucket_span {
my ($lat) = (@_);
if ($lat>= 89.0 ) {
return 360.0;
} elsif ($lat>= 88.0 ) {
return 8.0;
return 12.0;
} elsif ($lat>= 86.0 ) {
return 4.0;
} elsif ($lat>= 83.0 ) {
@ -53,12 +51,10 @@ sub bucket_span {
return 1.0;
} elsif ($lat>= -86.0 ) {
return 2.0;
} elsif ($lat>= -88.0 ) {
return 4.0;
} elsif ($lat>= -89.0 ) {
return 8.0;
return 4.0;
} else {
return 360.0;
return 12.0;
}
}