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 10: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 6:10 pm

Re: Displaying additional aircraft on certain position

Postby Thorsten » Mon Sep 03, 2018 11:08 am

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: 10231
Joined: Mon Nov 02, 2009 8:33 am

Re: Displaying additional aircraft on certain position

Postby wlbragg » Mon Sep 03, 2018 6: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(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4413
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Displaying additional aircraft on certain position

Postby wkitty42 » Mon Sep 03, 2018 6: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: 5020
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Displaying additional aircraft on certain position

Postby Hooray » Wed Sep 05, 2018 6: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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: Displaying additional aircraft on certain position

Postby hofiisek » Thu Sep 06, 2018 5: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 6:10 pm


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests