Jump to content
The simFlight Network Forums

TrafficLook and I have problem to read MP-Com1 frequency


Recommended Posts

Hello Pete,

 

 

and thank you very much for FSUIPC as well as for outstanding support to the community.

 

Currently I'm working on a small ATC-Client for a group of enthusiasts, flying together using the FSHostClient/Server system.

So far I've been able to figure out 98% of what is needed in my opinion.

Now I stuck on a (I suppose) more or less simple problem which I could also reproduce in your TrafficLook (also thanks for that handy tool).

 

Actually I'd try to read from the AIPlaneInfo (FSUIPC-SDK) for each of the MP-Planes amongst other info the Com1 frequency.

For some reason It is always and for all connected MP-planes 124.85MHz.

 

 

The code of interest (it's in VB.net):

 

 

    Public Sub FsxListRefresh()                                                      ' =======>> Is kept running by a timer-tick. This fuction fetches the AI-traffic data
        If AiListUpdate Then                                                              ' =======>> AiListUpdate is bool and set 'active' when my program is connected to FSUIPC/FSX
            Me.lstFSXoriginalAI.Items.Clear()                                      ' =======>> My List of "collected data" for all MP-planes 
            For Each Plane As AIPlaneInfo In FSUIPCConnection.AITrafficServices.AllTraffic ' ========>> get all the AI-Info that is available in general
                If AiListUpdate Then Me.lstFSXoriginalAI.Items.Add(Plane.ID & "Com1String:" & Plane.Com1String & "Alt:" & Math.Round(Plane.AltitudeDifferenceFeet, 0) & " Com1:" & Plane.Com1.ToString)  ' ========>> fill the list
            Next ' ========>> ... and the next one please ;-)
            End If
    End Sub

 

 

This runs flawless so far.

When setting a break point at the "NEXT"-line I can move the mouse over the "Plane." and read out a lots of data of the currently handled plane.

 

When usin FSX's own AI Traffic the COM1 frequencies are different there and they change for the individual AI-planes as they "change their ATC-controller".

 

But for FSHost-connected multiplayer the COM1 frequency never changes. It is 124.85 and lasts so. Even when closing all (my prog., FSHost, FSX) and restarting all again.

 

From the simconnect.log which I've dumped during a recent session I see that FSHostClient is used to set up this:

> 81.49807 [190, 64]AddToDataDefinition:DefineID=2, DatumName="COM ACTIVE FREQUENCY:1", UnitsName="Frequency BCD16", DatumType=1, fEpsilon=0.000000, DatumID=21 

as a part of the traffic-communication-data-set in its "MP-session".

When FSX is running normally then this is executed acc. simconnect.log: 86.08197 [190] ObjectData: RequestID=0  DefineID=2  dwSize=216

 

As far as I can see (actually I'm not that good a programer, so may be "guess" is more acurate desription of what I do ;-) the COM1 frequency is transmitted amonst other data.

And this is what I couldn't get solved. "COM_ACTIVE_FREQUENCY:1" is used from both AI and MP (FSHostClient) as far as I could figure out.

 

May be you could give me a hint on where my mistake is?

 

I hope my explanation was clear enough. Otherwise I'd be glad to supply more/other information.

 

Thank you in advance,

JayCee

 

 

 

 

Link to comment
Share on other sites

Sorry, I am confused. I'm not in a position to check VB code as I don't know VB and especially not VB.Net -- maybe Paul Henty can help there. But are you saying the all the true AI aircraft give you correct and changing COM frequencies but MP aircraft do not?

 

Actually I wasn't even aware that SimConnect supplied FSUIPC with data on MP aircraft. In FS9 there was no way -- the MP aircraft only got into FSUIPC's TCAS tables thanks to programs like AIBridge injecting the data directly.

 

If SimConnect is actually supplying MP data, then FSUIPC is unaware of any differences -- they are all treated alike, so if the COM frequency appears to remain fixed at one value I fear it must be a SimConnect problem.

I'm afraid I know nothing about MP at all and have never used anything which supplied any.

 

Regards

Pete

Link to comment
Share on other sites

Hello Pete,

 

Sorry, if it sounded as if I'd like you to check my code. I know that your from the "C" community and didn't excpect you to do so.

It was listed for explanation with comments attached to each relevant line to support the understanding.

 

And yes, you understood right. The AI-COM-Frequencies are correct and the MP-COM-frequencies not. Strange, or?

Anyways, my code snippet itself seems to work correct. It simply doesn't know how to behave to please me.

(I've got to have a seriuos talk to the programmer on this and make him "pimp my code" ;-)

 

But I'll pick up your suggestion to contact Paul Henty on my topic.

As said, I'm not a hard-core-programmer but patient. May be with Pauls DLL I created sth. like an "AI-Plane-class" where my program gets the data from.

This would be apart from FSUIPC, obviously.

 

As far as I know SimConnect has some support for MP.

(Can't place the screenshot here...) -> http://screencast.com/t/LrZ4xh7OB -> Screenshot from the SimConnect-SDK Variables list.

I already bothered Russell Gilbert from FSHost. May be he has sth. for me.

 

Thank you for your time and support,

 

Regards,

JayCee

 

EDIT: May be you can move this to Pauls section of the board? Or shall I "double post" this issue myself? Thx. ;-)

Edited by JayCee
Link to comment
Share on other sites

Hi JayCee,

 

I think the simplest explanation for this is that the FSHostClient program isn't transmitting the local com frequency to the server. It's probably not something they thought of doing. If that's the case then there's no way FSUIPC (and therefore my DLL) could pick it up. I suggest getting confirmation from Russell about this first.

 

Paul

Link to comment
Share on other sites

Hello Paul, hello Pete,

 

and thanks for your reply.

 

Finally I think I figured out the "what" and "why".

There are at least two points coming together.

 

First is: "COM ACTIVE FREQUENCY:1" is according to SimConnect documentation of the "read-only" type. Thus if anyone wants to communicate users/players COM1-frequencies... NOT this way. This variable is used by FSX's internal AI-logic. Exclusive. This alone is reason enough not to be usalbe by any programmers tools or add-ons.

 

Secondly we've to think around some corners:

When setting up software for MP communication... The actual user is always NOT any kind of AI. It is always a "normal" player. Thus obviously his COM1-frequencies are impossibly to be assigned to AI-Information on the actual players local FSX. Subsequently the information which is "spread" to the others can not contain his frequencies in any AI-Information.

 

Well, becoming aware that it is not possible is also a final state of knowledge, although it is not realy satisfying.

 

Thanks to all of you for spending time and thoughts on my issue.

 

Until next time and (unfortunately) RESOLVED ;-)

 

JayCee

Edited by JayCee
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.