Uživatelské nástroje

Nástroje pro tento web


xpl_sasl

Toto je starší verze dokumentu!


Sasl

Obecně

  • v projektu je samostatná aplikace „Slava“, která umožňuje vytvořit přístrojový panel propojený s X-Plane Sasl po síti. Funguje nejen vizualizace, ale také ovládání přístrojů.
  • plno komerčních letadel obsahuje Sasl plugin v sobě.
  • Některá jej používají skutečně pro vytváření přístrojů, některé sasl používají pouze jako doplnění speciálních efektů - například 3d zvuk, chvění kabiny, odstranění pilota při pohledu z kokpitu…
  • Aby se zobrazili přístroje ve slava aplikaci, musí být nadefinován panel.lua. V defaultu je k dispozici jeden demo ruský panel. Funguje obecně na jakékoliv letadlo, které používá uvedené dataref.
  • existuje více verzí sasl
      • nejspíš úplně původní větev, pod GPL licencí,
      • vývoj byl ukončen, poslední verze 2.0.3
      • vývoj byl převeden na 1-sim.com
      • nějaký klon nejspíš původní větve, pod GPL
      • obsahuje chyby, mrtvý projekt
      • aktuální oficiální větev pod vedením 1-sim.com, flightfactor aero
        • změny kódu se musí vracet 1-sim
        • autor modifikace se zříká práv na modifikovaný kód.. tj. například sdílení dalším lidem
        • použití pluginu v komerčním projektu vyžaduje souhlas
        • použití pluginu ve free projektu je bez omezení
        • součástí pluginu musí být ta proprietární licence
      • ze zdrojových kódů je odstraněn Slava
      • plánují úplně odstranit podporu pro Slava (remote connection), pokud to nebude nikdo používat

Kompilace Slava

  • na webu se mluví o verzi 0.8 a 1.0 RC, v svn je ale verze kompatibilní s 2.0 (aktuálně 2.0.3)
  • kompilace se spouští pomocí ./mkdistr.sh
  • soubor je potřeba upravit :)
    • není tam žádný configure, takže se musí upravit cesty a doinstalovat závislosti
    • pro kompilaci slava není potřeba kompilovat xap, který závisí na X-Plane SDK od XSquawkBox
  • já jsem řešil tyto problémy při kompilaci
luna.h:10:17: fatal error: lua.h: Adresář nebo soubor neexistuje
 #include <lua.h>
                 ^
locate lua.h
fps.h:5:17: fatal error: SDL.h: Adresář nebo soubor neexistuje
 #include <SDL.h>
apt-get install libsdl2-dev
 #include <SOIL.h>
                  ^
locate SOIL.h
<code>

<code>
apt-get install libsoil-dev

EXTRA_CXXFLAGS = -I/usr/include/lua5.1/ -I/usr/include/SOIL/

ln -s /usr/lib/x86_64-linux-gnu/libopenal.so.1 slava/libopenal.so

-I/usr/include/lua5.1/ -I/usr/include/SOIL/ ./mkdistr.sh

/usr/bin/ld: cannot find -lalsound /usr/bin/ld: cannot find -lluajit-5.1 /usr/bin/ld: cannot find -lopenal

-L./ -L../

ln -s /usr/lib/x86_64-linux-gnu/libluajit-5.1.so.2 libluajit-5.1.so

n.cpp g++ -o slava -L/usr/lib/x86_64-linux-gnu/ -L./ -L../ -L../libavionics -L../libaccgl -L../alsound -L/usr/local/lib -L/usr/local/lib utils.o cmdline.o fps.o main.o -lm `sdl2-config –libs` -lavionics -lalsound -laccgl -lluajit-5.1 -ldl -lSOIL -lGL -lopenal /usr/bin/ld: cannot find -lalsound collect2: error: ld returned 1 exit status Makefile:25: návod pro cíl „slava“ selhal make: *** [slava] Chyba 1

ten alsound se musi zkompilovat :) je to adresar… a vyzdauje

alsound.cpp:19:20: fatal error: AL/al.h: Adresář nebo soubor neexistuje

#include <AL/al.h>

install libopenal-dev

a pozooor.. nasel jsem ten divnej build :)) https://github.com/der-On/sasl .. tady server posila NP1 na NP2 :)

uprava default conf.mk

# extra CXXFLAGS
EXTRA_CXXFLAGS = -I/usr/include/lua5.1/ -I/usr/include/SOIL/

# extra LNFLAGS
EXTRA_LNFLAGS = -L/usr/lib/x86_64-linux-gnu/ -L./ -L../
Index: libavionics/propsclient.cpp
===================================================================
--- libavionics/propsclient.cpp	(revision 224)
+++ libavionics/propsclient.cpp	(working copy)
@@ -601,6 +601,10 @@
 
     md5_state_t md5;
     md5_init(&md5);
+    if (buf.getData()[2]=='1') {
+        props->log.error("I have received NP1... rewriting to NP2 :)");
+        buf.getData()[2]='2';
+    }
     md5_append(&md5, buf.getData(), 20);
     md5_append(&md5, (md5_byte_t*)props->secret.c_str(), 
             props->secret.length());
upravy mkdistr.sh... zakomentoval jsem jeste nejake kraivny ohledne buildu toho modulu do xpl
--- mkdistr.sh	(revision 224)
+++ mkdistr.sh	(working copy)

+# build alsound
+cd alsound
+make clean
+make
+if [ $? != 0 ] ; then
+    echo "Can't build alsound!"
+    exit -1
+fi
+cd ..

Testování slava-Sasl

build mam hotov.. proc to nekomunikuje???

v saas2.0.zip je navod, co se posila v packetech.. je tam vlastne popis celeho komunikacnicho protokolu (ten zip mas v aircrafts u toho hangaru pc12)

vlastten tady less /opt/X-Plane\ 10/Aircraft/General\ Aviation/Eclipse\ 550-v1-5/plugins/sasl/netprops.txt

kdyz poslu NP1 na eclipse, tak on nereaguje kdyz poslu NP2, tak on odpovi NP1+16B … podle zdrojaku co mam, by mel ale odepsat NP2 :)

takze to vypada, ze tam je nejaka jina verze :) ale jaka?

u toho eclipse se pise neco o verzi 2.0.0… z svn mam cosi jako 2.0.3 :)

vzal jsem sasl plugin z eclipse a hodil to do TU letounu… no a funguje to ted na 64bit teoreticky, kdyz si udelam vlastni build sasl, tak by to pak mohlo frcet :) no ne?

jinak.. ten sasl plugin by nemel vesmes delat tak nejak nic.. vsechno by melo byt v custom cocpit!!

Zprovoznění Sasl u letadel

  • je tam 64 bit verze?
  • ldd na lin.xpl - not found knihovny?? tohle většinou způsobilo nezobrazení pluginu v menu * zkoumáním log.txt * typicky tam je problém s velikosti písmen v názvu souboru tohle plugin zobrazilo v plugin info, ale nebyla tma položka v menu
SASL INFO: including    soundInit.lua
SASL ERROR: Can't find sound    sounds/INBEE.wav
SASL ERROR: Can't find sound    sounds/INBEE.wav
SASL ERROR: Can't find sound    sounds/BEE.wav
SASL ERROR: Can't find sound    sounds/BEE.wav
SASL ERROR: Can't find sound    sounds/xrpm4R.wav
SASL ERROR: Can't find sound    sounds/xrpm4R.wav

Historie

Původní vize autora

http://forums.x-plane.org/index.php?showtopic=38827

Everybody who tried to make own aircraft model discovered that real avionics often can't be simulated by default X-Plane gauges. Generic gauges was a great step to avionics simulation but it lacks most important thing: ability to specify custom logic. For example it is not possible to simulate Boeing FMC with generics and it is not possible to make Tu-16 autopilot AP-5 (I believe it is weirdest autopilot in the world) by using default features.

Some day I decided to solve this problem. Actually there was a lot of more problems those days because of generics doesn't existed yet. My goal was to make technology which will allow:

  1. Simulate virtually any avionics
  2. Avionics should work in 3D cockpit, 2D panels and 2D popup panels
  3. Avionics should work over network (internet) on remote computers to allow creation of complex training devices
  4. Avionics development should to be easy and fast

After few years of development I've finished with SASL toolkit. While it is in active development phase it is already can do everything from list above.

SASL approach to avionics can be described as „components and scripting“. Everything in SASL world consist of 'components'. For example, typical simple gauge consists of 2 components: background texture and needle which can rotate depending on value of variable. Often X-Plane variable is not enough and one can write any function which can describe needle rotation. For example one can add jitter to ADF needle to make it more realistic. Complex gauges can use other gauges as their subcomponents. Components haven't to be visual: one can make some logic as component. For example such component can add few more failures (may be useful for training) or entire autopilot.

Developing new avionics is relative fast. First of all easiest way is to find completed required gauge. While number of aircrafts increasing more and more gauges sees light. If you are no lucky you have to create your own one. It is fast because you haven't recompile your project and wait for X-Plane startup after every change. Just edit gauge description text file, press F8 key and it will be loaded instantly. Properly designed gauge can be copied to another aircraft or launched over network on another computer.

SASL is open source project and can be used in any simulator, not just X-Plane. For now it is employed in following X-Plane models:

  1. Tu-104B (http://code.google.com/p/sasl/): SASL usage example and playground
  2. IL-14 (http://www.store.x-plane.su/): complex payware aircraft by Felis. Has a lot of custom logic and failures
  3. Yak-40 (http://code.google.com/p/yk40/): open source work-in-progress, will be another SASL demonstrator

SASL source codes and snapshot builds available here: http://code.google.com/p/sasl/

You can download Tu-104 example aircraft (just unpack it to your X-Plane directory; everything required is inside of archive; no additional installation steps required). Also you can download stand-alone avionics application (slava) which allows to run gauges over network. Generic soviet stile navigator panel included in slava archive. In order to run it you have to open Tu-104 (or other sasl enabled aircraft) in X-Plane, specify network password in plugins menu and start server. Next you have to edit slava.bat (or slava.sh depending on your OS) end set the same password and X-Plane computer IP address. Run slava.bat (slava.sh) after that and you'll see navigator panel working over network.

For now I'm going to stop adding new features for a while and write documentation for avionics developers. I'm highly very interested in your thoughts about future of this project. Don't hesitate to ask any questions.

Změna GPL na proprietární

http://forums.x-plane.org/index.php?showtopic=90977

Hi guys.

People have asked me to give a short explanation to what is going on with sasl, so here it is. SASL has two types of users: regular users (designers that make planes with sasl) and contributes (people who compile sasl and add functionality). SASL also has two versions: open and commercial (with key protection and/or code scrambling).

As you all know, for the last few years sasl has been stagnating due to lack of development and contribution from 3rd party programmers. About a year ago we have taken over commercial sasl and with it its main free branch. In order to add functionality to the commercial version we much add the same functionality to the open one, otherwise designers won't be able to develop their planes.

In the past SASL was GPL, which meant that you were free to compile your own version but had to make your code open source as well. There were only five such contributors. If you have compiled your version without making your code open source, oh well…. What has changed now is that it is a copyrighted plugin however, its copyright is very open. As regular users you are still free to use the open sasl binaries for whatever projects you like, all that we ask is for you to place the copyright notice in your product to promote our work on sasl, We also urge you to use the commercial sasl for your commercial products, it is safer for your code as it can't be copied by others without permission, it helps keep your product off torrent sites by providing key protection and your small (actually very small) contribution to the project helps us fund future development of sasl.

If you would like to be a contributer to the code, you can find the sources of SASL on gitHub https://github.com/temk/sasl-2.x. If you add code we will review it and if it doesn't conflict with anything we are doing we will accept it and move it to the commercial version also. The code will remain open as it is now. For more info on this please read the licence agreement in the repo.

SASL 3.0 is being developed in parallel with 2.x updates which you see. It is mostly a refactoring project where we will move to fully C++ object oriented code. We also plan many additions and new functionality including the ability to integrate C++ code right into sasl script. If you have suggestions, requests or comments on this please most them on this forum. We will try to accommodate you.

TODO

xpl_sasl.1450214412.txt.gz · Poslední úprava: (upraveno mimo DokuWiki)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki