Board index FlightGear Development Aircraft

Cockpit view problems

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

Cockpit view problems

Postby wlbragg » Mon Jul 03, 2017 8:48 am

I'm having trouble with the AirCrane cockpit views.
One problem is I can't get it to cycle through the views correctly. It starts at 0 but cycles through to 10 and then back to 1, skipping 0. I have checked and double checked the view definitions against a few other aircraft and don't see anything wrong. I can set the current-view-number to 0 and that works, but it wont cycle to 0.

The other issue is I am getting weird views for model and flyby. I have seen these strange views on other aircraft but I could say which ones or if they were the same view assignment.

I'm hoping someone will see something I am overlooking or knows what the issue might be.

Current code for the views
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>

  <chase-distance-m type="double" archive="y"> -30 </chase-distance-m>

  <view n="0">
    <internal type="bool" archive="y">true</internal>
    <config>
      <x-offset-m archive="y" type="double">  0.520 </x-offset-m> <!--right-->
      <y-offset-m archive="y" type="double"> -1.091 </y-offset-m> <!--up-->
      <z-offset-m archive="y" type="double"> -8.668 </z-offset-m> <!--back-->
      <pitch-offset-deg type="double"> -15 </pitch-offset-deg>
      <default-field-of-view-deg> 60 </default-field-of-view-deg>
    </config>
  </view>

  <view n="100">
    <name>Passanger Seat View</name>
    <type>lookfrom</type>
    <internal archive="y">true</internal>
    <config>
      <!--dynamic-view type="bool">true</dynamic-view-->
      <from-model type="bool">true</from-model>
     <from-model-idx type="int">0</from-model-idx>
      <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
      <x-offset-m archive="y" type="double"> -0.520 </x-offset-m> <!--right-->
      <y-offset-m archive="y" type="double"> -1.091 </y-offset-m> <!--up-->
      <z-offset-m archive="y" type="double"> -8.668 </z-offset-m> <!--back-->
      <pitch-offset-deg type="double"> -15 </pitch-offset-deg>
      <default-field-of-view-deg> 60 </default-field-of-view-deg>
    </config>
  </view>

  <view n="101">
    <name>Crane Seat View</name>
    <type>lookfrom</type>
    <internal archive="y">true</internal>
    <config>
      <!--dynamic-view type="bool">true</dynamic-view-->
      <from-model type="bool">true</from-model>
     <from-model-idx type="int">0</from-model-idx>
      <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
      <x-offset-m archive="y" type="double"> -0.575 </x-offset-m> <!--right-->
      <y-offset-m archive="y" type="double"> -1.665 </y-offset-m> <!--up-->
      <z-offset-m archive="y" type="double"> -7.735 </z-offset-m> <!--back-->
      <pitch-offset-deg type="double"> 0 </pitch-offset-deg>
      <default-field-of-view-deg> 60 </default-field-of-view-deg>
      <heading-offset-deg type="double">180</heading-offset-deg>
    </config>
  </view>

  <view n="102">
    <name>Tail Camera View</name>
    <type>lookfrom</type>
    <internal archive="y">true</internal>
    <config>
      <from-model type="bool">true</from-model>
      <from-model-idx type="int">0</from-model-idx>
      <ground-level-nearplane-m type="double">0.01f</ground-level-nearplane-m>
      <x-offset-m archive="y" type="double">  0.000 </x-offset-m> <!--Right-->
      <y-offset-m archive="y" type="double">  1.801 </y-offset-m> <!--Up-->
      <z-offset-m archive="y" type="double"> 10.637 </z-offset-m> <!--Back-->
      <pitch-offset-deg> -5 </pitch-offset-deg>
      <default-field-of-view-deg type="double"> 30 </default-field-of-view-deg>
    </config>
  </view>

</PropertyList>


These are the strange views for
Flyby view=6
Image

Model view=7
Image
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit view problems

Postby sanhozay » Mon Jul 03, 2017 9:45 am

Have you got the compensate view for wide screens set?

If so, what happens if you uncheck that option and restart Flightgear?

I think the default field of view tag is the problem. Without a type defined, and with spaces inside the tag, the number is interpreted as a string and you get problems like this.
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Cockpit view problems

Postby wlbragg » Mon Jul 03, 2017 12:17 pm

Interesting, "compensate view for wide screens" was the cause for the strange view modes but not the rolling back to view = 0. I tried type defining all the tags and removing the spaces but it still wont go back to 0.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit view problems

Postby sanhozay » Mon Jul 03, 2017 1:17 pm

I expected it to fix the strange views but the inability to cycle through view zero is a new one on me.

Does this work?

Code: Select all
  <view n="0">
    <name>Cockpit</name>
    <type>lookfrom</type>
    <internal type="bool">true</internal>
    <config>
      <x-offset-m type="double"> 0.520</x-offset-m>
      <y-offset-m type="double">1.801</y-offset-m>
      <z-offset-m type="double">10.637</z-offset-m>
      <pitch-offset-deg>-5</pitch-offset-deg>
      <field-of-view type="double">30.0</field-of-view>
      <default-field-of-view-deg type="double">30.0</default-field-of-view-deg>
      <from-model type="bool">true</from-model>
      <from-model-idx type="int">0</from-model-idx>
    </config>
  </view>

Have you looked under "/sim/view[0]" in the property tree to see what it's doing?

wilbragg wrote:I have seen these strange views on other aircraft but I could [not] say which ones

It's pretty much everything from Helijah's hangar because they have the same default field of view tag with no type and spaces. I did email him about it.
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Cockpit view problems

Postby wlbragg » Mon Jul 03, 2017 8:10 pm

Thanks for the help @sanhozay

The issue is "/sim/view[0]"/enabled is set to false.
As soon as I set that to true it works and cycles through back to 0. So I guess I need to do some code searching and figure out where or why that is being set to false.

Thanks again for your help.

Late edit:
It is really nice to have these views back. The code had several useful views coded but commented out. I am restoring those views. The "Crane Operator View" will be really nice to have once there is a working auto hover or position hold of some sort. Plus it is really nice to have a "Cockpit View".

The AirCrane has long been my favorite helicopter. I really like the FDM on it and how easy it is to control. Perfect for equipping it with optional features like Bambi-bucket and cargo towing. My eventual goal is to make it fully functional for these things and also get all the instrumentation installed.

The other thing I would really like to see is a JSBSim version of the FDM. Mainly for the ability to use all the coding feature you get with JSBSim. As is, the YASim FDM is really user friendly though and in my opinion, really well done.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit view problems

Postby wlbragg » Tue Jul 04, 2017 9:56 pm

The issue is "/sim/view[0]"/enabled is set to false.


Really strange, once I manually set this value to true the views are working appropriately. I'm confused as to how that ever got set to false and why a clearing of the aircrafts cached data didn't resolve it? Now that I manually set it to true, "one time", even a restart keeps it true. I guess I don't understand the whole cache system of FG.

One other question I have is, what is the difference between dynamic view and not dynamic view in regards to the view management?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit view problems

Postby wkitty42 » Tue Jul 04, 2017 10:57 pm

a static view would be the same all the time, AFAIK... a dynamic one would change...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Cockpit view problems

Postby wlbragg » Tue Jul 04, 2017 11:55 pm

Well what doest that mean in the context of the view code, ie:

Code: Select all
<view n="100">
    <name>Passanger Seat View</name>
    <type>lookfrom</type>
    <internal archive="y">true</internal>
    <config>
      <!--dynamic-view type="bool">true</dynamic-view-->
      <from-model type="bool">true</from-model>
     <from-model-idx type="int">0</from-model-idx>
      <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
      <x-offset-m archive="y" type="double"> -0.520 </x-offset-m> <!--right-->
      <y-offset-m archive="y" type="double"> -1.091 </y-offset-m> <!--up-->
      <z-offset-m archive="y" type="double"> -8.668 </z-offset-m> <!--back-->
      <pitch-offset-deg type="double"> -15 </pitch-offset-deg>
      <default-field-of-view-deg> 60 </default-field-of-view-deg>
    </config>
  </view>


What does enabling the commented out "dynamic-view" tag actually do?

Is it maybe you can't use the mouse to change that view when in it or something else?

I haven't actually tested it.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit view problems

Postby Johan G » Sun Aug 06, 2017 9:58 am

IIRC the dynamic view is when it is set to change due to g forces (in essence shake due to turbulence and move due to maneuvering). I think it can be enabled and disabled in the cockpit view options dialog. I might be wrong though.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Cockpit view problems

Postby wlbragg » Sun Aug 06, 2017 9:43 pm

Thank you Johan, make total sense now.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cockpit view problems

Postby jtprophet » Thu May 13, 2021 9:17 pm

Forgive me if this is regarding "piggy backing" but if I am in an aircraft and the "v" key does not function to cycle the views from cockpit view can someone tell me how to fix this please?

Thank-you,

John
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464

Re: Cockpit view problems

Postby wkitty42 » Fri May 14, 2021 12:36 am

jtprophet wrote in Thu May 13, 2021 9:17 pm:Forgive me if this is regarding "piggy backing" but if I am in an aircraft and the "v" key does not function to cycle the views from cockpit view can someone tell me how to fix this please?

first question is "which craft?"
the view change key may have been changed to another key by the devs or even disabled so you have to use a custom view selection dialog... we cannot tell anything without knowing at least the craft in question...

it would also be a good idea to tell us which FG version you are using... please write the entire version number... don't shortcut it by writing only the last two numbers...
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Cockpit view problems

Postby jtprophet » Fri May 14, 2021 3:30 am

I appreciate your quick response wkitty; I've been playing around with the A350 that hasnt been updated in awhile and also using 2020.4.0; but it turns out that one of the nightly downloads I grabbed rendered the cycling of the views including using the "x" key to zoom in and out useless; however I have an earlier version that finally worked. So I am able to fly the airplane using the autopilot from the A350XWB submenu, this one is the FGMEMBERS.

Thank-you

John
jtprophet
 
Posts: 205
Joined: Mon Apr 04, 2016 3:21 pm
Callsign: DAL1464

Re: Cockpit view problems

Postby wkitty42 » Fri May 14, 2021 4:59 pm

jtprophet wrote in Fri May 14, 2021 3:30 am:this one is the FGMEMBERS.

:( :sigh:
"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: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 19 guests