Alberico Family > Jim Wilson did a good job of pointing me in the right direction toward > making views attached to players in a multiplayer scenario. > > I attack it today and made good progress, but remain bogged down by the > transformations required. Bottom line is I need to take the 4x4 player > position matrix and convert that to what is needed by the view properties > (lat/lon/alt, etc.) The objective is to dynamically alter custom view(s), > based on player positions(/orientation). > > A 2-part question, with hopes no one has to spend much time answering: > 1.) Can someone point me to a good writeup on the details of the various > coordinate systems and transformations in FG? (sorry: I'm sure that's > been > asked many times) > 2.) Is there a utility method existing somewhere in the code already to do > these specific transformations? It seems unlikely this is the first time > someone is interested in taking the player positions and converting them > to > lat/lon/alt. > > Thanks in advance. Maybe this will all become clear to me after tomorrow > morning's coffee(s). <sigh>
Look in src/AIModel/AICarrier.cxx - there are several examples of conversions from Cartesian co-ordinates to geodetic and vice versa. There are a wide range of utilities in simgear/math.cxx. The comments are in the most part self-explanatory, so you will probably find what you need there. Hope you succeed - we really need this one. Vivian _______________________________________________ Flightgear-devel mailing list [email protected] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
