Hi, I used to use a map view to help me find my way around the world of flightgear (sort of a mini-Atlas, which I have difficulty building on mac os x).
About a year ago, I lost the preferences.xml with the new view and have been sporadically trying to recreate it. I happened to notice via google that Andy mentioned adding Drop View to the a-10. Drop View works great, but I'd like to have a more general version that I could use with any aircraft. (At the moment I am flying the a-10). I read the help from <http://www.flightgear.org/Docs/fgfs-viewer- howto.html> but am still having some problems. I didn't see anything on the wiki. ----------------- problem with scrolling views related to a-10- set.xml when number of views in preferences.xml is increased As I read it (I may be wrong 8-(), a-10-set.xml is hardcoded to assume 6 views and force adds a 7th (which corrupts any 7th view a user has already added in preferences.xml I was unable to correctly scroll through views with v/V (I could scroll forward with v, but it would skip Cockpit view, and I had trouble moving backwards witih V also). I can fix this problem by changing the hard coded number of views in a-10-set.xml from 7 to 8 as follows: line 27: <number-views type="int" archive="y">8</number-views> After this change, I can at least scroll properly between the 7 views (6 + my map view) in preferences.xml + the a-10 view, both forwards and backwards. my view logic is still messed up however ;-) However, I don't think that I've fixed this properly. Question 1: Is there a way to increment the number of views in a-10- set.xml rather than hardcoding it to a certain value? I thought at one point that someone (Melchior?) had mentioned the need to remove <number-views type="int">7</number-views> from preferences.xml and just walking the chain of views in the preferences.xml file to count them but I'm not sure where in the FlightGear projects this change would need to be made. --------------------- problem with my screwed up map view I was also hoping to have a version of Map View (like Andy's Drop View) that could be used with other aircraft also. I would like to have a drop down (look at) view that follows the plane from some height (2,000, 4,000, 15,000, or 25,000 feet) to show the area around the plane. If I go into Andy's Drop View with the a-10 and modify it: I increased the number of views in my preferences.xml to 7: <number-views type="int">7</number-views> and added the following view: <!-- ************************************************************************ modified from Drop View in andy's a-10-set.xml file ************************************************************************ --> <view n="7"> <name>MAP View</name> <type>lookat</type> <map-altitude-ft type="double">5000</map-altitude-ft> <config> <from-model type="bool">false</from-model> <from-model-idx type="int">0</from-model-idx> <eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path> <eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path> <eye-alt-ft-path>sim/view[7]/map-altitude-ft</eye-alt-ft-path> <!-- <eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path> --> <eye-roll-deg-path>/position/roll-deg</eye-roll-deg-path> <eye-pitch-deg-path>/position/pitch-deg</eye-pitch-deg-path> <eye-heading-deg-path>/position/heading-deg</eye-heading-deg- path> <at-model type="bool">true</at-model> <at-model-idx type="int">0</at-model-idx> <ground-level-nearplane-m type="double">0.5f</ground-level- nearplane-m> <default-field-of-view-deg type="double">55.0</default-field- of-view-deg> <x-offset-m type="double">0</x-offset-m> <y-offset-m>0</y-offset-m> <z-offset-m type="double">0</z-offset-m> <!-- Please see <http://www.flightgear.org/Docs/fgfs-viewer-howto.html> --> PROBLEM: this view ALMOST works, but it spins and gyrates around about 45 degrees as if two views are quickly swapping themselves when the plane is sitting on the runway (haven't tried flying while this is going on ;-)). Question 2: Does anyone know why this problem occurs and how to fix it? 8-( Question 3: Incidentally, is there a way to do this view so that the eye is always x number of feet above the plane? Right now I think I'm setting the eye at a specific height, which the plane could of course fly above). I'm having trouble understanding the drop view xml, especially the sim/view[6] portions of a-10-set.xml. I'm not sure where these values are set or if they somehow come from: /position/... portions of the property tree via inheritance or some other mechanism If I change altitude-ft to 5000 in sim/view[6] with the a-10 on the runway while using Drop View, I get something very similar to what I want, but only for the a-10. --- drop view portion xml which adds 7th view from a-10-set.xml --- <view n="6"> <name>Drop View</name> <type>lookat</type> <config> <eye-lat-deg-path>sim/view[6]/latitude-deg</eye-lat-deg-path> <eye-lon-deg-path>sim/view[6]/longitude-deg</eye-lon-deg-path> <eye-alt-ft-path>sim/view[6]/altitude-ft</eye-alt-ft-path> <eye-roll-deg-path>sim/view[6]/roll-deg</eye-roll-deg-path> <eye-pitch-deg-path>sim/view[6]/pitch-deg</eye-pitch-deg-path> <eye-heading-deg-path>sim/view[6]/heading-deg</eye-heading- deg-path> <at-model type="bool">true</at-model> <at-model-idx type="int">0</at-model-idx> <ground-level-nearplane-m type="double">1.0f</ground-level- nearplane-m> <default-field-of-view-deg type="double">8.0</default-field- of-view-deg> <x-offset-m type="double">0</x-offset-m> <y-offset-m type="double">0</y-offset-m> <z-offset-m type="double">0</z-offset-m> <target-z-offset-m archive="y" type="double">8.0</target-z- offset-m> </config> </view> ---- Lastly a couple of questions about the pui? property browser. Question 4: If I set a variable to the contents of a variable like this: <eye-alt-ft-path>sim/view[7]/map-altitude-ft</eye-alt-ft-path> the property browser seems to consider eye-alt-ft-path to be a string from that point on, even if I type a number in the browser entry box. How can I change the type? Question 5) Is there a way to make a number a number (or a bool a bool) when typing in the property browser entry box so that the variable will be redefined, instead of just having it a string? Question 6) Also, once I open the browser window I can't get rid of it (just move it off the screen). Is there a way to close it? Question 7) I can't set sim/view[6]/altitude-ft to sim/view[7]/map- altitude-ft via the property browser (altitude-ft in view[6] is just set to 0). do I need to export my variable from view[7] somehow? I am using last week's cvs plib, simgear, flightgear and flightgear data (WITHOUT OSG) on mac os x (10.4) Sorry for all the questions, I'm very grateful for any suggestions that anyone can make... Thank you all for your patience and your work with the flightgear project! Best regards, Ima ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel