Board index FlightGear Development Aircraft

Issue with repositioning the model

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

Issue with repositioning the model

Postby Schnart » Fri Sep 14, 2007 3:57 am

I have diligently followed the user manual to rotate a DirectX model using the set, XML wrapper, and last xml file structure.


C:\Program Files\FlightGear\data\Aircraft\EasyGliderElectric-set.xml calls:

C:\Program Files\FlightGear\data\Aircraft\ EasyGliderElectric\Models\Reposition.xml:

<PropertyList>
<sim>
<model>
<path> Aircraft\ EasyGliderElectric\Models\EasyGliderElectric.xml </path>
</model>
</sim>

<offsets>
<heading-offset-deg>270</heading-offset-deg>
<z-offset-m>-1.5</z-offset-m>
</offsets>

</PropertyList>


C:\Program Files\FlightGear\data\Aircraft\ EasyGliderElectric\Models\EasyGliderElectric.xml\ which calls the EasyGliderElectric.x DirectX file.

None of this seems to work. Sometimes it simply ignores the offsets command and other times the program says it does not recognize the final xml file depending on all of my trials.

What am I doing wrong? I can send the exact files I am using.
Schnart
 
Posts: 4
Joined: Fri Sep 14, 2007 3:40 am
Location: West Hills, CA

Re: Issue with repositioning the model

Postby ajm » Fri Sep 14, 2007 7:39 am

Schnart wrote:I have diligently followed the user manual to rotate a DirectX model using the set, XML wrapper, and last xml file structure.

First tip... start off with an existing known working file, and modify it to suit your needs. I still work that way myself rather than start from scratch each time, means I'm less likely to make silly mistakes...

Now, for more specific help;

"Standard" procedure is to have a -set.xml in the top level directory, which calls a -model.xml in the Models dir. I'd personally call your reposition.xml the -model.xml and change it to be more like this...

Code: Select all
<PropertyList>
  <path>EasyGliderElectric.x</path>

  <offsets>
    <heading-deg>270</heading-deg>
    <x-m>0</x-m>
    <y-m>0</y-m>
    <z-m>-1.5</z-m>
  </offsets>

</PropertyList>


Note that the slashes in these paths should really be forward slashes (/) and there should be a lack of spaces in there too.

Anyway, my best advice is to check out some of the aircraft models already in FG and see how they're put together.

Let us know if you need further clarification with this, or (even better) if you get it working :-)

Cheers,

AJ
ajm
 
Posts: 259
Joined: Wed Dec 20, 2006 5:05 pm

Still an issue with repositioning

Postby Schnart » Fri Sep 14, 2007 8:29 pm

Thanks for yor help; but I still have an issue.

I changed the 737 default model as below (pitch = 90.2) and it did not do anything

C:\Program Files\FlightGear\data\Aircraft\737-300\Models\737-300.xml

<?xml version="1.0"?>

<PropertyList>

<path>737-300.ac</path>

<offsets>

<z-m>1.45</z-m>

<!-- <pitch-deg>0.2</pitch-deg> -->

<pitch-deg>90.2</pitch-deg>

</offsets>

Help! I am using v0.9.10 on a Windows XP Professional 2002.
Schnart
 
Posts: 4
Joined: Fri Sep 14, 2007 3:40 am
Location: West Hills, CA

Postby ajm » Sat Sep 15, 2007 2:16 pm

OK, I have no idea what you're doing wrong then! What you did certainly works perfectly well for me:

http://www.adeptopensource.co.uk/person ... ted737.jpg

Did you check from an external view? Rotating the model doesn't affect the cockpit view with one of these old style 2d panels...

Cheers,

AJ
ajm
 
Posts: 259
Joined: Wed Dec 20, 2006 5:05 pm

That works for me too; but..

Postby Schnart » Sat Sep 15, 2007 5:43 pm

Thanks again AJ. It worked for me too; but not in the preview when I select the model from the FlightGear Wizard. That seemed a bit funny but OK.

I am trying to drive FlightGear from MATLAB/Simulink. It does work. I can fly the 737 model from MATLAB and pre-rotate it using the offsets. But when I try to drive my EasyGliderElectric.x model it still does not rotate.

If you have time, I would like to send you the model code (only 605 KB). How can I do that? There appears to be no way to do it here.

Thanks again for your support!
Schnart
 
Posts: 4
Joined: Fri Sep 14, 2007 3:40 am
Location: West Hills, CA

Postby ajm » Mon Sep 17, 2007 4:27 pm

It seems that the PM function has been disabled here, which is a bit inconvenient because some of us get sufficient quantities of spam as it is and would prefer not to increase that more than necessary by spreading our email addresses about...

Either you can put it (your file) up on the net somewhere, or you can give me a shout on the flightgear IRC channel (#flightgear on irc.flightgear.org) where I am normally available late afternoon and evenings GMT.

There are plenty of other knowledgeable people there who should be able to help you equally well, too.

Cheers,

AJ
ajm
 
Posts: 259
Joined: Wed Dec 20, 2006 5:05 pm


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 2 guests