Fr/High-Level Architecture: Difference between revisions

Jump to navigation Jump to search
Traduction intégrale
(Traduction partielle)
(Traduction intégrale)
Line 40: Line 40:
En utilisant SimKit, le point d'intégration se trouve dans le code FlightGear au lieu de  [[SimGear]]), en particulier le code se trouvant dans $FG_SRC/Network/HLA.
En utilisant SimKit, le point d'intégration se trouve dans le code FlightGear au lieu de  [[SimGear]]), en particulier le code se trouvant dans $FG_SRC/Network/HLA.
==Federate Object Model (FOM)==
==Federate Object Model (FOM)==
Un élément clé de la conception consiste à écrire le Federation Object Model (FOM), qui définit les objets et les mises à jour publiés par le RTI. Bien qu'il puisse sembler à première vue une bonne idée d'utiliser le FOM pour partager l'arbre de propriétés interne entre plusieurs modules fédérés, c'est probablement la mauvaise façon d'utiliser HLA car la granularité est trop faible  <ref>https://sourceforge.net/p/flightgear/mailman/message/34795859/</ref><ref>https://sourceforge.net/p/flightgear/mailman/message/34803436/</ref><ref>https://sourceforge.net/p/flightgear/mailman/message/34794675/</ref> et cela risque d'entraîner des problèmes de synchronisation. Au lieu de cela, nous devrons prendre des décisions explicites sur la communication des modèles de données.


A key part of the design is writing the Federation Object Model (FOM), which defines the objects and updates that are published by the RTI.  While it might at first glance seem a good idea to use the FOM to share the internal property tree across multiple federates, this is probably the wrong way to use HLA as the granularity is too low <ref>https://sourceforge.net/p/flightgear/mailman/message/34795859/</ref><ref>https://sourceforge.net/p/flightgear/mailman/message/34803436/</ref><ref>https://sourceforge.net/p/flightgear/mailman/message/34794675/</ref> and it's likely to lead to synchonization issues. Instead, we'll need to make explicit decisions about the data models to communicate.
Le FOM est un jeu de fichiers XML dans [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/HLA/ FGData/HLA].


The FOM is a set of XML files in [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/HLA/ fgdata/HLA/]
Les données d'orientation dans le FOM (SGOrientationWGS84) sont des Quaternions ([https://fr.wikipedia.org/wiki/Quaternion https://en.wikipedia.org/wiki/Quaternion]), et ce sont les valeurs i,j,k. De mémoire, l'orientation est relative à un cadre centré sur la Terre, et il existe des fonctions dans SimGear pour convertir en cap/tangage/roulis en les ombinant avec la position de l'objet.<ref> {{cite web
 
The orientation data in the FOM (SGOrientationWGS84) are Quaternions ([https://en.wikipedia.org/wiki/Quaternion https://en.wikipedia.org/wiki/Quaternion]), and those are the i,j,k values. From memory, the orientation is relative to a earth-centered-frame, and there are functions in SimGear to convert to heading/pitch/roll in combination with the object's position.
<ref> {{cite web
   | url    = http://forum.flightgear.org/viewtopic.php?p=280098#p280098
   | url    = http://forum.flightgear.org/viewtopic.php?p=280098#p280098
   | title  = <nowiki>Re: HLA </nowiki>
   | title  = <nowiki>Re: HLA </nowiki>
Line 63: Line 61:
</ref>
</ref>


Richard's [[Emesary]] system would also probably work quite well with the HLA FOM to give us a way for models to communicate with other models.<ref> {{cite web
Le système [[Emesary]] de Richard fonctionnerait également très bien avec le HLA FOM pour nous donner un moyen, pour les modèles, de communiquer avec d'autres modèles.{{Appendix}}
  | url    = http://sourceforge.net/p/flightgear/mailman/message/34985731/
  | title  = <nowiki>[Flightgear-devel] Message passing interface for Nasal</nowiki>
  | author = <nowiki>Richard Harrison</nowiki>
  | date  = Apr 1st, 2016
  | added  = Apr 1st, 2016
  | script_version = 0.25
  }}
</ref>
{{Appendix}}


==Modules fédérés==
==Modules fédérés==


Federates can be written in most languages, but SimKit provides very good hooks for writing them in C++ and Python.
Les modules  fédérés peuvent être écrits dans la plupart des langages, mais SimKit a des atomes crochus pour les écrire en C++ et Python.


For some Subsystems split off from the existing FlightGear source, it's fairly easy to create an executable with its own property tree<ref>https://sourceforge.net/p/flightgear/mailman/message/34632142/</ref> and have shared C++ code to map FOM objects to property values. However, this is an implementation detail - the whole point of HLA and the FOM is that it makes no assumptions about what Federates do with the data.
Pour certains sous-systèmes séparés de la source FlightGear existante, il est assez facile de créer un exécutable avec sa propre arborescence de propriétés<ref>https://sourceforge.net/p/flightgear/mailman/message/34632142/</ref> et d'avoir du code C++ partagé pour associer les objets FOM aux valeurs de propriété. Cependant, il s'agit d'un détail d'implémentation - tout l'intérêt de HLA et du FOM est qu'il ne fait aucune hypothèse sur ce que les modules fédérés font avec les données.


Regarding weather, in a HLA/RTI context the way to do this would be to have a weather engine as an RTI Federate. This would run any required weather simulation, and pass (very) local weather conditions to each of the aircraft/tower/windsock in the simulation, plus publish position information on clouds for use by visualiation engines.<ref>{{cite web
En ce qui concerne la météo, dans un contexte HLA/RTI, la façon de procéder serait d'avoir un moteur météorologique en tant que module fédéré RTI. Cela exécuterait toute simulation météorologique requise et transmettrait les conditions météorologiques (très) locales à chacun des aéronefs / tours / manches à air dans la simulation, en plus de publier des informations de position sur les nuages à utiliser par les moteurs de visualisation.<ref>{{cite web
   |url    =  https://sourceforge.net/p/flightgear/mailman/message/35595300/  
   |url    =  https://sourceforge.net/p/flightgear/mailman/message/35595300/  
   |title  =  <nowiki> Re: [Flightgear-devel] Traffic 2020: Towards a new Development
   |title  =  <nowiki> Re: [Flightgear-devel] Traffic 2020: Towards a new Development
Line 91: Line 80:


==Statut actuel ==
==Statut actuel ==
Last updated: (10/2022)
Dernière mise à jour (10/2022)


Stuart did some prototyping work to federate FlightGear within HLA a number of years ago, using OpenRTI and SimKit. There should be some reference in the
Stuart Buchanan a fait un travail de prototypage pour fédérer FlightGear au sein de HLA il y a quelques années, en utilisant OpenRTI et SimKit. Il devrait y avoir une référence dans les archives de la liste de diffusion si vous voulez regarder. C'est certainement possible, et un cas d'utilisation était de découpler l'IG (générateur d'images) et de permettre au travail de commencer à utiliser VSG (vulcan scene graph) tout en continuant à prendre en charge [[OpenSceneGraph|OSG]].
mailing list archive if you care to look. It is certainly possible, and one use case was to decouple the IG (image generator) and enable work to start using VSG (vulcan scene graph) while continuing to support OSG.


FlightGear is used regularly as a decoupled Image Generator (IG) for both academic and industry projects, through the many flexible I/O options available. They just aren't publicised much.
FlightGear est régulièrement utilisé comme générateur d'images (IG) découplé pour des projets académiques et industriels, grâce aux nombreuses options d'E/S flexibles disponibles. Ils ne sont tout simplement pas très médiatisés.


There has been some work on how we might move to VulkanSceneGraph, but last I heard there were some technical problems we couldn't overcome. <ref>https://sourceforge.net/p/flightgear/mailman/message/37726603/</ref>
Il y a eu des travaux sur la façon dont nous pourrions passer à [[VulkanSceneGraph]], mais la dernière fois que j'ai entendu dire qu'il y avait des problèmes techniques que nous ne pouvions pas surmonter.<ref>https://sourceforge.net/p/flightgear/mailman/message/37726603/</ref>


 
Stuart est prudemment optimiste et il pourrait être en mesure de fournir le début d'une mise en œuvre HLA assez rapidement, car l'un des facteurs de blocage pourrait être résolu bientôt.<ref>{{cite web
Stuart is cautiously optimistic that he may be able to provide the start of a HLA implementation quite soon, as one of the blocking factors may be resolved soon.<ref>{{cite web
   |url    =  https://sourceforge.net/p/flightgear/mailman/message/35595300/  
   |url    =  https://sourceforge.net/p/flightgear/mailman/message/35595300/  
   |title  =  <nowiki> Re: [Flightgear-devel] Traffic 2020: Towards a new Development
   |title  =  <nowiki> Re: [Flightgear-devel] Traffic 2020: Towards a new Development
Line 111: Line 98:
   }}</ref>
   }}</ref>


Actuellement, il existe un support HLA très ancien dans SimGear. Ceci est obsolète et doit être ignoré.


Currently, there is some very old HLA support in SimGear. This is very out of date and should be ignored.
Stuart prend en charge HLA en utilisant les derniers OpenRTI et SimKit travaillant sur une version locale, mais attend que Mathias publie officiellement son SimKit avant de mettre en avant ses modifications. Ainsi, tout ce qui suit est uniquement local, mais inclus ici à titre d'information.


Stuart has HLA support using the latest OpenRTI and SimKit working on a local build, but is waiting for Mathias to officially publish his SimKit before he pushes his changes.  So all of the following is local-only, but included here for information.
Le noyau Flightgear prend actuellement en charge HLA comme suit.


The Flightgear core currently supports HLA as follows.
* Intégration SimKit, lecture du SimKit FOM et connexion à un RTI OpenRTI.
* SimKit integration, reading the SimKit FOM and connecting to an OpenRTI RTI.
* Instanciation d'objets MP AI afin que les utilisateurs puissent visualiser les objets publiés sur le RTI par d'autres modules fédérés. Ceci est actuellement quelque peu insatisfaisant car il surcharge le code MP, où en réalité ces objets sont plus basiques.
* Instantiating MP AI objects so users can view objects published over the RTI by other Federates. This is currently somewhat unsatisfactory as it overloads the MP code, where really these objects are more basic.
* Choisissez des objets d'environnement pour cette instance et utilisez-les pour définir la chaîne METAR locale pour la génération de la météo
* Pick up Environment Objects for this instance and use them to set the local METAR string for weather generation.
{{See also|FGTraffic}}Nous avons actuellement les autres modules fédérés suivants :


{{See also|FGTraffic}}
* '''fgogel''' - Un modèle d'IA écrit en python est publié sur le RTI. Fait partie de SimKit, mais néanmoins pratique !
We currently have the following other Federates:
* '''fgtraffic''' - pour exécuter un scénario d'IA en externe au FG Core
* '''fgogel''' - An AI model written in python the publishes over to the RTI. Part of SimKit, but handy nevertheless!
* '''fgmetar''' - écrit en python qui identifie la station METAR la plus proche pour les autres modules fédérés publiés et distribue le METAR pour qu'ils puissent le récupérer. Cela pourrait être étendu pour fournir un [[FGPythonSys|moteur météorologique général]].
* '''fgtraffic''' - to run an AI Scenario externally to the FG Core
* '''fgmetar''' - written in python that retrieves the closest METAR station for other published Federates and publishes the METAR for them to pick up. This could be expanded to provide [[FGPythonSys#Weather_Simulation|a general Weather Engine]].


Stuart now has the [[AI]] Manager working as an external binary, and publishing updates over the RTI which are displayed as MP Aircraft. Stuart has created a little python script that looks for objects with locations being published over the RTI and publishes the closest METAR to them, then modified FG to pick up the appropriate METAR string for this instance and use it as the real-time input for weather generation.  
Stuart a maintenant le IA Manager fonctionnant comme un binaire externe et publiant des mises à jour sur le RTI qui sont affichées comme MP Aircraft. Stuart a créé un petit script python qui recherche des objets dont les emplacements sont publiés sur le RTI et publie le METAR le plus proche d'eux, puis a modifié le FG pour récupérer la chaîne METAR appropriée pour cette instance et l'utiliser comme entrée en temps réel pour la génération de la météo .  


The python script could be fairly easily enhanced into a more substantial weather engine allowing a single coherent weather environment to be used across the simulation. Stuart also started work modifying [[FGViewer]] so that it works with SimKit. This is a fairly big deal and quite a bit of fairly dull plumbing work but would allow us at least have a view of the simulation entirely separate from the running simulation.  
Le script python pourrait être assez facilement amélioré en un moteur météorologique plus substantiel permettant d'utiliser un seul environnement météorologique cohérent tout au long de la simulation. Stuart a également commencé à modifier [[FGViewer]] pour qu'il fonctionne avec SimKit. C'est un gros problème et un travail de plomberie assez ennuyeux, mais cela nous permettrait au moins d'avoir une vue de la simulation entièrement séparée de la simulation en cours.<s><ref> {{cite web
<ref> {{cite web
   | url    = http://sourceforge.net/p/flightgear/mailman/message/34877355/
   | url    = http://sourceforge.net/p/flightgear/mailman/message/34877355/
   | title  = <nowiki>[Flightgear-devel] HLA Status Update 23/2/2016</nowiki>
   | title  = <nowiki>[Flightgear-devel] HLA Status Update 23/2/2016</nowiki>
Line 138: Line 123:
   | script_version = 0.25
   | script_version = 0.25
   }}
   }}
</ref>
</ref></s>  


Separately, Erik has been doing some preparatory work suitable for supporting HLA in JSBSim by adopting so called PropertyObjects to  hopefully get rid of tied properties (http://sourceforge.net/p/jsbsim/mailman/message/34720784/)
Par ailleurs, Erik a effectué un travail préparatoire adapté à la prise en charge de HLA dans JSBSim en adoptant ce que l'on appelle PropertyObjects pour, espérons-le, se débarrasser des propriétés liées (http://sourceforge.net/p/jsbsim/mailman/message/34720784/)


<references/>
<references />


== A ce peopos ==
== A ce propos ==
For additional information, please see:
Pour plus d'informations, veuillez consulter :
* [[Technical_Reports#A_New_Architecture_for_FlightGear_Flight_Simulator]]
*[[Technical_Reports#A_New_Architecture_for_FlightGear_Flight_Simulator]]
* [[Decoupling the AI Traffic System]] (currently work-in progress, highlights the limitations of the current AI system related to distributed/multi-instance and multiplayer usage)
*[[Decoupling the AI Traffic System]] (actuellement en cours de réalisation, met en évidence les limites du système d'IA actuel lié à l'utilisation distribuée/multi-instance et multijoueur).
* [[FlightGear HLA support (High Level Architecture)]] (outdated, documenting the original HLA infrastructure code)
*[[FlightGear HLA support (High Level Architecture)]] (obsolète, documentant le code d'infrastructure HLA d'origine)
* [[FlightGear CIGI Support (Common Image Generator Interface)]].
*[[FlightGear CIGI Support (Common Image Generator Interface)]].
* [[Modularizing, parallelizing and distributing FlightGear]] (background info/discussions pre-dating HLA adoption in FlightGear)
*[[Modularizing, parallelizing and distributing FlightGear]] (informations de fond/discussions antérieures à l'adoption de HLA dans FlightGear)
* [[Distributed Interactive Simulation]] (DIS specific review of the FlightGear multiplayer system/protocol and its limitations, which can be addressed via HLA)
*[[Distributed Interactive Simulation]] (Examen spécifique au DIS du système/protocole multijoueur FlightGear et de ses limites, qui peuvent être résolues via HLA)


== Liens externes ==
== Liens externes ==
* {{wikipedia|High-level architecture (simulation)}} on Wikipedia
* {{wikipedia|High-level architecture (simulation)}} sur Wikipedia


[[Category:HLA]]
[[Category:HLA]]


[[en:High-Level Architecture]]
[[en:High-Level Architecture]]
742

edits

Navigation menu