ZuluScript: Advanced Currency Example 1 Example: At Least 10 Hours as PIC or SIC in Rotorcraft in 90 Days
var tottime = 0.0;
var cat = getfieldstr("Category");
var role = getfieldstr("Crew Role");
var flttime = getfieldnum("Day Flight Time") +
getfieldnum("Night Flight Time");
if (strequal(cat, "Rotorcraft"))
{
if (strequal(role, "PIC") || strequal(role, "SIC"))
{
tottime = tottime + flttime;
if (tottime >= 10.0)
currency_ok = 1;
}
}
flttime. We check that the category of the aircraft
associated with the flight is "Rotorcraft" (this must match exactly with the
Category drop-down on the Aircraft Definition screen). If this check passes, we
then check that the flight's Crew Role is either PIC or SIC. If this check
also passes, we then accumulate flttime into tottime and
check the total value of tottime. If it's
at least 10.0, the currency is valid.