Set Marker Beacon State?

#1
Hi there,
The Simconnect documentation seems to indicate that the marker beacon state should be settable, but I don't seem to be able to get it to work. Am I doing something wrong? or is the documentation in error?

My code is:

INT32 data = 1;
SimConnect_Open(&hSimConnect, "RadioRange", NULL, NULL, NULL, SIMCONNECT_OPEN_CONFIGINDEX_LOCAL);
SimConnect_CallDispatch(hSimConnect, ScDispatchProc, this);


if (FAILED(SimConnect_AddToDataDefinition(hSimConnect, 1, "INNER MARKER", "Bool", SIMCONNECT_DATATYPE_INT32)))
MessageBox(GetActiveWindow(), "add to def fail", 0, 0);

MessageBox(GetActiveWindow(), "Setting", 0, 0);
SimConnect_SetDataOnSimObject(hSimConnect, 1, SIMCONNECT_OBJECT_ID_USER, NULL, 0, sizeof(data), &data);

I also tried "MARKER BEACON STATE" as well.

I would appreciate any help ever so much!
Farley
 

Heretic

Resource contributor
#2
I've quickly tested the available sim vars with XMLTOOLs.

Setting (A:MARKER BEACON STATE, enum) to any of the valid values didn't work as did setting the (A:INNER/MIDDLE/OUTER MARKER, bool) variables.

Then again, the airport where I've tested this at doesn't have any markers at all so that could just be the culprit.

Why do you want to control the marker in the first place?
 
#3
To my knowledge you can't set any of the A: vars through XML, you have to use simconnect, no? which is what I'm trying to do.

Making my own Low Frequency Radio Range system, with my own database and no changes to the stock scenery. It gives much better tuning behavior than the stock ADF, no possibility of frequency conflicts with modern NDBs, among other perks. Most of the range stations have co-located marker beacons, and I figure the easiest way to implement them is just to read the angle from the plane to the station internally in my program and set the marker state based on that (rather than placing marker beacon scenery files everywhere), in the same way that I'm currently doing the cone of silence. Also this way I can have complete control to flash the marker light according to the pattern produced by the real marker, which often does not correspond to a morse code letter.
 
#4
To my knowledge you can't set any of the A: vars through XML, you have to use simconnect, no? which is what I'm trying to do.
Bjoern mentioned XMLTOOLs (#2) which can be freely downloaded here. Check out the SIMVARS class.

SIMVARS v1.0
This class allows direct writing to aircraft A:variables using XML code. Not all the simulation variables described in FSX/ESP 1.0 SDKs accept this method; only those listed with “Y” in the [SETTABLE] column may receive custom user values.

SIMVARS works by opening a single internal Simconnect client that is shared across the different gauges, as only one instance of the class is created per aircraft panel. Like happens with other XMLTools classes, SIMVARS identifiers cannot be used inside a model (.MDL) file.


Bob
 
#5
I just tried setting the marker variables (MARKER BEACON STATE and INNER MARKER) via simconnect as well. Like you, I had no success (my simconnect works as I tested it by setting the joystick position).

Sometimes the SDK is just wrong, I've run into quite a few A: variables which claim to be settable but in reality they are not. I once had the clever idea of setting the G Force number to simulate a black out due to lack of oxygen but despite the SDK claiming G Force is settable it wasn't.
 
#6
Thanks so, so much, guys! I'd never heard of SIMVARS or XMLTOOLS I will definitely check it out.

I guess I'll have to figure out some other way... The documentation definitely lists them as settable, I kind of hoped I had just made a stupid mistake in my code. :)

Thanks,
Farley
 

Heretic

Resource contributor
#7
Making my own Low Frequency Radio Range system, with my own database and no changes to the stock scenery. It gives much better tuning behavior than the stock ADF, no possibility of frequency conflicts with modern NDBs, among other perks. Most of the range stations have co-located marker beacons, and I figure the easiest way to implement them is just to read the angle from the plane to the station internally in my program and set the marker state based on that (rather than placing marker beacon scenery files everywhere), in the same way that I'm currently doing the cone of silence. Also this way I can have complete control to flash the marker light according to the pattern produced by the real marker, which often does not correspond to a morse code letter.
A FSX replacement for DC3Airways' LFRR scenery, I presume?

One of my (many) current projects is upgrading the default DC3 (blame Ernie Gann) and I'd like to try LFRR navigation at least once. Although I'd really prefer visual cues over the ear-piercing beeps.
Anyway, one of the modifications I've made to the DC-3 and am planning to roll out for the next release is a continuous main panel area, on which you can put any additional gauges, like a beam indicator.

If need be, you can also simply modify the default marker gauge to flash or illuminate in accorance to beam positions (and still work as a "regular" marker). This is maybe the easiest solution.
 
#8
Oh the DC3 looks neat!! :D :D
Yeah, the DC3Airways version is real nice and inspired me to do this... Building it as a c++ gauge from scratch, though, I can just get much smoother audio transitions and volume control, idents integrated into the range tone at the appropriate intervals, etc. Over the past couple years I've acquired a pretty large collection of 1940s charts, facilities directories and such, and I noticed that when the folks at DC3Airways made their Range scenery, they had to change most of the frequencies to avoid conflicts with the stock navaids. For some reason that irked me, although it probably shouldn't. Bypassing the stock ADF altogether eliminates this, plus makes it possible to tune by sound, which the delay in the stock system prohibits. My database is currently at 297 range stations and radio beacons - Canada and about the northern half of the CONUS - and expanding south at an average of a few stations a day.

Right now I have no visible gauges (actually I've never made one before), but I've made everything compatible with the VCs of the A2A warbirds (you can even use the otherwise-pretty-but-useless command receiver in the B-17), which are what I fly mostly. So I'm trying to use A:vars whenever I can for compatibility with existing VCs (hence wanting to do the marker through Simconnect rather than just use an Lvar). When I finish, I'll make some xml panel with the appropriate switches, like what the DC3Airways version has, for planes that I haven't integrated it with, and a visual left-right indicator. I'll let you know when it's done, it would please me immensely if you popped it in your DC3 for a spin! I just flew the A2A Fort from Seattle to Cleveland on the beams and it works a treat, with a 1944 magdec file I made you can do the whole thing on nothing but real, original charts and publications!! (though obviously no markers yet, and it's true - it's a little taxing on the ears!) Ok, very sorry for talking your ear off about my project, I'm done now. :\
 

Heretic

Resource contributor
#9
By all means, continue. It's quite nice to see some projects that are out of the ordinary!

I've tried to find images of receivers so that I can put a dummy version of one of them onto the panel, but the only picture I could find so far is the one from the Wikipedia article on LFRR*.
Do you have any, peferably of some that are not based on oscilloscopes (which would be a bit hard to implement via XML)?

*https://en.wikipedia.org/wiki/Low-frequency_radio_range#/media/File:LFR-reed.jpg
 
Top