Thanks Melchior,

The Target View works totally fine now, although I didn't really understand
for what I need the geo.elevation() function. I have to admit that I have
never used Naval before and I am not really sure, how to implement what you
were talking about. So far my waypoints are all around KSFO, so the ground
elevation is almost sea level. For this it works fine. Will I run into
problems when I have waypoints in the mountains?

I also defined the view as n=1000. Unfortunately this doesn't solve my
problem. Somehow I managed to define a 7th view with my try and error
method. So view.nas always gives me an error message when I start FG. I
uninstalled and reinstalled FG already to get a clean preferences.xml. But
this didn't solve the problem. I am really clueless. How can there be a view
n=7, if I use a fresh installation of flightgear?

If I change the parameter in view.nas to 7, FG doesn't give me an error
message. But then, when I switch between the views in FG, I get a black
messed up view after the 6 original views and an error message in the
command line. How have I been able to mess up FG, when I only changed
preferences.xml and undid all my changes?


Thanks,
Hannes

-----Ursprüngliche Nachricht-----
Von: Melchior FRANZ [mailto:mfr...@aon.at] 
Gesendet: Donnerstag, 14. Mai 2009 09:52
An: flightgear-users@lists.sourceforge.net
Betreff: Re: [Flightgear-users] defining target view for waypoints

* Hannes Schweikl -- Tuesday 05 May 2009:
> I am trying to define an additional view which is looking from the current
> aircraft position to the waypoint (lon,lat)@ground-elevation the aircraft
is
> approaching.

Try this:

  <view n="1000">
    <name>Target View</name>
    <enabled type="bool" userarchive="y">true</enabled>
    <type>lookat</type>
    <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>/position/altitude-ft</eye-alt-ft-path>
      <at-model type="bool">false</at-model>
      <at-model-idx type="int">0</at-model-idx>
 
<target-lat-deg-path>/autopilot/route-manager/route/wp/latitude-deg</target-
lat-deg-path>
 
<target-lon-deg-path>/autopilot/route-manager/route/wp/longitude-deg</target
-lon-deg-path>
      <target-alt-ft-path>/position/ground-elev-ft</target-alt-ft-path>
      <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>
      <ground-level-nearplane-m
type="double">10.0f</ground-level-nearplane-m>
      <default-field-of-view-deg
type="double">55.0</default-field-of-view-deg>
    </config>
  </view>

Obviously, the ground elevation is a problem. It's the aircraft's, not the
target point's. You can use Nasal's geo.elevation() function to determine
that. A view handler could update it whenever necessary.



> I added these lines to preferences.xml. After adding that, I had to change
> line 530 in view.nas to: if (index > 7 and index < 100) in order to get
rid
> of a nasal error caused by the increased # of views. I am not sure, if
that
> is the way to go to.

No, as Ron wrote already, the first 100 views are reserved. (It was
necessary
to enforce that, as people wouldn't respect it otherwise, and that would
cause
lots of work later. Been there, done that.) Aircraft use views with indices
100++, but higher numbers are free for local extensions. Let's say >=1000.

m.

----------------------------------------------------------------------------
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Flightgear-users mailing list
Flightgear-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-users


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Flightgear-users mailing list
Flightgear-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-users

Reply via email to