double speed_north_deg_sec;
double speed_east_deg_sec;
- double ft_per_deg_lon;
- double ft_per_deg_lat;
-
- // get size of a degree at this latitude
- ft_per_deg_lat = 366468.96 - 3717.12 * cos(pos.lat()/SG_RADIANS_TO_DEGREES);
- ft_per_deg_lon = 365228.16 * cos(pos.lat() / SG_RADIANS_TO_DEGREES);
// the two drag calculations below assume sea-level density,
// mass of 0.03 slugs, drag coeff of 0.295, frontal area of 0.007 ft2
double turn_circum_ft;
double speed_north_deg_sec;
double speed_east_deg_sec;
- double ft_per_deg_lon;
- double ft_per_deg_lat;
double dist_covered_ft;
double alpha;
- // get size of a degree at this latitude
- ft_per_deg_lat = 366468.96 - 3717.12 * cos(pos.lat()/SG_RADIANS_TO_DEGREES);
- ft_per_deg_lon = 365228.16 * cos(pos.lat() / SG_RADIANS_TO_DEGREES);
-
// adjust speed
double speed_diff = tgt_speed - speed;
if (fabs(speed_diff) > 0.1) {
FGAIThermal::dt = dt;
- double ft_per_deg_lon;
- double ft_per_deg_lat;
-
- // get size of a degree at this latitude
- ft_per_deg_lat = 366468.96 - 3717.12 * cos(pos.lat()/SG_RADIANS_TO_DEGREES);
- ft_per_deg_lon = 365228.16 * cos(pos.lat() / SG_RADIANS_TO_DEGREES);
-
- // double altitude_ft = altitude * SG_METER_TO_FEET;
-
//###########################//
// do calculations for range //
//###########################//
// calculate range to target in feet and nautical miles
double lat_range = fabs(pos.lat() - user_latitude) * ft_per_deg_lat;
double lon_range = fabs(pos.lon() - user_longitude) * ft_per_deg_lon;
- double range_ft = sqrt( lat_range*lat_range + lon_range*lon_range );
+ double range_ft = lat_range*lat_range + lon_range*lon_range;
range = range_ft / 6076.11549;
// Calculate speed of rising air if within range.