• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Set Marker Beacon State?

Messages
65
Country
us-massachusetts
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
Messages
6,828
Country
germany
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?
 
Messages
65
Country
us-massachusetts
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.
 
Messages
1,564
Country
thailand
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
 
Messages
701
Country
australia
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.
 
Messages
65
Country
us-massachusetts
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
Messages
6,828
Country
germany
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.
 
Messages
65
Country
us-massachusetts
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
Messages
6,828
Country
germany
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
 

Heretic

Resource contributor
Messages
6,828
Country
germany
That looks much easier to implement than the example on the Wikipedia article.
 

Heretic

Resource contributor
Messages
6,828
Country
germany
Found a better one by mere chance.

rcompass.jpg
 
Top