Board index FlightGear Development New features

A METAR robot for FG MP ?

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

A METAR robot for FG MP ?

Postby reeed » Thu Jul 15, 2010 9:30 am

Out there on the FG IRC channel #fg_cantene in the past couple weeks, there's been an IRC robot that responds to commands like !wx, !metar, !aptinfo and responds with latest weather (from Google), latest METAR for a specified ICAO airport code (courtesy of NOAA), and airport info (runways, ILS freq).

A similar bot could be made for FG's multiplayer network. However there are technical limitations:

1. The bot would respond on the broadcast channel, since FG MP lacks private comms capability.

2. The bot has to be within 100 NM to receive a request from a pilot.

If the bot uses the 'obs' callsign, it can receive requests from all over the FG world, but it then loses its voice -- FGMS filters out data packets (including chat messages) from 'obs' clients.

One workaround is for the bot to receive special status from FGMS, such that it can receive globally and yet respond like a normal client (100 NM transmission radius).

What do you think, people?
reeed
 
Posts: 179
Joined: Sat Dec 12, 2009 5:21 am
Location: Singapore
Callsign: SQC7294

Re: A METAR robot for FG MP ?

Postby Hooray » Thu Jul 15, 2010 6:06 pm

Well, I am also having a hard time coming up with ideas how to circumvent these limitations.

At the moment, I also think that simply patching fgms and asking all admins to update their fgms version, would be the easiest solution.

On the other hand, how and where would you want to run your bot?
There are some very real DoS scenarios possible...do you want to connect to the server as another client?

If the bot shall not respond using the global chat channel, one could instead use a custom generic text/string property, which clients could also select to ignore locally.


This would be really a piece of cake if fgms itself was implemented in Nasal, that way one could simply add another "bot" function for such purposes and even run the whole thing on the server side.
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: 12185
Joined: Tue Mar 25, 2008 8:40 am

Re: A METAR robot for FG MP ?

Postby Gijs » Thu Jul 15, 2010 6:29 pm

What exactly would be the purpose of a MP bot? If I am not on MP, but still want to search for METARs, then wat? METARs area already retrieved/displayed in the Weather Scenario box in FlightGear. It should be much easier to extend that with a search function for other than the current airport. Atleast easier than a MP-bot...
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9377
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: A METAR robot for FG MP ?

Postby reeed » Thu Jul 15, 2010 11:26 pm

No Gijs, not easier. METAR retrieval is hardcoded in C++; I dont want to touch that. Much easier to write a bot in Nasal/python/Tcl/your-favorite-script. :-)

Remember, Nasal exists so that common folk can contribute to FG without knowing C++.

Why a MP bot? Because it's something that can be extended to include other data services, eg an ACARS bot. VAs will find it extremely useful to autolog pireps, for example.

Bottom line is, FG needs a private comms facility.
reeed
 
Posts: 179
Joined: Sat Dec 12, 2009 5:21 am
Location: Singapore
Callsign: SQC7294

Re: A METAR robot for FG MP ?

Postby Hooray » Fri Jul 16, 2010 12:17 am

in C++; I dont want to touch that. Much easier to write a bot in Nasal/python/Tcl/your-favorite-script.


It depends also on how you want to connect the bot to the MP network.
At the moment, Nasal doesn't really have any network bindings (i.e. not socket support).
And scripts that are not to run within fgfs (i.e. separately) would inevitably either need to have networking support, or be run directly by the server.

I think, patching fgms to provide support for private comms would not be all that difficult actually.
It would be sufficient to maintain a list of clients along with client IDs, and then send chat messages only to clients that are addressed using their ID.
I suppose we could even add that in a backward compatible fashion.

Are you familiar with C++? Do you know how to do implement such an enhancement?
I don't think such a patch would need to be particularly big.
Let me know if you need some more pointers.

The other possibility would be to get in touch with the fgms maintainer and see if he likes your idea or not.
The wiki also contains a number of feature requests for the MP protocol, I don't know if private comms have previously been requested or not, but I can see that it would indeed make sense for some situations. Servers could also send client-specific messages using that facility.
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: 12185
Joined: Tue Mar 25, 2008 8:40 am

Re: A METAR robot for FG MP ?

Postby ethan3391 » Fri Jul 16, 2010 12:34 am

This is an interesting idea. It would be neat to have it work like an airport weather radio. Just make it only transmit on a specific channel, and tag a robotic voice to it. This could increase the realism of the simulation.
What one fool can do, another can. (simian proverb published in the book, Calculus Made Easy by, Silvanus P. Thompson)
ethan3391
 
Posts: 183
Joined: Fri Jul 04, 2008 11:21 pm
Location: Ga, USA

Re: A METAR robot for FG MP ?

Postby reeed » Fri Jul 16, 2010 4:16 am

yes an ATIS service -- but you can already get this in FG (does it work?)
reeed
 
Posts: 179
Joined: Sat Dec 12, 2009 5:21 am
Location: Singapore
Callsign: SQC7294


Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest