Aide - Recherche - Membres - Calendrier
Version complète : MFCD for FC3 pas mal !
3rd-Wing · Escadre virtuelle DCS > DCS (& LockOn) > 3rd Wing devs' zone
Postal2
Yop je suis tombé la dessus et apparement c'est pas mal du tout !


Sa se passe par là ! .



MFCD for FC3 - v1.0


Image IPB



Description

To run the program a JRE 8 is required. Download it here.

This software integrated via export.lua in DCS World. It is dependant on which data is exportable for which aircraft, either case. To use it, just run it once before DCS World, and then launch the simulator afterwards. This is needed (only the first time) BEFORE DCS because the program will insert its lua script.

To quit the program, press F12. A contextual menu (right click) is available in the black screen.

The software can also be launched with custom parameters, the launch bat contains an example too:

-noborders:
-useMFD(X): where (X) is the index of the TrustmasterMFCD to use, ex. -useMFD1 or -useMFD2
-xy1920,610: coordinates where to place it at startup
-s512: size in pixel of the screen square (buttons excluded)
To change the paramters just look into the launch batch file (MFCD_FC3.bar)

Page: NAV

Image IPB

Image IPB


The green triangle in the center is yor aircraft.
The white dashed line points to your current object (waypoint or landing).
The three green circles represent the bullseye. A dashed green line always points there.
Waypoints are connected with a green line (you must cycle all the waypoints in order for them to appear).
Yellow squares represent mark points that you can create in the next pages.
Page: WPT
Image IPB

note: OSBs are numbered clockwise from the upper left one.

note: coordinates are degree and minutes decimal for imperial, and degreed, minutes, seconds for metric.

OSB 6: Sets the bullseye to the current waypoint.
OSB 7: Creates an offset (mark point) FROM the bullseye.
OSB 8: Creates an offset (mark point) from the current waypoint.
OSB 9: Creates a mark point given the L/L coordinates.
OSB 20: Displays current waypoint number.
OSB 18: Displays bearing and range TO the current waypoint.
OSB 18: Displays current waypoint Latitude.
OSB 17: Displays current waypoint Longitude.
OSB 16: Displays current waypoint Altitude.
Page: POS
Image IPB

note: OSBs are numbered clockwise from the upper left one.

note: coordinates are degree and minutes decimal for imperial, and degreed, minutes, seconds for metric.

OSB 6: Bullseye bearing and range TO. Clicking here will change the bullssye position by coordinates.
OSB 7: Make a mark point in the current position.
OSB 8: Heading of the aircraft.
OSB 9: Bank of the aircraft.
OSB 10: Pitch of the aircraft.
OSB 20: Bullseye Latitude.
OSB 19: Bullseye Longitude.
OSB 18: Current Latitude.
OSB 17: Current Longitude.
OSB 16: Current Altitude (rotary to switch radar/barometric).
Page: ENG

Image IPB
This page displays the engine throttle RPMs, temperature, total fuel and fuel consumption.

Page: STG

Image IPB

note: OSBs are numbered clockwise from the upper left one.

OSB 20: resets the navigation info, waypoints and markpoints. Bullseye remains unchanged.
OSB 18: Change the bullseye giving coordinates.
OSB 19: Changes the way bullseye is displayed in the MAP, from/to bearing.
OSB 10: Rotary switching for imperial or metric system.


Peut être pas mal en complément hélios et avec des fonctions comme le T-link .
lamule
très sympa thumbsup.gif

une copie plus poussée que LEAVU sur FC2 mais adapté à FC3.

en cours de test
Postal2
Yop j'ai tester rapidement c'est pas mal !

Je pense qu'il faudrait un condensé comme le ''katze pit'' ou encore le Tlink .


Sinon je n'arrive pas à avoir les export il fonctionne mais en mode ''No connection'' .
Harke
postal essai ça, edit ton fichier Network.lua qui se trouve dans C:\Users\%user%\Saved Games\DCS\Config

et change la ligne : allow_object_export = False, en allow_object_export = true,

(ça doit être fait au moins par celui qui héberge)

a par ça je ne vois pas ce qui peu l’empêcher de tourner en multi
gillesdrone
CITATION(Harke @ 7 May 2014, 10:03) *

postal essai ça, edit ton fichier Network.lua qui se trouve dans C:\Users\%user%\Saved Games\DCS\Config

et change la ligne : allow_object_export = False, en allow_object_export = true,

(ça doit être fait au moins par celui qui héberge)

a par ça je ne vois pas ce qui peu l’empêcher de tourner en multi



c'est Network.cfg et non Network.lua wink.gif
Postal2
Oki merki je testerai ça tout à l'heure .
Boulling
CITATION(Harke @ 7 May 2014, 10:03) *

postal essai ça, edit ton fichier Network.lua qui se trouve dans C:\Users\%user%\Saved Games\DCS\Config

et change la ligne : allow_object_export = False, en allow_object_export = true,



Pour ma part, le tips ne fonctionne pas. DCS change la variable en false à chaque démarrage. Comment le programme récupère les infos?
EDIT:Correction la variable ne change plus mais toujours pas de connexion.
Harke
moi testé et fonctionnel... je rapelle que ce doit être le serveur qui doit avoir ce paramètre (ou soit même si on héberge), si tu vas sur un serveur publique qui a laisser en "false", ça ne marchera pas !


et merci gille pour la correction, effectivement, c'est un .cfg biggrin.gif
lamule
Si le dossier Scripts n'est pas créé le soft n installera pas ces fichiers d'export
Cougar
Très sympa en effet , je l'utilise pour l'affichage de mon MFD droit sur mon homecockpit .

par contre , est ce que quelqu'un a réussi a redimensionner le MFD ? impossible de faire changer la taille pour lui faire remplir tout mon écran :X

lamule
oui on a réussit Cougar.

tu clic droit sur le fichier.bat MFC_FC3 dans ton dossier MFCD_FC3 avec notepad ++

tu auras ceci :

@echo off
rem set JAVA_HOME=jre8
rem set PATH=%PATH%;%JAVA_HOME%\bin
rem start javaw -Djava.library.path=lib -jar lib/MFC_FC3.jar -noborders -useMFD1 -useMFD2 -xy1920,610 -s512

ceux sont des lignes d'exemple. pour ton cas faut te concentrer sur la dernière. tu réécrits la ligne complète sans rem.

le code xy indique la position d'apparition de la fenêtre java, et juste après le "s512" correspond à la taille de la fenêtre

en gros sa donne çà en francais

start javaw -Djava.library.path=lib -jar lib/MFC_FC3.jar -"pas de bordures" -"j'utilise le MFD1" -"j'utilise le MFD2" -xy"position dans l'écran" -s"taille de la fenêtre"

pour la position n'oublie pas la virgule entre les 2 valeurs

j'espère pouvoir t'aider thumbsup.gif
Cougar
blink.gif

Mmmhh ok , alors de mon côté j'ai modifié seulement la valeur -s , l'écran de départ m'importe peu .

quelquesoit la valeur , la taille ne varie pas , j'ai du louper quelquechose .
Harke
la ligne en question est en remarque (REM devant) elle n'est donc pas excecutée, tu prend la partie qui t'interesse a savoir le -s512, tu l'ajoute sur la ligne qui n'est pas en remarque en bas, et tu met ta valeur
Cougar
ok , ça fonctionne , par contre ça ne me prend pas toute la hauteur de mon mfd sad.gif

j'ai tenté de mettre 768,1024 , mais ce n'est pas passé
Boulling
Hello tout le monde!

Je laisse la solution à mon problème, qui doit être rare, mais quand même au cas où...

Le problème de "no connection" que j'avais était dû au fait que j'ai déplacé mon dossier "Parties enregistrées" sur une autre partition. Le logiciel ne trouve donc pas le bon répertoire et ne fait pas les modifications voulues. crash.gif
C'est pas grave, on va faire le taf!


Prérequis: il est fortement conseillé d'utiliser un éditeur de texte type Notepad++
http://www.clubic.com/telecharger-fiche9567-notepad.html
et de faire une sauvegarde de chaque fichier avant modification.

Ready? Go!

Aller dans le répertoire "Parties enregistrées" de votre compte utilisateur puis dans le répertoire "DCS".

Si un dossier "Scripts" n'existe pas, le créer.

Dans le dossier "Scripts", créer un fichier "Export.lua" et y copier ceci:

CODE


-- SOCKETS
package.path = package.path.. ';.\\Scripts\\?.lua;.\\LuaSocket\\?.lua;'

-- MODULE
SOCK = {
-- CONST
DEGRAD = 180 / math.pi,
PORT = 20000,
FRAME_DELAY = 0.05, -- seconds
CODES = {
ALT = "ALT",
POSITION_LL = "PLL",
HBP = "HBP",
FUEL = "FUEL",
NAME = "NAME",
RPM = "RPM",
ENG_TEMP = "ET",
WAYPOINT = "WP",
LAND = "LAND",
},
-- VARS
loopVarsChunk = 0,
lastT = 0,
socket = nil,
clients = {},
-- METHODS
start = function (self)
local socket = require("socket")
self.socket, err = socket.bind("*", self.PORT)
-- non-blocking server
self.socket:settimeout(0)
self.socket:setoption("linger", {on = true, timeout = 5})
end,
-- check new connections and apply/answer commands
beforeFrame = function (self)
-- This is done every frame always.
-- connection accepting muse be fast, and readAllData reacts
-- only if there is a command from the client anyway.
self:checkNewConnections()
self:readAllData()
end,
-- notify data broadcasting
afterFrame = function (self)
-- This is broadcasted everytime, so put a limit in the frames.
local newT = LoGetModelTime()
if newT - self.lastT > self.FRAME_DELAY then
self.lastT = newT
-- also send data in chunks each time, cycle them
if self.loopVarsChunk == 0 then
-- Chunk 1: POS page
local radarALT = LoGetAltitudeAboveGroundLevel()
local baroALT = LoGetAltitudeAboveSeaLevel()
local selfData = LoGetSelfData()
if radarALT ~= nil and baroALT ~= nil then
self:broadcast(self.CODES.ALT..":"..baroALT..":"..radarALT)
end
if selfData then
self:broadcast(self.CODES.POSITION_LL..":"..selfData.LatLongAlt.Long..":"..selfData.LatLongAlt.Lat)
self:broadcast(self.CODES.HBP..":"..(selfData.Heading * self.DEGRAD)..":"..(selfData.Bank * self.DEGRAD)..":"..(selfData.Pitch * self.DEGRAD))
end
elseif self.loopVarsChunk == 1 then
-- Chunk 2: ENG page
local engData = LoGetEngineInfo()
local wpData = LoGetRoute()
local landing, name = self:checklanding()
if engData then
local fuelLeftKG = engData.fuel_internal + engData.fuel_external
local fuelConsumptionKGsec = engData.FuelConsumption.left + engData.FuelConsumption.right
self:broadcast(self.CODES.FUEL..":"..fuelLeftKG..":"..fuelConsumptionKGsec)
self:broadcast(self.CODES.RPM..":"..engData.RPM.left..":"..engData.RPM.right)
self:broadcast(self.CODES.ENG_TEMP..":"..engData.Temperature.left..":"..engData.Temperature.right)
end
if wpData then
local wpNum = wpData.goto_point.this_point_num
local coords = LoLoCoordinatesToGeoCoordinates(wpData.goto_point.world_point.x, wpData.goto_point.world_point.z)
if landing then
self:broadcast(self.CODES.LAND..":"..name..":"..coords.longitude..":"..coords.latitude)
else
self:broadcast(self.CODES.WAYPOINT..":"..wpNum..":"..coords.longitude..":"..coords.latitude..":"..wpData.goto_point.world_point.y)
end
end
end
-- increment and reset to cycle when out of maximum
self.loopVarsChunk = self.loopVarsChunk + 1
if self.loopVarsChunk > 1 then
self.loopVarsChunk = 0
end
end
end,
-- close all sockets
stop = function (self)
for k, c in ipairs(self.clients) do
c:send("EXIT:0\n")
c:close()
table.remove(self.clients, k)
end
self.socket:close()
end,
-- finds new connections and adds them to the table (clients)
checkNewConnections = function(self)
if self.socket ~= nil then
connection, err = self.socket:accept()
if connection ~= nil then
--new connection - non-blocking
connection:settimeout(0)
connection:setoption("linger", {on = true, timeout = 5})
table.insert(self.clients, connection)
end
end
end,
-- reads all the data left from the clients
readAllData = function(self)
if self.clients ~= nil then
for k, c in ipairs(self.clients) do
local s, status = c:receive(2^10)
if s ~= nil then
r = self:getreply(s)
if r ~= nil then
c:send(r.."\n")
end
end
if err == "closed" then
table.remove(self.clients, k)
end
end
end
end,
-- broadcast a message to all clients
broadcast = function(self, message)
for k, c in ipairs(self.clients) do
c:send(message.."\n")
end
end,
-- reply to a client message (return nil for no response)
getreply = function(self, message)
-- TODO
return nil
end,
checklanding = function(self)
local navInfo = LoGetNavigationInfo()
local navRoute = LoGetRoute()
if navInfo == nil or navRoute == nil then
return false, nil
end
local x = math.floor(navRoute.goto_point.world_point.x)
if navInfo.SystemMode.submode == "LANDING" or navInfo.SystemMode.submode == "ARRIVAL" then
if (x == -18893) or (x == 8070) or (x == 1329) or (x == -12152) then
return true, "Anapa"
elseif (x == -20469) or (x == 7301) or (x == 359) or (x == -13527) then
return true, "Krymsk"
elseif (x == -54298) or (x == -47609) then
return true, "Novorossiysk"
elseif (x == -64187) or (x == -57293) then
return true, "Gelendzhik"
elseif (x == -4567) or (x == 19982) or (x == 13845) or (x == 1570) then
return true, "Krasnodar-P"
elseif (x == 10744) or (x == 12626) or (x == 12155) or (x == 11214) then
return true, "Krasnodar-C"
elseif (x == -212461) or (x == -180974) or (x == -188846) or (x == -204590) then
return true, "Gudauta"
elseif (x == -172929) or (x == -168705) then
return true, "Sochi"
elseif (x == -212547) or (x == -228602) or (x == -216561) or (x == -224588) then
return true, "Sukhumi"
elseif (x == -280306) or (x == -283255) or (x == -281043) or (x == -282518) then
return true, "Senaki"
elseif (x == -289850) or (x == -279928) or (x == -282409) or (x == -287370) then
return true, "Kutaisi"
elseif (x == -43567) or (x == -58952) or (x == -47414) or (x == -55106) then
return true, "Mineralnye-V"
elseif (x == -40432) or (x == -12454) or (x == -19449) or (x == -33437) then
return true, "Maykop"
elseif (x == -114735) or (x == -119831) then
return true, "Nalchik"
elseif (x == -85786) or (x == -81251) or (x == -82385) or (x == -84652) then
return true, "Mozdok"
elseif (x == -147492) or (x == -149690) or (x == -148042) or (x == -149141) then
return true, "Beslan"
elseif (x == -345359) or (x == -350596) then
return true, "Batumi"
elseif (x == -324114) or (x == -311802) or (x == -314880) or (x == -321036) then
return true, "Kobuleti"
elseif (x == -306227) or (x == -331898) or (x == -312645) or (x == -323887) then
return true, "Vaziani"
elseif (x == -304472) or (x == -326635) or (x == -310013) or (x == -321094) then
return true, "Lochini"
elseif (x == -305724) or (x == -329942) or (x == -311778) or (x == -325480) then
return true, "Soganlug"
end
return true, "<LAND>"
end
return false, nil
end,
}

-- HOOKS
do
local __LuaExportStart = LuaExportStart
local __LuaExportBeforeNextFrame = LuaExportBeforeNextFrame
local __LuaExportAfterNextFrame = LuaExportAfterNextFrame
local __LuaExportStop = LuaExportStop
LuaExportStart = function ()
if __LuaExportStart then
__LuaExportStart()
end
SOCK:start()
end
LuaExportBeforeNextFrame = function ()
if __LuaExportBeforeNextFrame then
__LuaExportBeforeNextFrame()
end
SOCK:beforeFrame()
end
LuaExportAfterNextFrame = function ()
if __LuaExportAfterNextFrame then
__LuaExportAfterNextFrame()
end
SOCK:afterFrame()
end
LuaExportStop = function ()
if __LuaExportStop then
__LuaExportStop()
end
SOCK:stop()
end
end

--[[

function table.val_to_str ( v )
if "string" == type( v ) then
v = string.gsub( v, "\n", "\\n" )
if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then
return "'" .. v .. "'"
end
return '"' .. string.gsub(v,'"', '\\"' ) .. '"'
else
return "table" == type( v ) and table.tostring( v ) or
tostring( v )
end
end

function table.key_to_str ( k )
if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then
return k
else
return "[" .. table.val_to_str( k ) .. "]"
end
end

function table.tostring( tbl )
if "table" ~= type(tbl) then
return
end
local result, done = {}, {}
for k, v in ipairs( tbl ) do
table.insert( result, table.val_to_str( v ) )
done[ k ] = true
end
for k, v in pairs( tbl ) do
if not done[ k ] then
table.insert( result,
table.key_to_str( k ) .. "=" .. table.val_to_str( v ) )
end
end
return "{" .. table.concat( result, "," ) .. "}"
end

function table.print(t)
local f = io.open(lfs.writedir()..'Scripts/dump.txt', "w")
if f then
f:write(table.tostring(t))
f:close()
end
end

]]--


On enregistre et... C'est prêt.

Lancer le fichier MFCD_FC3.bat puis DCS et... Magax! cheer.gif
Pour la configuration, modifier la dernière ligne du .bat en ajoutant les options qui vous intéressent à la fin de la dernière ligne. Par exemple, ma config:

start javaw -Djava.library.path=lib -jar lib/MFC_FC3.jar -noborders -useMFD2 -xy950,1440 -s365

Quelques remarques:

-Grosse conso CPU. Configurer le logiciel pour n'utiliser qu'un coeur peut être un plus(pas vraiment testé).
-Slmod n'est pas obligatoire du tout. Il crée un dossier scripts d'où l'effet positif pour certain.
-Le soft utilise le port 20000. En cas de soucis, vérifiez les paramètres du pare-feux.
-En cas de configuration multi-écran, penser à décocher "Plein Ecran" dans les options de DCS. Sinon le jeu passe devant la fenêtre du logiciel
-Le projet est public. Les sources sont disponibles içi: https://github.com/raffaeleragni/mfcdfc3

En espérant que ça aide quelqu'un...
Merci à ceux qui m'ont fait des propositions de solution!

Bon vol!

Un peu de technique: testé sur windows 8.1 update 1, DCS 1.2.8
Goztreh
Mis en place.
C'est excellent en effet.
Retour du fuel flow, niveau kero complet avec les bidons, marking de waypoint avec coordonnées GPS (utile en inter-escadron), relèvement bull's permanent. Que du bon! thumbsup.gif

Goz.
Cougar
il se pourrait qu'il y ai une grosse MAJ bientot avec un ADI tongue.gif !
Goztreh
CITATION(Cougar @ 18 Aug 2014, 16:31) *

il se pourrait qu'il y ai une grosse MAJ bientot avec un ADI tongue.gif !


Oh yeah! detective.gif

Goz.
SandJo
CITATION(Cougar @ 18 Aug 2014, 15:31) *

il se pourrait qu'il y ai une grosse MAJ bientot avec un ADI tongue.gif !

Good news, cheer.gif

je préférerais un HSI innocent.gif
Mais vu mes capacités en prog, je prends ce qu'il y a...


Tchouss
SandJo
Boulling
CITATION(Cougar @ 18 Aug 2014, 16:31) *

il se pourrait qu'il y ai une grosse MAJ bientot avec un ADI tongue.gif !


Source? J'ai rien trouvé sur le forum ED ni sur le site.
@SandJo: De même, je rêve d'un HSI déporté mais je n'ai toujours pas trouvé de solution viable. Je tiens au courant si jamais...
Cougar
la source ?! MOI ! tongue.gif

via contact direct avec le mosieur .
Boulling
Oh yeah! Ca, j'aime! thumbsup.gif
Cougar
c'est que j'ai besoin d'un bel ADI pour mon pit de Rafale tongue.gif !

son programme est vraiment cool !
Cougar
Mise a jour wink.gif

ADI rudimentaire ajouté ( sera amélioré bientot ) + possibilité de changer la couleur ( bleu cyan ) a la place du vert actuel .

possibilité également de paramétrer pour démarrer MFCD avec la page de démarrage souhaitée .

http://qopru.com/mfcdfc3/

cheer.gif
Photun
Vous savez s'il y a possibilité de mettre ça sur une tablette ou sur un smartphone ?
Cougar
depuis mise a jour 1.2.10 , MFC foire complet !!

j'ai voulu rechanger les paramètres pour avoir la couleur bleue a la place du vert , ça ne change rien ...

une piste ?

@echo off
rem set JAVA_HOME=jre8
rem set PATH=%PATH%;%JAVA_HOME%\bin
start javaw -Djava.library.path=lib -jar lib/MFC_FC3.jar -noborders -useMFD2 -xy950,1440 -s365 -blue

Postal2
En faite il merde pas mal même !

en lan sur le pc de Lamule ont à vu le soft bouffer à lui tout seul 10/15 fps en yoyo! .
lamule
Correction postal. Il jusqu'à 40 fps mais en moyenne c'est 25 a 30
Cougar
ne fonctionne plus chez moi sur la Beta 1.5 ni la 2.0 sad.gif
Goztreh
CITATION(Cougar @ 21 Dec 2015, 23:14) *

ne fonctionne plus chez moi sur la Beta 1.5 ni la 2.0 sad.gif


Tu as bien copié les exports?

Goz.
Cougar
Comment ça ? ya des manips a faire maintenant ? ça a toujours fonctionné sans rien installer je comprends plus la blink.gif
Goztreh
CITATION(Cougar @ 23 Dec 2015, 19:01) *

Comment ça ? ya des manips a faire maintenant ? ça a toujours fonctionné sans rien installer je comprends plus la blink.gif


Tu as un dossier par installation dans Saved Games. Dans Scripts tu dois avoir pour chaque version, le MFCD_FC3.lua
Tu peux le copier du dossier DCS dans DCS.openbeta et DCS.openalpha.

Tout cela dans Saved Games bien sur.

Goz.
Cougar
bah zuttt j'ai plus de dossier Scripts dans mon Savedgames/DCS .
peut être du aux 3 installs DCS toutes fraîches
Résolu .

Merci wink.gif
brood34
CITATION(Cougar @ 23 Dec 2015, 18:01) *

Comment ça ? ya des manips a faire maintenant ? ça a toujours fonctionné sans rien installer je comprends plus la blink.gif


Après une réinstallation de DCS il faut lancer le soft MFCD seul une première fois pour qu'il modifie les export avec ses besoins, et ensuite ca marche tout seul.

C'est une version "bas débit" de notre forum. Pour voir la version complète avec plus d'information, la mise en page et les images, veuillez cliquez ici.