}
else if ( ( alt_frac>0.0 ) && (alt_frac<=0.1) ) { // ground layer
fac = ( 0.1*( pow( (10.0*alt_frac),10.0) ) );
}
else if ( ( alt_frac>0.0 ) && (alt_frac<=0.1) ) { // ground layer
fac = ( 0.1*( pow( (10.0*alt_frac),10.0) ) );
}
else if ( ( alt_frac>0.1 ) && (alt_frac<=1.0) ) { // main body of the thermal
fac = 0.4175 - 0.5825* ( cos ( PI* (1.0-sqrt(alt_frac) ) +PI) ) ;
}
else if ( ( alt_frac>0.1 ) && (alt_frac<=1.0) ) { // main body of the thermal
fac = 0.4175 - 0.5825* ( cos ( PI* (1.0-sqrt(alt_frac) ) +PI) ) ;
}
else if ( ( alt_frac >1.0 ) && (alt_frac < 1.1 ) ) { //above the ceiling, but not above the cloud
fac = (0.5 * ( 1.0 + cos ( PI*( (-2.0*alt_frac)*5.0 ) ) ) );
}
else if ( ( alt_frac >1.0 ) && (alt_frac < 1.1 ) ) { //above the ceiling, but not above the cloud
fac = (0.5 * ( 1.0 + cos ( PI*( (-2.0*alt_frac)*5.0 ) ) ) );
- if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(pos, 20000), alt, 0)){
+ if (getGroundElevationM(SGGeod::fromGeodM(pos, 20000), alt, 0)) {