Jump to content

Yet Another CMSP character recognition application


Recommended Posts

Posted (edited)

license: MIT

source code: https://github.com/calltherain/DCSW_GetCMSP

usage:

1. compile it under vs.net 2012 pro in RELEASE config and execute it.

2. I'm STRONGLY RECOMMEND use icemaker 's Easy Monitor Configurator

set CMSP/CMSC window size and position, don't make it too small or this app will not work as expected, you can use this value( CMSP 343x75, CMSC: 331x98 )

3. Start this application and set the CMSP/CMSC X,Y, W, H accordingly, IMPORTANT: If the monitor setting for the CMSC Y value is 100 for example, please enter 98 ( decrease 2 pixel ) for CMSC-Y in this application. I haven't figure out why the CMSC export has 2 pixel vertical offset.

4. By default, this app will send the string to specified IP:port through UDP, if you want a serial port implementation please do it by yourself.

 

known issues: please report bug in this thread or at github. the code is not pretty, sorry.

 

 

side note:

First of all, I have no experience on pattern recognition, I thought this is the application that would be very difficult to write. But I do have the interesting on this topic, and after reading some articles I decided to have a try.

 

Attached is the screen shot, not too bad. Because the CMSP characters are very "normalized", there is no need to filter the noise or rotate characters to the normalized form.

I used some time to tune the parameters to make the result correct.

 

The CPU utilization is around 5%, RAM utilization 10MB ~ 20MB

 

some limitations: it requires the CMSP screen resolution has at least 300 pixel width, or it will not recognize the character correctly.

Okay, this is a test of the whole process:

 

 

This is a CMSC test, now this tool will use 5% CPU power for both CMSP CMSC character recognition. So ED, please improve your data export API, provide a LUA function so people can get the CDU/CMSP/CMSC screen text more easily.

 

553341207_2013-10-0500_58_09-DCS.thumb.jpg.08ae6a98ce2124759078f34b54c151a9.jpg

684135473_2013-10-0500_58_37-GetCMSPCharacters.thumb.jpg.97bb7eb5a0823ce2d505af48bfaaa006.jpg

Edited by overpro
added Video
  • Like 1

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

  • 2 weeks later...
Posted
Looks like a neat solution with almost no lagging. How are you exporting it to the LCD? Via Arduino or?

 

Cheers

Hans

Yes, I'm using arduino with an ethernet shield, through UDP.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Posted (edited)

Very impressive work overpro.

 

(edit:Just reread your first post I found the answer to my quiz, times getting late here, please disregard my earlier post here).

 

Looking forward to have a possibility to get the CMSP working in my rig ;-)

 

Cheers

Gus

Edited by Duckling

- - - -

  • 2 months later...
Posted

Let me make some code cleaning and put it to github.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Posted
Very nice. Wondering if i can amend this to get the Radio channel data that isnt exported.......

 

Anyway very cool, thanks for sharing.

 

Hi devon, i think the radio freq can be exported by using export. lua.

 

http://en.wiki.eagle.ru/wiki/Export_1_0_1

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Posted

 

 

Yup, I managed to work that out last night. Was so focused on getting the frequencies that i missed the point that what i actually wanted to show was the dial position instead. Once i worked that out it was simple enough to link it all up. Planning on running my own export app alongside helios for the 7 segment/alphanumeric displays.

Posted
Yup, I managed to work that out last night. Was so focused on getting the frequencies that i missed the point that what i actually wanted to show was the dial position instead. Once i worked that out it was simple enough to link it all up. Planning on running my own export app alongside helios for the 7 segment/alphanumeric displays.

Have you got the value for the Preset dial? Its something I"m interested in?

Posted
Have you got the value for the Preset dial? Its something I"m interested in?

 

 

vhfam preset value:

GetDevice(0):get_argument_value(137)

FM:

get_argument_value(151)

UHF:

get_argument_value(161)

 

Is it what you are looking for?

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Posted

I found all my stuff (thanks to a welter of posts from various peeps on here) in

C:\Program Files\Eagle Dynamics\DCS World\Mods\aircrafts\A-10C\Cockpit\Scripts\mainpanel_init.lua.

 

What caught me out was that some of these arguments are ONLY exported when the device is triggered ie. dial/wheel is jogged or switch is toggled.

 

Find the dial/switch/gauge you want and then look for the argument number.

 

As overpro posted above just do a get_argument_value on device 0.

  • 1 month later...
Posted
vhfam preset value:

GetDevice(0):get_argument_value(137)

FM:

get_argument_value(151)

UHF:

get_argument_value(161)

 

Is it what you are looking for?

 

I missed this reply, thanks for that, will test tomorrow night.

cheers

 

Peter

Posted

And a slightly silly question - is there are a we can export the screens without using up another monitor port? I'm really struggling for spare video ports in the pit.

 

cheers

 

Peter

Posted
And a slightly silly question - is there are a we can export the screens without using up another monitor port? I'm really struggling for spare video ports in the pit.

 

cheers

 

Peter

 

 

I'm using a USB Video adapter (in my case USB to VGA for an old 5" LCD I had laying around). Works like a charm so far. You can hook quite a few of them up if the resolution remains relatively low. Mine is set to 800x600. You can find them on ebay for around $30. My plan was to use it for the CDU. Something like this:

 

http://www.ebay.com/itm/USB-3-0-to-VGA-Video-Card-Multi-Display-Cable-Adapter-for-Windows-7-8-Perfect-/351015277398?pt=US_Video_Cables_Adapters&hash=item51ba241356

Posted

Hi Overpro. Thanks for sharing your code :thumbsup:

Only downloaded it currently. A new Mega and Ethershield arrived together with an I2C OLED (thanks Pete for the link posted). Possibility to get the CMSC to work is dream comming true.

 

Can anyone share a working Arduino scetch to use for the Overpros code, for a Ethershield connected Mega as example ?

 

(or point it out to a half blind delerious fellow builder ;-) )

 

Cheers

Gus

- - - -

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...