Leaderboard
Popular Content
Showing content with the highest reputation on 01/23/08 in all areas
-
2 points
-
I first got this idea when we started work on our cockpit project, but at that time, I only knew how to export stuff from lockon via the export.lua script. After studying the lua language a little, and searching the net, I found out that it is also possible to use export.lua as an import script :) To try this out, I created a small program to run on my PDA, which functions like TouchBuddy in a way, but much simpler (at the moment, it has only six non-programmable buttons). It communicates with the PC via a TCP socket, using port 10309. On the PC, I was first planning to create a small server, which would translate the commands it received from the PDA into keystrokes for Lockon. But since Lockon has the LoSetCommand() function in the export.lua script, I wondered if it would be possible to create the server using a lua script. After some tests, I had a perfectly working server script, which handled all my commands, but it was running outside of Lockon, and since it used an endless loop, this might be a problem. Time to learn coroutines :) After a couple of hours of programming and testing, I finally managed to create a script, which runs inside Lockon, and listens on TCP port 10309 for incoming commands. It then translates the received commands into the numeric command codes listed at the end of the export.lua script, and calls the LoSetCommand() function. By using this script, I can now control my aircraft from any type of application, even via a script from a web browser :D As I'm still in the early stages of learning lua, maybe some of you can comment on my script to make it better. Here's the lua script: --------------------------------------------------------------------------------------------------- -- TCP Listener script for controlling Lockon from an external program -- -- Author: Bas 'Joe Kurr' Weijers -- --------------------------------------------------------------------------------------------------- dofile "lua.lua" -- Listener settings -- By default, the listener binds to port 10309 on all local network interfaces local host = "*" local port = 10309 -- Command list -- Send these commands from your application to execute the corresponding functions in Lockon -- The numbers here correspond to the commands at the end of the original export.lua script local commands = { view_cockpit = 7, view_external = 8, view_flyby = 9, view_ground_units = 10, view_civilians = 11, view_chase = 12, view_navy = 13, view_air_combat = 14, view_theater = 15, view_airfield = 16, chat_allies = 50, chat_common = 57, acs_altitude_toggle = 59, acs_autopilot_toggle = 62, acs_thrust_toggle = 63, mech_gear_toggle = 68, mech_hook_toggle = 69, mech_wings_toggle = 70, mech_canopy_toggle = 71, mech_flaps_toggle = 72, mech_flaps_down = 145, mech_flaps_up = 146, mech_airbrake_toggle = 73, mech_airbrake_open = 147, mech_airbrake_close = 148, mech_wheelbrakes_on = 74, mech_wheelbrakes_off = 75, mech_chute = 76, refuel_on = 79, refuel_off = 80, refuel_probe_toggle = 155, mode_nav = 105, mode_bvr = 106, mode_vs = 107, mode_bore = 108, mode_helmet = 109, mode_fio = 110, mode_ground = 111, mode_grid = 112, kobra = 121, engines_both_start = 309, engines_both_stop = 310, engines_left_start = 311, engines_left_stop = 312, engines_right_start = 313, engines_right_stop = 314, master_power_toggle = 315, lights_toggle = 175, jettison_weapons = 82, jettison_fueltanks = 178, radar_toggle = 86, eos_toggle = 87 } Coroutines = Coroutines or {} CoroutineIndex = CoroutineIndex or 0 local serverRunning = 0 local origStart = LuaExportStart local origStop = LuaExportStop function run_server() local socket = require("socket") local sck = socket.try(socket.bind(host, port)) if (sck ~= nil) then addr, prt = socket.try(sck:getsockname()) logtofile("Listener started") while (serverRunning == 1) do socket.try(sck:settimeout(0.01)) conn, err = sck:accept() if conn ~= nil then msg, err = conn:receive() conn:close() if (msg == "END") then stop_server = 1 else logtofile("Received: " .. msg .. " --> " .. commands[msg]) LoSetCommand(commands[msg]) end -- if end -- if coroutine.yield() end -- while sck:close() logtofile("Listener stopped") end -- if end -- function function start_server() logtofile("Starting listener") serverRunning = 1 CoroutineIndex = CoroutineIndex + 1 Coroutines[CoroutineIndex] = coroutine.create(run_server) LoCreateCoroutineActivity(CoroutineIndex, 0.0, 0.1) end function stop_server() logtofile("Stopping listener") serverRunning = 0 end function CoroutineResume(index, tCurrent) coroutine.resume(Coroutines[index], tCurrent) return coroutine.status(Coroutines[index]) ~= "dead" end function LuaExportStart() origStart() local file = io.open("./Temp/commander.log", "w") if file then io.output(file) end start_server() end function LuaExportStop() logtofile("End") stop_server() origStop() end function logtofile(message) io.write(message .. "\n") end --------------------------------------------------------------------------------------------------- -- End of lockon-commander.lua -- --------------------------------------------------------------------------------------------------- The sending application makes a connection each time a button is pressed, sends the corresponding command, and closes the connection again. If this doesn't happen, the lua script will wait until the connection is closed before continuing, thus effectively pause the mission in Lockon. Question to the devs: I found that there is a function to toggle the gear up and down (command 68 ), but are there also separate commands for lowering and raising the gear? I found that there are separate commands for the airbrake and flaps.1 point
-
1 point
-
China J-8B、J-8C(ACT) MOD Final 2.0 Released ************************************************************************************************************** It costed 2 month to make this China J-8 mod by inSky_353/RICK from inSky Flight Simulation Club's Technical Team. 1, Install: The J-8 mod is made by Loman 2.1 and only compatible with Lockon 1.1. So download it and install it using Loman2.1 or Modman. (Please backup the related files in case of problems) 2, How to install the J-8 to make it compatilbe with the China J-10 mod. the J-8 mod replaces the Su-24 in Lockon and J-8C(ACT) replaces the Su-24MR. a) for the people had China Patch and J-10 Mod installed before, just intall the J-8 Mod by Loman or Modman; b) for the people only want to play with the J-8 mod, please download the China Patch and install it before you install the J-8 Mod; the Skin files(.bmp&.tga):X:\......\Ubisoft\Eagle Dynamics\Lock On\Bazar\TempTextures; the Code files(.xml):x:\......\Ubisoft\Eagle Dynamics\Lock On\ME; the LOM files(.lom&.skins):X:\......\Ubisoft\Eagle Dynamics\Lock On\Bazar\World\Shapes; The Chinese Spring Festival is coming, inSky Techinical Team release this J-8 Mod as a gift to all flight sim fans and thank all of your effort and support to inSky Club. 3D design by inSky_353/RICK Mod made by inSky_353/RICK E-mail: inSky_353RICK@126.com MSN: inSky_353RICK@hotmail.com inSky Technical Team ( http://www.insky.cn/ ) 2008-1-20 DOWNLOAD: http://rapidshare.com/files/85863518/J-8B_C_ACT__MOD_FINAL_2.0.zip1 point
-
AGM-88E Advanced Anti-Radiation Guided Missile (AARGM) http://www.mbda-systems.com/mbda/site/FO/scripts/newsFO_complet.php?lang=EN&news_id=224 http://www.aviationweek.com/aw/generic/story_generic.jsp?channel=awst&id=news/aw122407p1.xml Launched from a full-scale aerial target drone: http://www.af.mil/news/story.asp?id=123082272 http://www.af.mil/news/story_media.asp?id=1230822721 point
-
Не стану особо распинаться: 1. Я руками избавил Z-буфер (буфер, отвечающий за сортировку треугольников по мере удаления от точки зрения, то есть за порядок прорисовки треугольников) от необходимости сортировать перекрывающиеся части лестницы, ступеньки и опоры. На самом деле это ерунда, не сказывающаяся ни на чём. Реальный выигрыш заключается в том, что объект теперь не зависит от глубины Z-буфера, то есть того каким он будет на конкретной видеокарте 16, 24 или 32 битным. То есть прорисовка объекта не будет зависеть от того какая видеокарта занимается ею, и какие установлены драйвера. Мне будет на это глубоко плевать, а это существеннейший плюс к тому, что я называю культурой моделирования. К слову скажу ещё пару слов о культуре моделирования в этом пункте. Необходимо, чтобы все физические объекты в модели были «замкнуты», то есть не имели «надрывов». Кто гарантирует вас от того, что в самом ближайшем будущем вашу модель не захотят заанимировать? Что легче, достроить геометрию в тех местах, где появились щели и откровенные дыры в результате анимации или же по результатам убрать невидимые треугольники? Я думаю вопрос риторический… «Сращивание» геометрии методом булина практически гарантирует вас от «разомкнутости» объектов. Кстати, советую всем пользоваться 9 максом, поскольку в нём булиновские операторы работают несравненно корректнее, чем в более старых версиях, большинство «лишних» точек и граней оптимизируются. Это к слову. А по сути, использование замкнутых подобъектов также говорит о высокой культуре вашего моделинга. Если вы не уверены в том, замкнут объект или нет, просто завельдите точки и наложите оператор Cap Holes, он автоматически закроет плоскостями все имеющиеся у вас в объекте дыры. Полезный инструмент, те кто его придумал, знал толк в культуре моделирования. 2. В своей статье Небольшое пособие по "запеканию" "оклюжена" (см. http://forums.eagle.ru/showthread.php?t=27778), я упоминал о таком важном параметре, как padding. Надеюсь, никто не будет подвергать сомнению то, что я обязательно собираюсь применить этот великолепный инструмент при текстурировании своего танка. Ещё как собираюсь! Так вот без «сращивания» геометрии, падинг становится абсолютно бесполезной величиной, поскольку он будет влиять на края текстурных шеллов, которые скрыты у нас где-то под другими поверхностями. Грубо говоря, при просчёте лайтмапа перекрывающиеся части объекта, ступенек и опор будут просчитаны непредсказуемо, а результирующая текстура будет иметь в местах перекрытия чудовищного вида артефакты, которые могут навсегда оставить в вашем сердце неизгладимый след от неправильного применения «запекания» и совершенно несправедливо наложить на этот метод чёрный след «глючного» и опасного. То есть, надеюсь, все понимают, что если было принято решение при текстурировании использовать «запекание», то сращивание просто необходимо, иначе технология будет не выдержана. 3. Самый обширный пункт, которому необходимо посвятить отдельную главу, а именно: Вырожденная геометрия, борьба с ней и корректировка топологии. Почему это относится к списку выгод от «сращивания» геометрии будет понятно по ходу дальнейшего рассмотрения.1 point
-
I always use the drivers found on this page in the Saitek Forums: http://www.saitekforum.com/showthread.php?t=11552 Rudder and joystick drivers can be found in the list. SST software found at the bottom of the list. The other thing is: I was getting that same message you got when, for example, trying to load a joystick profile on the Saitek rudder icon in the taskbar. Not saying you are doing something similar, but just in case....1 point
-
Да ничего красивого. Подобрались с тылу. С правого боку точней. и всё. Никак не ожидал, там же наши должны были быть. ДО этого ещё по паре долбил, так они лагать начали , пришлось бросить нафиг.1 point
-
The RuAF is finally taking delivery of its first two Mi-28Ns. They're going to the Torzhok test and training center. Here's the news video, with the first glimpse of a working HUD, pit and even a couple of MFD pages, including the TV targeting channel: http://www.vesti.ru/videos?vid=119468 Not quite super, but not bad either.1 point
-
Мужики, ну вы прям как маленькие, ей Богу. Это всего лишь игра, причем не самая популярная. Ну почитерили малость, ну бывает. Не, вы только подумайте - вместо того чтобы честно как проложено в бой лезть устроили маневры обходные. При посадке на авианосец никто не разбился. В цель попадали. Уж как синий флот запрятан был - и то попасть умудрились. Не, торвак прав - не фиг такие войны засчитывать. Не правильно вы воевали. Группами работали, задачи имели, команд слушались. Да еще и маневрировали в бою! Это точно никуда не годиться! И в треке синих самолетов больше лагало, чем красных! А смотрелось красиво. Хаотичная синяя стая, и четко организованные красные группы. Волна, сшибка, разошлись, еще сшибка - и все, воздух наш. И под завязку штурмовики. Как на полигоне. Вот только я думаю, что треки не только я смотрю. И в следующий раз, в другом проекте, с той стороны будут сюрпризы.1 point
-
Удалил свой аккаунт с сервера СА... Учавствовать в проекте, организуемом Торваком не буду ни на каких условиях (я думаю, он меня и уговаривать не станет).:music_whistling: Единственный приемлемый для меня вариант - ПУБЛИЧНОЕ извенение перед MAD-ом за подставу и нелепые обвинения и перед бандерой... тут без коментариев. До этого момента даже до обсуждения проекта не опускаюсь. MAD, я понимаю твои чувства по отношению к этому проекту, выстрадано тобой не меньше чем Торваком. Но при таком отношении - пусть загибается... На данный момент, при подобной распальцовке у Торвака, проект уже мертвый. Противника нужно уважать, а у меня нет к ним уважения.1 point
-
Watch the Virtual Thunderbird LIVE performance @ VFAT 2007! As most of you know, VFAT is a LIVE show. This video was created entirely from this event. with each pilot controlling his own jet, from his own home, using LOCKON: Modern Air Combat and HOTAS Cougar joysticks while being streamed over the internet for a live audience of more than a thousand people on November 16-17, 2007. Download movie! Download Quality: WMV HD 1280 x 720 Length: 56 minutes File size: 956MB You can also watch the video streamed via Stage6! Streaming Quality: DivX 720 x 400 Length: 56 minutes File size: 584MB Note: I began working on this movie following VFAT weekend back in November and had roughly 90% of it done within two weeks. My intentions were to release this "just as it happened"-type video immediately after VFAT for those who didn't get to see our demo live in person, and also to show it the way we'd want to. Unfortunately work, Christmas and life came in-between and it took me another month before I found enough time to finish the remaining 10% of the video, but here it is. Enjoy! /LD1 point
-
Конфиг в студию!!! А вообще-то поиск рулит:thumbup:. http://forums.eagle.ru/showthread.php?t=26140&highlight=%E7%E0%EF%F3%F1%EA%E0%E5%F2%F1%FF+%E8%E3%F0%E0 http://forums.eagle.ru/showthread.php?t=22487&highlight=%E7%E0%EF%F3%F1%EA%E0%E5%F2%F1%FF+%E8%E3%F0%E0 http://forums.eagle.ru/showthread.php?t=14844&highlight=%E7%E0%EF%F3%F1%EA%E0%E5%F2%F1%FF+%E8%E3%F0%E0 http://forums.eagle.ru/showthread.php?t=16275&highlight=%E7%E0%EF%F3%F1%EA%E0%E5%F2%F1%FF+%E8%E3%F0%E0 http://forums.eagle.ru/showthread.php?t=28049 И вот это до кучи почитай, очень грамотно люди все расписали "Практические советы по настройке" http://forums.eagle.ru/showthread.php?t=4815&highlight=%E7%E0%EF%F3%F1%EA%E0%E5%F2%F1%FF+%E8%E3%F0%E0 "Все уже украдено до нас"(Операция Ы)1 point
-
You are wrong. The above link was for the specially designed Cougar version. Try this link directly to the manufacturers products sheet: http://www.dhs-electronic.de/homeeng.htm Here you will find the different versions. The first one (SIMPED-F16/USB) is a general USB solution. The third one (SIMPED-F16/C) is the special COUGAR version. So far I understand that. Hedge1 point
-
1 point
-
В чате это им нужно будет припомнить...когда собьем последнего пендоса.1 point
-
Recently Browsing 0 members
- No registered users viewing this page.