Page 9 sur 13

Re: Problème installation Air manager en déporté

MessagePosté: Lun 27 Nov 2017 14:37
de JacquesZ
Tu as raison Fab: sur mon portable, sur le lit en fait... ecroulerire

Et quand je dis vite fait, ça m’a pris 2 heures environ, le code était déjà là à 80%.
A part les graphismes, le plus long a été la fonction « test », pas facile, puisque l’aiguille doit se déplacer et revenir à son ancienne altitude, en tournant au plus court....

Jacques

Re: Problème installation Air manager en déporté

MessagePosté: Lun 27 Nov 2017 19:35
de fab
Ah bon, quand même 2 heures sourirebis

Re: Problème installation Air manager en déporté

MessagePosté: Lun 27 Nov 2017 19:50
de tabar57
Oui mais c'était au lit Fab il était peut être entrecoupé par quelques menus plaisirs ecroulerire ecroulerire

Cordialement

Bernard

Re: Problème installation Air manager en déporté

MessagePosté: Mar 28 Nov 2017 00:25
de fab
C'est comme cela qu'il a eu l'idée des "aiguilles qui tremblotent" ecroulerire applaublanc

Re: Problème installation Air manager en déporté

MessagePosté: Mar 28 Nov 2017 00:27
de tabar57
T'es un malade ecroulerire , moi ce serait plutôt en buvant un petit jaune

Bernard

Re: Problème installation Air manager en déporté

MessagePosté: Mar 28 Nov 2017 10:43
de algue14
Ouais pour faire l' E A D I au lit
il a eu besoin d' A I D E ecroulerire

Re: Problème installation Air manager en déporté

MessagePosté: Mar 28 Nov 2017 10:50
de JacquesZ
Ouais, ben pendant qu'il y en a qui spéculent sur mes prouesses au lit ecroulerire , je continue mon travail cosmétique sur l'EADI84

J'ai implémenté une séquence de démarrage "réaliste" (en l'absence de vidéo du fonctionnement de l'EADI réel, et le Be90 de l'école étant équipé analogique), à savoir un allumage progressif de l'écran CRT, basé sur le MASTER (Battery, car je doute que ce soit couplé à l'Avionics MASTER).

Bref, l'écran s'allume progressivement quand le MASTER est sur ON, et s'éteint quand le MASTER est sur OFF.

Pas testé avec P3D, si tu peux me confirmer si ça fonctionne.

Les durées des séquences de démarrage sont au tout début du code en millisecondes, à ajuster selon les goûts.

il faut remplacer le code (faire un clone de l'instrument par sécurité) par celui-ci:
Code: Tout sélectionner
---------------------------------------------
-- Collins Rockwell EFIS 84 EADI --

-- Version 1.30 11/2017 JZ FSX translation in progress
---------------------------------------------
-- CUSTOMIZATION SECTION
---------------------------------------------
start_duration=500  -- durée en millisecondes de la séquence de démarrage
start_duration1=2000  -- durée en millisecondes de la séquence de démarrage
start_duration2=4000  -- durée en millisecondes de la séquence de démarrage
start_duration3=4000  -- durée en millisecondes de la séquence de démarrage
start_duration4=5000  -- durée en millisecondes de la séquence de démarrage

---------------------------------------------

-- Load and display images --
---------------------------------------------
img_horizon1 = img_add("Horizon1.png", 0, 0, 1200, 1800)
img_horizon = img_add("Horizon.png", 0, 0, 600, 900)
img_pitchAtt = img_add("Pitch_Attitude.png", 0, 0, 600, 900)
--img_hViewport = img_add("viewport.png", -150, -150, 900, 900)
img_skypoint = img_add_fullscreen("Skypointer.png")

img_rollAtt = img_add_fullscreen("Roll_Attitude.png")
img_fltDir = img_add_fullscreen("Director.png")

img_add_fullscreen("Aircraft_Bars.png")


img_pitch_up = img_add_fullscreen("Pitch_Up.png")
img_pitch_down = img_add_fullscreen("Pitch_Down.png")

img_om = img_add_fullscreen("OM.png")
img_mm = img_add_fullscreen("MM.png")
img_cdi = img_add("CDI.png", 0, -150, 600, 900)
img_glidepath = img_add("Glidepath.png", 0, -150, 600, 900)
img_GSvertpath = img_add("GSvertpath.png", 0, 0, 600, 900)
img_LLZhorpath = img_add("LLZhorpath.png", 0, -150, 600, 900)



txt_radio_minima = txt_add(" ", "-fx-font-family: arial; -fx-font-size:17px; -fx-fill: cyan; -fx-font-weight:normal; -fx-text-alignment: LEFT;", 460, 500, 200, 200)
txt_dh = txt_add(" ", "-fx-font-family: arial; -fx-font-size:25px; -fx-fill: yellow; -fx-font-weight:normal; -fx-text-alignment: LEFT;", 180, 235, 200, 200)
--visible(txt_radio_minima, false)
blink = true

txt_active_lateral = txt_add(" ", "-fx-font-family: arial; -fx-font-size:17px; -fx-fill: lightgreen; -fx-font-weight:normal; -fx-text-alignment: RIGHT;", 65, 65, 200, 200)
txt_active_vertical = txt_add(" ", "-fx-font-family: arial; -fx-font-size:17px; -fx-fill: lightgreen; -fx-font-weight:normal; -fx-text-alignment: LEFT;", 330, 65, 200, 200)
txt_second_arm_vertical = txt_add(" ", "-fx-font-family: arial; -fx-font-size:17px; -fx-fill: white; -fx-font-weight:normal; -fx-text-alignment: LEFT;", 450, 80, 200, 200)
txt_autopilot = txt_add(" ", "-fx-font-family: arial; -fx-font-size:17px; -fx-fill: white; -fx-font-weight:normal; -fx-text-alignment: LEFT;", 90, 95, 200, 200)
txt_yawdamper = txt_add(" ", "-fx-font-family: arial; -fx-font-size:17px; -fx-fill: white; -fx-font-weight:normal; -fx-text-alignment: LEFT;", 90, 110, 200, 200)
txt_add("DH", "-fx-font-size:17px; -fx-font-family:Arial; -fx-fill: cyan; -fx-font-weight:normal; -fx-text-alignment:left;", 425, 500, 150, 100)
txt_radio_height = txt_add(" ", "-fx-font-family: arial; -fx-font-size:30px; -fx-fill: cyan; -fx-font-weight:normal; -fx-text-alignment: LEFT;", 458, 470, 200, 200)
img_off10=img_add_fullscreen("panel_black10.png")
img_off20=img_add_fullscreen("panel_black20.png")
img_off30=img_add_fullscreen("panel_black30.png")
img_off50=img_add_fullscreen("panel_black50.png")
img_off70=img_add_fullscreen("panel_black70.png")
img_off=img_add_fullscreen("panel_black.png")
img_add_fullscreen("CRT_border.png")



---------------
-- Functions --
---------------

function new_attitude(roll, pitch, dRoll, dPitch, dMode)

-- Roll outer ring and background
-- roll = var_cap(roll, -90, 90)

-- Roll horizon
img_rotate(img_horizon1 , roll * -1)
img_rotate(img_horizon , roll * -1)
img_rotate(img_pitchAtt, roll * -1)
--img_rotate(img_hViewport, roll * -1)
img_rotate(img_skypoint, roll * -1)

-- Move horizon pitch
pitch = var_cap(pitch, -90, 90)
radial = math.rad(roll * -1)
x = -(math.sin(radial) * pitch * 5) --3
y = (math.cos(radial) * pitch * 5)
img_move(img_horizon1, -300, y-600, nil, nil)
img_move(img_horizon, x, y-150, nil, nil)
img_move(img_pitchAtt, x, y-150, nil, nil)
viewport_rect(img_pitchAtt, 200, 225, 200, 150)
--img_move(img_hViewport, x-150, y-150, nil, nil)

-- Pull up//Pitch down arrows
img_rotate(img_pitch_down, roll * -1)
img_rotate(img_pitch_up, roll * -1)

if pitch >= 30 then
   visible(img_pitch_down, true)
else
   visible(img_pitch_down, false)
end

if pitch <= -20 then
   visible(img_pitch_up, true)
else
   visible(img_pitch_up, false)
end

-- Move director
dPitch = var_cap(dPitch, -90, 90)
dRadial = math.rad(dRoll * -1)
dX = (math.sin(dRadial) * (dPitch - pitch) * 5)
dY = (math.cos(dRadial) * (pitch - dPitch) * 5)
img_rotate(img_fltDir, (dRoll * 1) - roll)
img_move(img_fltDir, nil, dY, nil, nil)

-- Director Mode
if dMode == 0 then
   visible(img_fltDir, false)
else
   visible(img_fltDir, true)
end
end

function new_attitude_fsx(roll, pitch,FDRoll,FDPitch,FDmode)
fd_mode=fif(FDmode,1,0)
new_attitude(roll * -57, pitch * -37,FDRoll,FDPitch,fd_mode)
end

function new_marker_beacons(outer_marker, middle_marker, inner_marker)
visible(img_om, false)
visible(img_mm, false)
if outer_marker == 1 then
   visible(img_om, true)
   visible(img_mm, false)
else
   visible(img_om, false)
end

if middle_marker == 1 then
   visible(img_mm, true)
   visible(img_om, false)

else
   visible(img_mm, false)
end
if inner_marker == 1 then
   visible(img_mm, true)
   visible(img_om, false)

else
   visible(img_mm, false)
end

end

function new_marker_beacons_fsx(om, mm, im)
outer_marker=fif(om,1,0)
middle_marker=fif(mm,1,0)
inner_marker=fif(im,1,0)
new_marker_beacons(outer_marker, middle_marker, inner_marker)
end
function timer_blink()

blink = not blink

end



timer = timer_start(0, 100, timer_blink)



function new_radio_height(radalt, radio_minima)

txt_set(txt_radio_minima, radio_minima)

--DH annunciation

if ((radalt - radio_minima) <= 0) then
   txt_set(txt_dh, "DH")
   visible(txt_dh, true)

else
   visible(txt_dh, false)
end



if ((radalt - radio_minima) <= 50) then

visible(txt_radio_height, blink)
radalt = var_round(radalt,-1)

end

if ((radalt - radio_minima) > 50 and (radalt - radio_minima) < 2500) then

visible(txt_radio_minima, true)
radalt = var_round(radalt,-2)

end

if radalt > 2500 then

visible(txt_radio_height, false)

else

--visible(txt_radio_height, true)

end

txt_set(txt_radio_height, radalt)

end

function new_radio_height_fsx(radalt, radio_minima)
new_radio_height(radalt, radio_minima)
end

function lateral_mode(hsi_mode, hdg_mode, nav_mode, fd_mode, yd_mode)


--visible(txt_active_lateral, false)

if hdg_mode == 0 and nav_mode == 0 then

visible(txt_active_lateral, false)

end

if hdg_mode == 2 then
txt_set(txt_active_lateral, "HDG")
visible(txt_active_lateral, true)

end

if nav_mode == 2 and hsi_mode == 0 then
txt_set(txt_active_lateral, "NAV1")
visible(txt_active_lateral, true)

end

if nav_mode == 2 and hsi_mode == 1 then
txt_set(txt_active_lateral, "NAV2")
visible(txt_active_lateral, true)

end

if nav_mode == 2 and hsi_mode == 2 then

txt_set(txt_active_lateral, "GPS")
visible(txt_active_lateral, true)

end

if fd_mode == 0 then
visible(txt_active_vertical, false)

end

if fd_mode == 0 or 1 then
visible(txt_autopilot, false)
end

if fd_mode == 2 then
txt_set(txt_autopilot, "AP")
visible(txt_autopilot, true)

end

if yd_mode == 0 then
visible(txt_yawdamper, false)
end

if yd_mode == 1 then
txt_set(txt_yawdamper, "YD")
visible(txt_yawdamper, true)

end

end

function vertical_mode(gs_mode, alt_mode, vs_mode, ias_mode, ga_mode, pitch_mode)

if gs_mode and alt_mode and vs_mode and ias_mode and ga_mode and pitch_mode == 0 then

   visible(txt_active_vertical, false)
end

if alt_mode == 1 then
   txt_set(txt_second_arm_vertical, "ALT ARM")
   visible(txt_second_arm_vertical, true)
else
   visible(txt_second_arm_vertical, false)
end

if gs_mode == 2 then
   txt_set(txt_active_vertical, "GS")
   visible(txt_active_vertical, true)

elseif alt_mode == 2 then
   txt_set(txt_active_vertical, "ALT")
   visible(txt_active_vertical, true)
elseif vs_mode == 2 then
   txt_set(txt_active_vertical, "VS")
   visible(txt_active_vertical, true)
elseif ias_mode == 2 then
   txt_set(txt_active_vertical, "IAS")
   visible(txt_active_vertical, true)
elseif ga_mode == 2 then
   txt_set(txt_active_vertical, "GA")
   visible(txt_active_vertical, true)
elseif pitch_mode == 2 then
   txt_set(txt_active_vertical, "PTCH")
   visible(txt_active_vertical, true)
else
   visible(txt_active_vertical, false)

   end
end

function vertHorPath(gFlag, glideFlagMove, vFlag, cdiFlagMove)

if gFlag == 1 then
   img_visible(img_GSvertpath, true)
   gY = (glideFlagMove * 28) - 150
   img_move(img_GSvertpath, nil, gY, nil, nil)
end

if gFlag == 0 then
   img_visible(img_GSvertpath, false)
end

if vFlag == 1 then

   img_visible(img_LLZhorpath, true)
   gX = cdiFlagMove * 51--41
   img_move(img_LLZhorpath, gX, nil, nil, nil)
else
   img_visible(img_LLZhorpath, false)

end

end


function vertHorPath_fsx(has_glide, vertical, has_nav, horizontal)

   glideslopeFlag = fif(has_glide, 1, 0)   --from FSX boolean to integer (Xplane style)
   locFlag=fif(has_nav,1,0)
   verticaldev = 4 / 119 * vertical -- GS range from -119 to + 119 in FSX
   horizontaldev = 4 / 127 * horizontal -- CDI range from -127 to + 127 in FSX
    -- print(glideslopeFlag)
   -- print(verticaldev)
   -- print(locFlag)
   -- print(horizontaldev)
   vertHorPath(glideslopeFlag,verticaldev,locFlag,horizontaldev)

end   
--ILS
-- gbl_station_is_ils = nav_has_signal and nav_has_localizer
-- if gbl_station_is_ils then
-- visible(img_CDI, true)
-- visible(img_LLZhorpath, true)
-- visible(img_GSvertpath, true)
-- if gbl_nav_has_glideslope then
-- visible(img_GSvertpath, true)
-- visible(img_Glidepath, true)
-- else
-- visible(img_GSvertpath, false)
-- visible(img_Glidepath, false
-- end
-- else -- station is a VOR
-- visible(img_CDI, false)
-- visible(img_LLZhorpath, false)
-- visible(img_GSvertpath, false)
-- visible(img_Glidepath, false)

-- if gbl_station_is_ils then
-- localizer = localizer * 70/127 + localizer_zero -- localizer
-- move(img_localizer,localizer,nil,nil,nil)
-- if gbl_nav_has_glideslope then -- glideslope
-- glideslope = glideslope *70/119 + glideslope_zero
-- move(img_glideslope,nil,glideslope,nil,nil)
-- move(txt_glideslope,nil,glideslope + 2,nil,nil)
-- end
--end


function timer_callback5()
visible(img_off10,false)
visible(img_off20,false)
visible(img_off30,false)
visible(img_off50,false)
visible(img_off70,false)
visible(img_off,false)
end

function timer_callback4()
visible(img_off10,true)
visible(img_off20,false)
timer5=timer_start(start_duration4,nil,timer_callback5)
end

function timer_callback3()
visible(img_off20,true)
visible(img_off30,false)
timer4=timer_start(start_duration3,nil,timer_callback4)
end

function timer_callback2()
visible(img_off30,true)
visible(img_off50,false)
timer3=timer_start(start_duration2,nil,timer_callback3)
end

function timer_callback1()
visible(img_off50,true)
visible(img_off70,false)
timer2=timer_start(start_duration1,nil,timer_callback2)
end

function start()
visible(img_off70,true)
visible(img_off,false)
timer1=timer_start(start_duration,nil,timer_callback1)
end

function startup(master_battery)
if master_battery==false then
   visible(img_off,true)
   timer_stop(timer0)
   timer_stop(timer1)
   timer_stop(timer2)
   timer_stop(timer3)
   timer_stop(timer4)
   timer_stop(timer5)
   else
   timer0=timer_start(start_duration,nil,start)
   end
end







-------------------
-- Bus subscribe --
-------------------
xpl_dataref_subscribe("sim/cockpit2/gauges/indicators/roll_AHARS_deg_pilot", "FLOAT",
"sim/cockpit2/gauges/indicators/pitch_AHARS_deg_pilot", "FLOAT",
"sim/cockpit2/autopilot/flight_director_roll_deg", "FLOAT",
"sim/cockpit2/autopilot/flight_director_pitch_deg", "FLOAT",
"sim/cockpit2/autopilot/flight_director_mode", "INT", new_attitude)

fsx_variable_subscribe("ATTITUDE INDICATOR BANK DEGREES", "Radians",
"ATTITUDE INDICATOR PITCH DEGREES", "Radians",
"AUTOPILOT FLIGHT DIRECTOR BANK","Radians",
"AUTOPILOT FLIGHT DIRECTOR PITCH","Radians",
"AUTOPILOT FLIGHT DIRECTOR ACTIVE","Boolean",new_attitude_fsx)


xpl_dataref_subscribe("sim/cockpit2/radios/indicators/outer_marker_lit", "INT",
"sim/cockpit2/radios/indicators/middle_marker_lit", "INT",
"sim/cockpit2/radios/indicators/inner_marker_lit", "INT", new_marker_beacons)

fsx_variable_subscribe("OUTER MARKER","Boolean",
"MIDDLE MARKER","Boolean",
"INNER MARKER","Boolean",new_marker_beacons_fsx)

xpl_dataref_subscribe("sim/cockpit2/gauges/indicators/radio_altimeter_height_ft_pilot", "FLOAT",
"sim/cockpit/misc/radio_altimeter_minimum", "FLOAT", new_radio_height)

fsx_variable_subscribe("RADIO HEIGHT", "FEET",
"DECISION HEIGHT", "FEET", new_radio_height_fsx)

xpl_dataref_subscribe("sim/cockpit2/radios/actuators/HSI_source_select_pilot", "INT", -- 0 = nav1, 1 = nav2, 2 = GNSS
"sim/cockpit2/autopilot/heading_status", "INT", -- Autopilot Heading Status. 0=off,1=armed,2=captured
"sim/cockpit2/autopilot/nav_status", "INT", -- Autopilot Nav status
"sim/cockpit/autopilot/autopilot_mode", "INT", -- The autopilot master mode (off=0, flight director=1, on=2)
"sim/cockpit/switches/yaw_damper_on", "INT",
lateral_mode)

xpl_dataref_subscribe("sim/cockpit2/autopilot/glideslope_status", "INT",
"sim/cockpit2/autopilot/altitude_hold_status", "INT",
"sim/cockpit2/autopilot/vvi_status", "INT",
"sim/cockpit2/autopilot/speed_status", "INT",
"sim/cockpit2/autopilot/TOGA_status", "INT",
"sim/cockpit2/autopilot/pitch_status", "INT",
vertical_mode)

xpl_dataref_subscribe("sim/cockpit/radios/indicators/hsi_display_vertical_pilot", "INT",
--"sim/cockpit2/radios/indicators/hsi_flag_glideslope_pilot", "INT",
"sim/cockpit2/radios/indicators/hsi_vdef_dots_pilot", "FLOAT",
"sim/cockpit2/radios/indicators/hsi_display_horizontal_pilot", "INT",
"sim/cockpit2/radios/indicators/hsi_hdef_dots_pilot", "FLOAT",
vertHorPath)

fsx_variable_subscribe("HSI GSI NEEDLE VALID", "Boolean",
"NAV GSI:1", "Number",
"HSI CDI NEEDLE VALID", "Boolean",
"NAV CDI:1", "Number", vertHorPath_fsx)

--"NAV HAS NAV:1", "Boolean",

fsx_variable_subscribe("ELECTRICAL MASTER BATTERY", "Boolean",
 startup)


et copier les images suivantes dans le dossier "resource" de la jauge.
panel_black.zip
(2.93 Kio) Téléchargé 266 fois


Jacques

Re: Problème installation Air manager en déporté

MessagePosté: Mar 28 Nov 2017 11:54
de tabar57
Merci Jacques

C'est dans la boite, j'installe et je teste cet aprem et je te dis merci affiche

Cordialement

Bernard

Re: Problème installation Air manager en déporté

MessagePosté: Mar 28 Nov 2017 16:25
de JacquesZ
Bon ne te presses pas, je viens de tomber sur une vidéo de démarrage du B200 équipé Collins, le démarrage n’est pas comme ça du tout(je m’en doutais un peu quand même).
1- l’instrument s’allume une fois les moteurs démarrés visiblement avec un switch sur le pedestal, probablement au panneau de commande, donc au pire c’est le Master Avionics
2- dès l’allumage quelques symboles (moustache, échelle LOC) s’affichent sur fond noir avec des Flags rouge, l’horizon en couleur apparaît après une quinzaine de secondes seulement, une fois l’autotest Terminé j’imagine. Malheureusement je ne peux lire les flags en question, sans la doc on est vite limité.

Retour à l’atelier pour la jauge, je te tiens au courant.

Jacques

Re: Problème installation Air manager en déporté

MessagePosté: Mar 28 Nov 2017 16:49
de tabar57
Oui, effectivement j'avais vu çà sur des vidéos de Marcello Trentini sur Youtube consacrées au démarrage de l'avion.
Je pense aussi que c'est l'inter avionic qui déclenche l'allumage ou un inter EFIS power sur le pédestal.
On a le temps, cool et merci affiche
Compte rendu de l'essai du nouveau code: Ouah ...
En clair:
déviation latérale et verticale sur iLS - ça marche, il semble qu'il y ait une symbolique verte et ronde pour VOR à la place du trapèze mais on verra plus tard.
Affichage OM pas de problème, par contre le Middle ne s'affiche pas mais je suis passé peut être trop vite dessus, pourtant mon voyant sur TdB s'est allumé.
Affichage de l'altitude radar et DH quand je suis en dessous de la dh, nickel

Je viens de creuser l'histoire du réglage de la DH et c'est réglé chouettedoights , j'envoie une commande 66321 ou 66322 par un encodeur et çà marche.
Je vais donc pouvoir utiliser cette fonction depuis la vraie platine Collins que je possède



En tout cas c'est déjà vachement bien applaublanc , trop content j'attaque le cache demain


A+

Bernard