Board index FlightGear Development Aircraft

Aircraft doesn't show up in Custom view

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Aircraft doesn't show up in Custom view

Postby pepper3097 » Wed Jul 24, 2019 6:48 pm

Hi All,

I'm going through the basic steps of creating my first aircraft, and I'm having a hard time with the custom view. I chose a simple quadcopter, and because it's a bit small, the default views are too zoomed out. I've made the following -set.xml, and I'm not sure why it's not displaying in my custom view. It displays OK in the other views. Thanks for any help!

Code: Select all
<?xml version="1.0"?>
<PropertyList>
 <sim>
  <description>Generic Quadcopter</description>
  <flight-model>network</flight-model>
  <model>
    <path>Aircraft/genericQuadcopter/Models/genericQuadcopter.xml</path>
  </model>
  <view>
    <name>Quad View</name>
    <type>lookat</type>
    <internal type="bool">false</internal>
    <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>
      <eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
      <at-model type="bool">true</at-model>
      <at-model-idx type="int">0</at-model-idx>
      <x-offset-m type="double">0</x-offset-m>
      <y-offset-m type="double">0.0</y-offset-m>
      <z-offset-m type="double">-5.0</z-offset-m>
      <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
    </config>
  </view>
 </sim>
</PropertyList>
pepper3097
 
Posts: 6
Joined: Wed Jul 24, 2019 6:43 pm

Re: Aircraft doesn't show up in Custom view

Postby wkitty42 » Thu Jul 25, 2019 10:49 am

are you sure you want z to be -5 meters from the craft?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5501
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Aircraft doesn't show up in Custom view

Postby pepper3097 » Thu Jul 25, 2019 3:46 pm

Yeah, I think so. It's a quadcopter with a 450mm frame, so it's .5m square roughly. The chase view is what I like most, but it's 25m from the vehicle. I'm trying to replicate that behavior but closer.
pepper3097
 
Posts: 6
Joined: Wed Jul 24, 2019 6:43 pm

Re: Aircraft doesn't show up in Custom view

Postby Thorsten » Thu Jul 25, 2019 5:26 pm

Look at the sign in front of the number...
Thorsten
 
Posts: 10693
Joined: Mon Nov 02, 2009 8:33 am

Re: Aircraft doesn't show up in Custom view

Postby pepper3097 » Thu Jul 25, 2019 11:03 pm

Thorsten wrote in Thu Jul 25, 2019 5:26 pm:Look at the sign in front of the number...

Thanks for the thought, but negative is the correct direction. Looking at the parameters of "chase" and "helicopter", both have a z-offset of -25. I also changed it to 5 just to verify, and the aircraft still is not visible (even with rotating the camera). Any other ideas?
pepper3097
 
Posts: 6
Joined: Wed Jul 24, 2019 6:43 pm

Re: Aircraft doesn't show up in Custom view

Postby Thorsten » Fri Jul 26, 2019 6:58 am

Do a standard debug strategy - start from a view that works (take the default chase view if you like), start changing parameters to what you want to achieve, test after each change, see when it breaks, deduce the problem from there.
Thorsten
 
Posts: 10693
Joined: Mon Nov 02, 2009 8:33 am

Re: Aircraft doesn't show up in Custom view

Postby pepper3097 » Mon Jul 29, 2019 2:25 pm

Is there a better way to copy the Chase View I'm trying to mimic? I'm only trying to modify one parameter.

I'm trying to follow the instructions here
http://wiki.flightgear.org/Howto:Config ... FlightGear

and I'm adding it to the quadcopter-set.xml file I've created.
pepper3097
 
Posts: 6
Joined: Wed Jul 24, 2019 6:43 pm

Re: Aircraft doesn't show up in Custom view

Postby pepper3097 » Mon Jul 29, 2019 2:45 pm

Using the backslash button, and then viewing the parameters in /sim/current-view, I can confirm that my custom view has all the same parameters as "Helicopter view". If I set the z-offset-m to -25 in my custom aircraft view, the aircraft still does not appear.
pepper3097
 
Posts: 6
Joined: Wed Jul 24, 2019 6:43 pm

Re: Aircraft doesn't show up in Custom view

Postby pepper3097 » Mon Jul 29, 2019 3:10 pm

SOLVED!

Well, with a bit of trial and error, I tried using the setting
Code: Select all
<internal type="bool">true</internal>

and it displays the aircraft now. Not sure why that'd be the case, but I'm happy to get the result I'm looking for.

Full -set.xml is
Code: Select all
<?xml version="1.0"?>
<PropertyList>
 <sim>
  <description>Generic Quadcopter</description>
  <flight-model>network</flight-model>
  <model>
    <path>Aircraft/genericQuadcopter/Models/genericQuadcopter.xml</path>
  </model>
  <view>
    <name>Quad View</name>
    <type>lookat</type>
    <internal type="bool">true</internal>
    <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>
      <eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
      <at-model type="bool">true</at-model>
      <at-model-idx type="int">0</at-model-idx>
      <x-offset-m type="double">0</x-offset-m>
      <y-offset-m type="double">1</y-offset-m>
      <z-offset-m type="double">-5</z-offset-m>
      <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
    </config>
  </view>
 </sim>
</PropertyList>
pepper3097
 
Posts: 6
Joined: Wed Jul 24, 2019 6:43 pm


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 11 guests