Board index FlightGear Support Interfacing

Displaying additional aircraft on certain position

Connecting two computers, using generic protocol, connecting with Matlab?

Displaying additional aircraft on certain position

Postby hofiisek » Mon Sep 03, 2018 11:47 am

Hello,

I am working on a project where I want to connect FG simulation to another flight simulation developed by me (let's call it my simulation), so that pilots in each simulation see each other's aircraft.
I am retrieving data about FG aircraft using the telnet protocol and based on retrieved position, heading and altitude of FG aircraft I am displaying graphical symbol (symbolizing FG aircraft) in my simulation. So far so good, this works.

Now, I want this to work in opposite direction as well. Based on position, heading, altitude (possibly pitch, roll, etc.) of aircraft in my simulation, I want to place/render/display an aircraft in FG simulation. The pilot of FG aircraft should see the other aircraft out of the window and/or in navigation display (or in any display that displays intruder aicrafts).

As far as I know, I am able to change almost every internal variable using the telnet/generic protocol, however, I have not found a way how to place additional objects in the scene yet.
Is there even a possibility to do this?

Thanks in advance!
hofiisek
 
Posts: 4
Joined: Fri Aug 10, 2018 7:10 pm

Re: Displaying additional aircraft on certain position

Postby Thorsten » Mon Sep 03, 2018 12:08 pm

What if you just send your position via the FG Multiplayer protocol? As long as the packets which come in look like FG, they're going to lead to a plane in the scenery.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Displaying additional aircraft on certain position

Postby wlbragg » Mon Sep 03, 2018 7:00 pm

Or use your telnet protocol to trigger a pre-installed nasal script to utilize the existing aircraft via AI or MP handlers or any other kind of custom handler you might design. Seems like the MP idea would be relatively simple to pull off though and most of the work has already be done for you.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Displaying additional aircraft on certain position

Postby wkitty42 » Mon Sep 03, 2018 7:05 pm

the OP would basically need to implement the FG MP protocol in their "my simulation"... then their sim might could join others in the public FG MP environment as well as locally between sim systems ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Displaying additional aircraft on certain position

Postby Hooray » Wed Sep 05, 2018 7:22 am

Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Displaying additional aircraft on certain position

Postby hofiisek » Thu Sep 06, 2018 6:32 pm

Thanks to all for advice and sorry for late reply..

I have done some reading and I think I will go for sending position via MP protocol as Thorsten suggested.
hofiisek
 
Posts: 4
Joined: Fri Aug 10, 2018 7:10 pm


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 4 guests