DCS A10 Support?  Topic is solved solved with post #24909

Re: DCS A10 Support?

Postby sirnoname » Sat 21. Mar 2015, 15:12

You mean I should use double instead of floats?
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: DCS A10 Support?

Postby laurivs » Sat 21. Mar 2015, 15:34

Oh, and I don't understand is how can we do the multiplication in plugin afterwards? Adding zeroes to the end of our result doesn't increase accuracy. The "multiplication" in export string is more than just adding zeroes to the end.

I think we need to have the multipliers in the export.lua
Why?

Example1 ( no multiplication in export.lua)
Yaw data reads 5.35 *57,3 = 306,555
Yaw data reads 5.36 *57,3 = 307,128
Yaw data reads 5.37 *57,3 = 307,701

Example2 ( multiplication done in export.lua (... pitch, bank, yaw*100, accel.x, angle, .....))
Yaw data reads 534.70 * 57,3 = 30638,310
Yaw data reads 534.71 * 57,3 = 30638,883
Yaw data reads 534.72 * 57,3 = 30639,456
Yaw data reads 534.73
Yaw data reads 534.74
Yaw data reads 534.75
....
...many possible values are now available until we even get to 535.00. Compare this to the example1 and you'll notice the difference.

As to float or double? I don't know anything about that in terms of computer science, I'm no programmer!
I just know what kind of accuracy we need and a simple cave man's way to get it. What do you think?

-L
laurivs
 
Posts: 46
Joined: Sat 10. May 2014, 18:47
Has thanked: 0 time
Been thanked: 0 time

Re: DCS A10 Support?

Postby sirnoname » Sat 21. Mar 2015, 17:31

Working with floats means using dot number with a easy precision. For this case about ten numbers behind the dor it would be no calculation error. Doubles do get more precision.
The plugin work with floats but I will double check your ideas.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: DCS A10 Support?

Postby laurivs » Sat 21. Mar 2015, 22:36

Great,

Now we're getting good progress! By the way, you don't need the yaw*100 but then you have to export more decimals, like this way:

if c then
socket.try(c:send(string.format("%.3f %.2f %.2f %.2f %.2f %.4f %.2f %.0f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f \n", t, altRad, altBar, pitch, bank, yaw, accel.x, angle, accel.y, accel.z, accel.x, accel.y-1, accel.z, user4, user5, user6, 7)))
end

Notice %.4f for yaw. This completely gets rid of the .57 problem! Now we have .01 increments and good resolution. This works perfectly, and we still have 360 degrees. Problem solved. Let's move on! :)

If we want more accuracy, we can do it by allowing more decimals to be shown in the plugin or by multiplying the value in export.lua.
laurivs
 
Posts: 46
Joined: Sat 10. May 2014, 18:47
Has thanked: 0 time
Been thanked: 0 time

Re: DCS A10 Support?

Postby laurivs » Sat 21. Mar 2015, 22:38

Would you like to try the bank speed value now? I believe we're ready for it. Are there any more problems before that? I don't think so. ;)

-L
laurivs
 
Posts: 46
Joined: Sat 10. May 2014, 18:47
Has thanked: 0 time
Been thanked: 0 time

Re: DCS A10 Support?

Postby laurivs » Sat 21. Mar 2015, 22:57

I just tested even with 7 decimals. It works and is very accurate! Check the following image to see for yourself.
Attachments
socket.try(c:send(string.format("%.3f %.2f %.2f %.2f %.2f %.7f %.2f %.0f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f \n", t, altRad, altBar, pitch, bank, yaw, accel.x, angle, accel.y, accel.z, accel.x, accel.y-1, accel.z, user4, user5, user6, 7)))
laurivs
 
Posts: 46
Joined: Sat 10. May 2014, 18:47
Has thanked: 0 time
Been thanked: 0 time

Re: DCS A10 Support?

Postby sirnoname » Mon 23. Mar 2015, 01:09

I have done a new algorithm for the speed and changed to DCS plugin.
So please copy the plugin to the X-Sim directory and check if the DCS plugin is correctly loaded if you select the plugin in the extractor.
Then check the values. They must stop at pause and the spike must be gone. We must change the LUA script to the order that all values do fit like in the original lua. We must finish all values and perhaps add some user values with real used values.
Then we must change the auto installer script that all is installed correctly, I do only have DCS World with steam and do not know where the executables are normally and how is the name of them.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: DCS A10 Support?

Postby laurivs » Mon 23. Mar 2015, 01:13

Omg, now installing and testing!

-L
laurivs
 
Posts: 46
Joined: Sat 10. May 2014, 18:47
Has thanked: 0 time
Been thanked: 0 time

Re: DCS A10 Support?

Postby laurivs » Mon 23. Mar 2015, 01:39

Ok, so I can manually open the DCSImport.exe and it looks great! But, I was unable to have the extractor find the plugin. In other words, I can't select DCS plugin from the list of plugins.

I copied DCSImport.exe & DCSPlugin.dll here:
C:\Program Files (x86)\X-Sim\Plugin\

Extractor -> Motion Driver-> Telemetry plugin -> ? DCS can't be found here. Do I need to do something else for the program to find DCS plugin? Shouldn't it find it automatically during startup of extractor?

I managed to cheat by naming the DCS plugin as the old lockon plug and it received data, no more bank speed spike problem! Missing user1,2,3 lateral values and a lot of other values too. And of course all the proper names are still the old ones in extractor and converter. So the names of the values don't match.But I'm sure once we get the DCS plugin with DCS specific dll loaded properly in the extractor, these problems will go away.

But anyway, excellent work Sirnoname, thank you so much! We're almost there :)
Last edited by laurivs on Mon 23. Mar 2015, 03:18, edited 1 time in total.
laurivs
 
Posts: 46
Joined: Sat 10. May 2014, 18:47
Has thanked: 0 time
Been thanked: 0 time

Re: DCS A10 Support?

Postby laurivs » Mon 23. Mar 2015, 01:50

And this is how the non-steam DCS folder structures look:
Attachments
laurivs
 
Posts: 46
Joined: Sat 10. May 2014, 18:47
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Digital Combat Simulator Series

Who is online

Users browsing this forum: No registered users and 1 guest