Jump to content
The simFlight Network Forums

text display for blind users


Recommended Posts

Hello,

I am blind, and use Flight simulator X with the "its your plane" software. I am looking for some functionality and wondering if anyone has set this up before. I would like to have a second computer set up in order to read textual information from fsx such as airspeed, heading, waypoint info, etc. This would be a very simple window with various fields that update every couple seconds. In reading the documentation, this should be possible with widefs and fsuipc.

I can get most of this info from the its your plane software, but I need to request it each time. What I am looking for is something that I could hook a braille display up to and basically get real-time updates.

Does anyone have any thoughts on this?

Link to comment
Share on other sites

I am blind, and use Flight simulator X with the "its your plane" software. I am looking for some functionality and wondering if anyone has set this up before. I would like to have a second computer set up in order to read textual information from fsx such as airspeed, heading, waypoint info, etc. This would be a very simple window with various fields that update every couple seconds. In reading the documentation, this should be possible with widefs and fsuipc. All it would need to be is a series of read-only edit boxes that would update every couple seconds. AllI would need to do is tab between them. Is this something that could be designed using fsuipc and widefs?

Yes for airspeed, heading, altitude, most anything intrinsic to FS. No for waypoints, or at least no way I know which works consistently. Theoretically if the plan is loaded into FS then the next waypoint should be readable but I don't know how to do it consistently. The "GPS" info I can get hold of in FS9 doesn't always work, and it isn't available in FSX..

If you are always using RC then if RC could deposit next waypoint information into a specific offset, then that could also be displayed, but that would mean a change to RC. Alternatively it might be possible to decode part of RC's usual menu display to get that information.

Does anyone have any thoughts on this?

If you can ennumerate the exact fields you need and how they have to be displayed and operated to drive your Braille converter, I'll see what I can do.

Regards

Pete

Link to comment
Share on other sites

Hello,

You don't hav to worry about coding anything specific for the braille display. I use screen reading software that runs this.

As far as the application, I was envisioning a very basic Windows application. I would be runnning this on a second pc via wideFS. I wouldn't be able to run it on the same machine as the simulator, because I would need to switch away from the sim to get the information. It would have a series of read-only edit controls that would display the data. I could then use the tab key to move between each field. If you use standard windows controls, my screen reading software would read each field as I tab to it with no modification. As far as the braille display, I am able to set it up to pull various information on the screen and display it on a single line. You wouldn't need to worry about that part. As long as the program uses standard window controls and not custom classes, I should be able to pull the information.

As far as specific data that I would want:

1. airspeed

2. altitude

3. heading

4. vertical airspeed

5. Mach speed above the transition level.

6. Altimeter setting

This is all I can think of for now. I have dabbled with programming, but don't have the knowledge to set this up on my own. If you get this set up, would you be willing to give out the source so I could modify it is needed? I think I could work from existing code if I needed to modify it.

Thanks so much for your assistance on this! I know several other people who would be interested in this.

Yes for airspeed, heading, altitude, most anything intrinsic to FS. No for waypoints, or at least no way I know which works consistently. Theoretically if the plan is loaded into FS then the next waypoint should be readable but I don't know how to do it consistently. The "GPS" info I can get hold of in FS9 doesn't always work, and it isn't available in FSX..

If you are always using RC then if RC could deposit next waypoint information into a specific offset, then that could also be displayed, but that would mean a change to RC. Alternatively it might be possible to decode part of RC's usual menu display to get that information.

If you can ennumerate the exact fields you need and how they have to be displayed and operated to drive your Braille converter, I'll see what I can do.

Regards

Pete

Link to comment
Share on other sites

As far as specific data that I would want:

1. airspeed

2. altitude

3. heading

4. vertical airspeed

5. Mach speed above the transition level.

6. Altimeter setting

Not the waypoint data from RC then?

I can't get the transition level from anywhere.-- FS only uses 18,000. I can provide two entries, one for airspeed the other for mach, or else have one and let you switch them with some keystroke.

This is all I can think of for now. I have dabbled with programming, but don't have the knowledge to set this up on my own. If you get this set up, would you be willing to give out the source so I could modify it is needed? I think I could work from existing code if I needed to modify it.

Maybe, but it would take me much longer in that case, to tart it up, as I'm generally pretty shy about showing my bad coding techniques and completely commentless obscure algorithms.. Bad habits -- comes of doing it for 47 years!

Thanks so much for your assistance on this! I know several other people who would be interested in this.

I don't know when I'll be able to get to this. I'm pretty tied up for most of this coming week. Maybe the week after. I should certainly have time this month, at least.

Regards

Pete

Link to comment
Share on other sites

bIf you could get the waypoint data from rc, that would be great. I'd want to have it check if rc was being used though, since I may want to use this utility without rc on occasion.

I'm going to play with the showtext utility and se if I can make that work. I don't have widefs and fsuipc registered yet. I'll be doing that today.

Thanks!

Not the waypoint data from RC then?

I can't get the transition level from anywhere.-- FS only uses 18,000. I can provide two entries, one for airspeed the other for mach, or else have one and let you switch them with some keystroke.

Maybe, but it would take me much longer in that case, to tart it up, as I'm generally pretty shy about showing my bad coding techniques and completely commentless obscure algorithms.. Bad habits -- comes of doing it for 47 years!

I don't know when I'll be able to get to this. I'm pretty tied up for most of this coming week. Maybe the week after. I should certainly have time this month, at least.

Regards

Pete

Link to comment
Share on other sites

bIf you could get the waypoint data from rc, that would be great. I'd want to have it check if rc was being used though, since I may want to use this utility without rc on occasion.

It wouldn't fail, just produce an empty edit field -- or I could hide it if it was empty, if that makes your Braille converter easier to use.

One thing, from what you said earlier:

It would have a series of read-only edit controls that would display the data. I could then use the tab key to move between each field.

I've not checked this yet, but doesn't the default Windows dialogue method have TAB skip read-only fields?

Pete

Link to comment
Share on other sites

bIf you could get the waypoint data from rc, that would be great.

Okay. All done.

I've done it a different way -- not as a separate free-standing program, but as a Lua plug-in for WideClient. I think this is much more flexible, for all sorts of uses, and easier for adapting as the source is readily changeable.

You'll need to update to version 6.895, from the Download Links subforum. I've added a new library to the WideClient lua package, featuring these functions:

handle = display.create( "title", number_of_entries, top_left_x, top_left_y)

Creates the display. The width is fixed, the length depends on how many entries there are (1 to 16, max). The screen position is set by the coordinates given (optional).

display.show(handle, field, " text")

Displays the given text in the specified field (numbered from 1 to the number_of_entries).

The text can instead be RC1 or RC2 (not strings), where RC1 decodes the waypoint line from RC, if it is present, and RC2 decodes the runway line, if that is present. (See example below)

display.clear(handle)

Simply clears all fields to blank

display.close(handle)

Closes the display.

You don't need the last two for your application. Also, not that you'll need it, but you can have multiple displays in different places with different titles and different entries.

Here's the Lua plug-in code to match what you requested. I've included enough comments for you to make any changes you like.

-- Create the display window for 8 values, position x=800, y=400
h = display.create("Jason Fayre Display", 8, 800, 400)

-- Update the display at 1000 msec intervals (see event at end)
function mytimer(time)

	-- display 1 = airspeed
	airspeed = math.floor((ipc.readSD(0x02BC) / 128) + 0.5)
	display.show(h, 1, "Airspeed " .. airspeed .. " knots")

	-- display 2 = altitude
	altitude = math.floor(((ipc.readDD(0x0570) * 3.28084) / (65536 * 65536)) + 0.5)
	display.show(h, 2, "Altitude " .. altitude .. " feet")

	-- display 3 = heading
	heading = math.floor(((ipc.readUD(0x0580) * 360) / (65536 * 65536)) + 0.5)
	display.show(h, 3, string.format("Headng %03d degrees", heading))

	-- display 4 = vertical speed
	vertspeed = math.floor(((ipc.readSD(0x02C8) * 60 * 3.28084) / 256) + 0.5)
	display.show(h, 4, "Vertical speed " .. vertspeed .. " knots")

	-- display 5 = mach
	mach = math.floor((ipc.readUW(0x11c6) / 204.80) + 0.5)
	display.show(h, 5, string.format("Mach %1.2f", mach/100))

	-- display 6 = Altimeter
	qnh = ipc.readUW(0x0330) / 16
	hPa = math.floor(qnh + 0.5)
	inches = math.floor(((100 * qnh * 29.92) / 1013.2) + 0.5)
	display.show(h, 6, string.format("Altimeter %d hPa, %2.2f inches", hPa, inches/100))

	-- display 7 = Radar Contact line 1 decode (waypoint)
	display.show(h, 7, RC1)

	-- display 8 = Radar Contact line 2 decode (runway)
	display.show(h, 8, RC2)

end

-- Adjust timing to taste: 1000 = 1 second
event.timer(1000, "mytimer")


Just save this as a type Lua file (e.g. FayreDisplay.lua) into the same folder as your wideclient.exe, and it will start automatically when FS is "ready to fly".

This pic shows what it does, with rather fictitious values, though -- actually a result of extreme slewing!

Oh, I've just noticed I've inserted "QNH" when I'm actually displaying the altimeter setting, not the actual QNH. I've changed the Lua code above, but the picture still shows QNH instead of Altimeter.

Pete

P.S. TABS do work okay.

JasonFayreDisplay.jpg

Link to comment
Share on other sites

wow! Thanks so much for doing this! I don't have time to tes now, but I'll check it out later on this evening. This looks like exactly what I was looking for.

One quick question, what is the reason for the math operations being done on the values retrieved from fsx? How does fs present the values when you read them?

Thanks again!

Link to comment
Share on other sites

One quick question, what is the reason for the math operations being done on the values retrieved from fsx? How does fs present the values when you read them?

the units used in FS aren't often what you want to see. They are chosen for internal efficiency. If you want to know more, to add your own values, for instance, you'll need the list of offsets -- the documents describe the offset values and units used. The lists are in the FSUIPC SDK download.

Regards

Pete

Link to comment
Share on other sites

Hi Pete,

Well, we're getting there, but there are some issues. I installed the updated client. When I start fsx, the Window comes up and I am able to tab through the edit boxes. Unfortunately, I cannot see any text in the boxes. I have tried three different screen readers and none of them see the text. I'm not sure if this is because it isn't there, or something to do with the way lua is writing it. I am attaching a screenshot to see if you can tell me if the text is actually showing up on the screen.

p='1309795891' post='428483']

the units used in FS aren't often what you want to see. They are chosen for internal efficiency. If you want to know more, to add your own values, for instance, you'll need the list of offsets -- the documents describe the offset values and units used. The lists are in the FSUIPC SDK download.

Regards

Pete

post-21726-0-89868300-1309834830_thumb.j

Link to comment
Share on other sites

Well, we're getting there, but there are some issues. I installed the updated client. When I start fsx, the Window comes up and I am able to tab through the edit boxes. Unfortunately, I cannot see any text in the boxes. I have tried three different screen readers and none of them see the text. I'm not sure if this is because it isn't there, or something to do with the way lua is writing it. I am attaching a screenshot to see if you can tell me if the text is actually showing up on the screen.

No, there is no text. It looks like the timer event isn't operating. Check the last line in the Lua file you saved. Is it:

event.timer(1000, "mytimer")

If not then that's the reason. The dialogue is created, but never updated.

In case you have difficulty copying the file from my post, I attach a Zipped up one here, called FayreDisplay.lua, for you to install instead.

Regards

Pete

FayreDissplay.zip

Link to comment
Share on other sites

Hello,

Note to self... don't try and do anything complicated after a long day at the lake in the hot sun! I got it working. Problem was that when I copied the script off of your posting, I missed the last line, which was the timer definition. It looks really good!

I have a few things to tweak on my end, but I think this is going to do exactly what I wanted.

I'm having a couple screen reader issues, but I think they are related to the screen reader, not the code. My braille display isn't updating as the values change when I tab to an item. This may have something to do with the way my software handles read-only edit controls though. I'll do some investigating and post again if there is anything that can be done in the code. As I said though, I don't think this is your issue.

I work for the company who designs the screen reader, so I'll be able to figure this out fairly quickly. Thanks again for all your help!

Link to comment
Share on other sites

Hello,

This interface is working very well. I'm noticing that the heading that is reported via the LUA plugin is usually about 10-12 degrees off of the heading being reported by Its Your Plane. If I ask iyp for the heading and it says 125, the display will usually read around 110 or 115. Is this just something in the calculation being done in the plugin? I think altitude and speed are correct, but not absolutely sure.

Thanks!

Link to comment
Share on other sites

Hello,

This interface is working very well. I'm noticing that the heading that is reported via the LUA plugin is usually about 10-12 degrees off of the heading being reported by Its Your Plane. If I ask iyp for the heading and it says 125, the display will usually read around 110 or 115. Is this just something in the calculation being done in the plugin?

Yes, sorry. The heading is degrees TRUE. I forgot to compensate for magnetic deviation. The difference where I tested it is quite small so i didn't notice.

This line in the Lua needs to be changed:

heading = math.floor(((ipc.readUD(0x0580) * 360) / (65536 * 65536)) + 0.5)

Change it to

heading = math.floor(((((ipc.readUD(0x0580)/65536) - ipc.readSW(0x02A0)) * 360) / 65536) + 0.5)

I'll have to amend the sample in the Lua download too.

Regards

Pete

Link to comment
Share on other sites

G'day Pete

I've just popped over here from the 'It's Your Plane' Forum where Jason has put a link to this topic.

Pete, I just wanted to say just how much I admire and respect your ever-so-helpful attitude! That's going well beyond the normal bounds of support. Bravo Zulu, sir!

Just like to second these comments by n4gix. Pete............you are a champion, mate.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Pete,

I've been working with this add-on and it is still working great! I have another question for you:

Is it possible to get at the menus from Microsoft ATC using FSUIPC? I didn't see anything in the current list of offsets. I'm looking for something similar to what showtext does for rc4. I know Its Your Plane accesses this info somehow for its superatc module. Any thoughts?

Link to comment
Share on other sites

Is it possible to get at the menus from Microsoft ATC using FSUIPC?

No, sorry. It was something I investigated years ago, but gave up after getting nowhere hacking away day and night for a week.

I didn't see anything in the current list of offsets. I'm looking for something similar to what showtext does for rc4. I know Its Your Plane accesses this info somehow for its superatc module.

I don't think it does. You, the pilot, have to select the reply by the item number in the menu. If the same number was always used for the same function you could use the words instead, but ...

Pete

Link to comment
Share on other sites

  • 1 year later...

Great with the Display Library.

Is it possible to have this as a general library, not only working in WideClient?

You mean in FSUIPC, running in the FS process?

I'd really rather not. Both the "wnd" and "display" activities are designed to be run in a separate process to FS. I certainly would not do it for FSUIPC3 in any case. Possibly FSUIPC4 (for FSX and beyond), but it won't be doable in the near future I'm afraid.

You can run WideClient on the same PC as FS by simply changing the "ClassInstance" parameter in its INI file to a non-zero value. Applications won't connect to it at all, but you can use its ButtonScreen and Lua plug-in facilities. I realy think this would be a better solution than lumbering up FS with such extra weights.

Regards

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.