FGAIS: Difference between revisions

Jump to navigation Jump to search
2,210 bytes removed ,  3 November 2012
m
→‎Design: depreciated
No edit summary
m (→‎Design: depreciated)
Line 284: Line 284:
* don't send positions but derivative information and compute positions at the client side (also requires changes in fgfs)
* don't send positions but derivative information and compute positions at the client side (also requires changes in fgfs)
* change the aircraftToPath methods to std::map<std::string ref, std::string path> Example: aircraftRef["B772"] = "AI/Aircraft/777/777-200ER-set.xml";
* change the aircraftToPath methods to std::map<std::string ref, std::string path> Example: aircraftRef["B772"] = "AI/Aircraft/777/777-200ER-set.xml";
== Design ==
Thinking about it, the best option would probably be forking fgms and implementing this as part of a custom fgms fork - that way, it could be either configured as a relay by existing servers, or simply used as an additional MP server at the client-side, so that the MP system in FG would only need to support multiple concurrent fgms connections to different servers. That way, we wouldn't be overloading the main fgms network, but just have an additional network of fgms servers that use real traffic feeds
So it would make sense to start moving the implementation to the fgms side of things - and away from the client.
That would allow us to have a single fgms instance, just for aircraft/vessel traffic - without doing all the parsing at the client side.
I agree with your point of view. As you said the good solution is to use fgais like a server and not like a client in order to limit the number of request to the provider.
I think that the good solution is :
* fgais should send request to the provider every 20 seconds (the provider send new aircraft position every 20 seconds, if you send a request every 5 seconds you receive exactly the same result 4 times)
* fgais should calculate the move of each aircraft in order to interpolate/calculate the position between each request to the provider. (We receive "real" position of aircrafts every 20 seconds but we calculate the new position every 4 seconds = 5 "fictive" position for 1 "real" position.
* fgais should be able to send aircraft position only in area of the user (need to receive position of the client and calculate the "out of range" limit. This should be easy to use fgms implementation)
* fgais should be able to send aircraft position as AI traffic instead of MP traffic (need to create a new "Magic Header" like it's already done in fgms for relay/tracker and add a filter in flightgear in order to make the difference between AI traffic and MP traffic.
I agree that the fgais <-> fgms <-> FG achitecture makes sense.
I had a look at the fgais and fgms code last night. Combining them into an fgais server that's MP aware and only sends data for aircraft in the area of MP aircraft looks pretty straightforward.


== Documentation ==
== Documentation ==

Navigation menu