diff --git a/README.pdf b/README.pdf index 32e454217..7c61a5e39 100644 Binary files a/README.pdf and b/README.pdf differ diff --git a/add.sh b/add.sh index fd74ea66c..4a181b146 100755 --- a/add.sh +++ b/add.sh @@ -1,5 +1,5 @@ today=`date '+%Y/%m/%d %H:%M'`; -versionid="XP1150-$today"; +versionid="XP1200-$today"; versionline="fmcVersion=\"$versionid\""; echo $versionline >> plugins/xtlua/scripts/B747.05.xt.simconfig/version.lua pandoc -o README.pdf README.md diff --git a/plugins/xtlua/scripts/B747.05.xt.simconfig/version.lua b/plugins/xtlua/scripts/B747.05.xt.simconfig/version.lua index b2bea34ec..8a10e6778 100644 --- a/plugins/xtlua/scripts/B747.05.xt.simconfig/version.lua +++ b/plugins/xtlua/scripts/B747.05.xt.simconfig/version.lua @@ -150,3 +150,4 @@ fmcVersion="XP1150-2022/12/26 19:54" fmcVersion="XP1150-2022/12/27 01:48" fmcVersion="XP1150-2022/12/27 03:05" fmcVersion="XP1150-2022/12/27 20:56" +fmcVersion="XP1200-2022/12/28 02:12" diff --git a/plugins/xtlua/scripts/B747.19.xt.hydraulicsmodel/B747.19.xt.hydraulics_override.lua b/plugins/xtlua/scripts/B747.19.xt.hydraulicsmodel/B747.19.xt.hydraulics_override.lua index 2a44c9171..f6009f2c8 100644 --- a/plugins/xtlua/scripts/B747.19.xt.hydraulicsmodel/B747.19.xt.hydraulics_override.lua +++ b/plugins/xtlua/scripts/B747.19.xt.hydraulicsmodel/B747.19.xt.hydraulics_override.lua @@ -511,7 +511,7 @@ function ap_director_pitch(pitchMode) directorSampleRate=0.1 local rog=0.001+0.00003*math.abs(simDR_vvi_fpm_pilot-targetFPM) - if simDR_pressureAlt1>25000 then + if simDR_pressureAlt1>29000 then rog=0.0001+0.00001*math.abs(simDR_vvi_fpm_pilot-targetFPM) end if simDR_vvi_fpm_pilot>targetFPM and pitchError<1.5 then diff --git a/plugins/xtlua/scripts/B747.42.xt.EEC/B747.42.xt.EEC.lua b/plugins/xtlua/scripts/B747.42.xt.EEC/B747.42.xt.EEC.lua index 03cbce9c7..1c885d8d0 100644 --- a/plugins/xtlua/scripts/B747.42.xt.EEC/B747.42.xt.EEC.lua +++ b/plugins/xtlua/scripts/B747.42.xt.EEC/B747.42.xt.EEC.lua @@ -721,6 +721,7 @@ function B747_interpolate_value(current_value, target, min, max, speed)--speed i function round(x) return x>=0 and math.floor(x+0.5) or math.ceil(x-0.5) end +local spd_target_throttle=0.5 function ecc_spd() --print("---ECC SPD---") local input=1 @@ -729,6 +730,7 @@ function ecc_spd() simDR_override_throttles = 1 end local diffSpeed=2 + for i = 0, 3 do @@ -771,38 +773,65 @@ function ecc_spd() end end end + + +last_simDR_ind_airspeed_kts_pilot=0 +function spd_throttle() + + local input=simDR_ind_airspeed_kts_pilot + local target=simDR_autopilot_airspeed_kts + local speedError=math.abs(input-target) + local speed_delta=simDR_ind_airspeed_kts_pilot-last_simDR_ind_airspeed_kts_pilot + last_simDR_ind_airspeed_kts_pilot=simDR_ind_airspeed_kts_pilot + local rog=0.0001+0.0001*math.abs(input-target) + local min_speedDelta=0 + local max_speedDelta=0 + if speedError > 1 then + --if (simDR_autopilot_airspeed_kts< simDR_ind_airspeed_kts_pilot-1) then + max_speedDelta=0.001+speedError/500 + --else + -- max_speedDelta=0.001+speedError/25 + --end + min_speedDelta=max_speedDelta/5 + end + if ((target> input+0.5) and speed_delta-min_speedDelta + or (target> input+0.5) and speed_delta>min_speedDelta ) + then + if debug_flight_directors==1 then + print("-spd_target_throttle "..spd_target_throttle.." simDR_autopilot_airspeed_kts "..simDR_autopilot_airspeed_kts.." simDR_ind_airspeed_kts_pilot "..simDR_ind_airspeed_kts_pilot.." speed_delta "..speed_delta.." min_speedDelta "..min_speedDelta.." max_speedDelta "..max_speedDelta.." rog "..rog) + end + spd_target_throttle= (spd_target_throttle-rog) + end + if spd_target_throttle<0 then + spd_target_throttle=0 + elseif spd_target_throttle>1 then + spd_target_throttle=1 + end + print("THRO SPD rog="..rog.." min_speedDelta="..min_speedDelta.. " max_speedDelta="..max_speedDelta.. " speed_delta="..speed_delta .." spd_target_throttle="..spd_target_throttle) + --[[ ]]-- + for i = 0, 3 do + simDR_engn_thro[i]=B747_interpolate_value(simDR_engn_thro[i],spd_target_throttle,0,1.00,2) + end + +end function ecc_throttle() --print("---ECC Throttle---") local input=1 local target=1 - --B747DR_pidthrottleP=B747DR_pidthrottleHP - --idle - --[[if B747DR_ap_FMA_autothrottle_mode==2 and simDR_radarAlt1<40 then - input=simDR_ind_airspeed_kts_pilot - target=0 - --spd - else]]-- - throttlePid.ki=B747DR_pidthrottleI - - if B747DR_ap_FMA_autothrottle_mode==3 then - --[[if B747DR_engineType~=1 and - math.max(B747DR_display_EPR[0],B747DR_display_EPR[1],B747DR_display_EPR[2],B747DR_display_EPR[3])> - math.max(B747DR_display_EPR_max[0],B747DR_display_EPR_max[1],B747DR_display_EPR_max[2],B747DR_display_EPR_max[3]) - and simDR_ind_airspeed_kts_pilotcomputeRate then - throttlePid:compute() - --print("compute") - lastThrottleCompute=simDRTime - end + local rog=0.01 + if (target> input+1) then + spd_target_throttle= (spd_target_throttle+rog) + elseif target< input-1 then + spd_target_throttle= (spd_target_throttle-rog) + end + if spd_target_throttle<0 then + spd_target_throttle=0 + elseif spd_target_throttle>1 then + spd_target_throttle=1 + end + for i = 0, 3 do + simDR_engn_thro[i]=B747_interpolate_value(simDR_engn_thro[i],spd_target_throttle,0,1.00,2) + end - if throttlePid.output~=nil then - --local tValue=round(throttlePid.output*100)/100 - --print("throttle target="..target.. " current "..input.." AT retval "..throttlePid.output) - --print("AT retval simDR_ind_airspeed_kts_pilot "..input.." B747DR_ap_ias_bug_value "..target) - --if math.max(simDR_engn_thro[0],simDR_engn_thro[1],simDR_engn_thro[2],simDR_engn_thro[3])>0.9 then - - --[[if math.abs(input-target)<5 then - diffSpeed=diffSpeed+40 - --print("rate lim throttle") - end]] - --if diffSpeed<15 and B747DR_ap_FMA_autothrottle_mode==3 then diffSpeed=15 end - if diffSpeed<5 then diffSpeed=5 end - for i = 0, 3 do - simDR_engn_thro[i]=B747_interpolate_value(simDR_engn_thro[i],throttlePid.output,0,1.00,diffSpeed) - end - - end end local previous_altitude = 0 function throttle_management() @@ -1002,14 +1015,11 @@ function throttle_management() ecc_spd() if B747DR_ap_autothrottle_armed == 1 and B747DR_ap_FMA_autothrottle_mode > 1 then --not none or HOLD --new SPD - ecc_throttle() else --simDR_override_throttles = 0 - + spd_target_throttle=math.max(simDR_throttle_ratio[0],simDR_throttle_ratio[1],simDR_throttle_ratio[2],simDR_throttle_ratio[3]) B747DR_ref_line_magenta = 0 - - if B747DR_log_level >= 1 then print("---Setting Back to Normal---") end diff --git a/plugins/xtlua/scripts/B747.68.xt.fms/activepages/B744.fms.pages.vnav.lua b/plugins/xtlua/scripts/B747.68.xt.fms/activepages/B744.fms.pages.vnav.lua index e6b37b735..f03d91e4c 100644 --- a/plugins/xtlua/scripts/B747.68.xt.fms/activepages/B744.fms.pages.vnav.lua +++ b/plugins/xtlua/scripts/B747.68.xt.fms/activepages/B744.fms.pages.vnav.lua @@ -6,7 +6,7 @@ fmsJson = find_dataref("xtlua/fms") -- fmsJSON is nil simDR_vvi_fpm_pilot = find_dataref("sim/cockpit2/gauges/indicators/vvi_fpm_pilot") simDR_pressureAlt1 = find_dataref("sim/cockpit2/gauges/indicators/altitude_ft_pilot") simDR_eng_fuel_flow_kg_sec = find_dataref("sim/cockpit2/engine/indicators/fuel_flow_kg_sec") - +B747DR_ap_flightPhase = deferred_dataref("laminar/B747/autopilot/flightPhase", "number") -- the following were identifed as redundant dataref calls (April 2021) ---------------------------------------------------------------------------------------------- --simDR_groundspeed = find_dataref("sim/flightmodel/position/groundspeed") --meters per second @@ -156,10 +156,12 @@ fmsPages["VNAV"].getPage=function(self,pgNo,fmsID)--dynamic pages need to be thi VxSpeed = string.format(" %03d",ClbV2 + vxadj) - - + line1=" ECON CLB " + if B747DR_ap_flightPhase==1 then + line1=" ACT ECON CLB " + end return{ - " ACT ECON CLB ", + line1, " ", fmsModules["data"]["crzalt"].." "..spdalt, " ", @@ -309,9 +311,12 @@ fmsPages["VNAV"].getPage=function(self,pgNo,fmsID)--dynamic pages need to be thi --local utcNow = string.formt("%02f%02f",dt1hour,dt1.min) etafuel = string.format("%02d%02dz/ %03.1f",eta_h,eta_m,conv*fad/1000) - + line1=" ECON CRZ " + if B747DR_ap_flightPhase==2 then + line1=" ACT ECON CRZ " + end return{ - " ACT ECON CRZ ", + line1, " ", fmsModules["data"]["crzalt"].." "..fmsModules["data"]["stepalt"], " ", @@ -422,8 +427,12 @@ fmsPages["VNAV"].getPage=function(self,pgNo,fmsID)--dynamic pages need to be thi if nxtalt>0 then nextAltText=string.format("%3d",nxtspd).."/"..string.format("%5d",nxtalt) end + line1=" ECON DES " + if B747DR_ap_flightPhase==3 then + line1=" ACT ECON DES " + end return{ - " ACT ECON DES ", + line1, " ", --" **** ***** ***/****", " "..edaltText.." "..string.format("%5s",eodWpt).." "..nextAltText,