Tu-134LK Version: 2.1 (Development for Flightgear)

in #utopian-io5 years ago

Repository

https://github.com/HerbyW/Tu-134LK

Introduction

FlightGear (http://www.flightgear.org) is an open source flight simulator that is even used in flight schools to train basic maneuvers, radio communication and navigation tasks. It is available for windows, mac and linux.

In this article I want to go through my latest commit (https://github.com/HerbyW/Tu-134LK/commit/5445e38c3768fa035a9075bec708785f76f89c43) to further improve the development of the Tupolev 134-LK, the Cosmonaut training version of this aircraft.

New Features

New taxi and landing lights

FlightGear has two different light systems and therefore it is important to implement both in the model. In Blender I made the cones and textures for each of the 4 lamps. On the right side you see all elements which then are animated in a xml-file (https://github.com/HerbyW/Tu-134LK/commit/5445e38c3768fa035a9075bec708785f76f89c43#diff-336dc874ed8fc34a4cd8977b7341b619).

Screenshot_20190503_150500k.png

Screenshot_20190503_150259k.png

Conditions are used to select the elements in the right way:

<condition>
    <and>
      <not>
        <property>/sim/rendering/rembrandt/enabled</property>
      </not>
      <property>sim/multiplay/generic/int[9]</property>
      <less-than>
        <property>sim/multiplay/generic/float[2]</property>
        <value>5</value>
      </less-than>
      <greater-than>
        <property>sim/multiplay/generic/float[2]</property>
        <value>-0.1</value>
      </greater-than>
    </and>
</condition>

Rotate and translate animations are used to extend the lamps, this animation moves one lamp 38 cm to the right:

<animation>
      <type>translate</type>
      <object-name>landinglamp1</object-name>
      <object-name>spot_glass1</object-name>
      <object-name>spot_glass1.001</object-name>
        <property>sim/multiplay/generic/int[10]</property>
      <factor> 0.38 </factor>
      <axis>
          <x> 0 </x>
          <y> 1 </y>
          <z> 0 </z>
      </axis>
  </animation>

Here the landing and taxi lamps are in action. Left: rembrandt, right: normal
fgfs-20190503122441kk.png

fgfs-20190503122517kk.png

Four lamps are mounted to the body. Left: normal, right: rembrandt
fgfs-20190503122606kk.png

In flight the lamps even shine to the ground. Left: rembrandt, right: normal
fgfs-20190503122831kk.png

Ground-effect for landing and emergency breaking

The next step was to implement the touch down effect on the runway. Smoke and black stripes as in real life. (https://github.com/HerbyW/Tu-134LK/commit/5445e38c3768fa035a9075bec708785f76f89c43#diff-d2d55d176b76435214fffdc0caf0cf74 and following).
fgfs-20190503130126kk.png
The property: sim/multiplay/generic/float[18] is calculated in nasal/setprop.nas and checks if the aircraft is in the moment of landing. In this case it is set to 1 for 0.3 seconds and then changes to 0 in 0.3 seconds.

interpolate("/controls/gear/runway", 1 , 0.3, 0 , 0.3);

The animation is active only in a small window form 0.45 to 1:

<condition>
      <greater-than>
      <property>sim/multiplay/generic/float[18]</property>
      <value>0.45</value>
      </greater-than>
</condition>

A very soft landing will not trigger it!

Flightrecorder update

All of the new functions are also recorded now. (https://github.com/HerbyW/Tu-134LK/commit/5445e38c3768fa035a9075bec708785f76f89c43#diff-68668c93f977a9942b00e0ef4f574c60)

Some smaller updates

The engine smoke, navigation lights and electrical systems got some small adjustments to make it more realistic.

New version number

The new number is 2.1, it is transmitted over the multiplayer layout, so that I know what version my colleges are flying. It is set as generic property in Tu-134LK-base.xml:

<string n="1" type="string" alias="/sim/model/tu134/version"/>

Roadmap

Next will be the further improvement of the interior in the glass nose, and the implementation of an system to make the zero gravity flights possible.

How to contribute?

Pull request to my github repository or direct contact via Mumble FlightGear Chat.

GitHub Account

https://github.com/HerbyW
It contains my real name, my git username, my steemit username and my callsign in the multiplayer.

Sort:  
  • Great post with lots of images, code samples and explanations of coding choices.
  • Have you considered using an intro image to brand your many flightgear contributions?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for reviewing and for the tip which I will use in the next post.

Thank you for your review, @helo! Keep up the good work!

Hey, @schamangerbert!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

This code are extremely hard for me, but it works on simulator for animation, great work.

Posted using Partiko Android

Excellent review @schamangerbert and I am sure that flying on a simulator is an excellent action!

This post has received a 15.82 % upvote from @boomerang.

Hi @schamangerbert!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.029
BTC 57956.22
ETH 3126.99
USDT 1.00
SBD 2.45