Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
local lib = {};
-- formula for Mexico uses Wingspan (flight_context) to find the unitRate, unitRate * distance
-- for an aircraft with Wingspan = 33m, the unitrate shall be 5.53
lib.distance_method = Distance_method.great_circle;
local unitRateFromWingspan =
{[16.7] = 0.25, [25] = 1.91 , [38]= 5.53 , [9999] = 8.26 }
for k,v in pairs(unitRateFromWingspan) do
if(k>flight_context.wingspan() and v<value) then
value = v
end
function lib:calculate(flight_context, route_context, distance)
return estimate;
end
function lib:estimate(flight_context, route_context, distance)
return self:unitRateFromWingspan() * distance;
end
return lib;
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more