Board index FlightGear Development AI Traffic

AI Aircraft beacon  Topic is solved

Intelligent, computer controlled vehicles that drive/fly over the planet!

AI Aircraft beacon

Postby jtprophet » Mon Aug 07, 2017 12:21 pm

Good morning to all,

I dont know if this has been discussed or not but generally wanted to inquire of whether or not it would possible to have the AI airplanes shown with rotating beacon(s)?

Thank-you

John.
jtprophet
 
Posts: 120
Joined: Mon Apr 04, 2016 2:21 pm
Callsign: DAL1464

Re: AI Aircraft beacon

Postby BecOzIcan » Mon Aug 07, 2017 12:59 pm

Nice idea. Technically feasible but each model will have to be updated and not a lot of us are modelling at this point.
As far as my models are concerned, I only considered adding Tail Lightning at this point.

Are you thinking about having a condition in the animation ? (Like speed <> 0) otherwise tarmacs will look like giant disco dance floors, we have a very large AI population now.
Also, would this have an impact on performance / FPS ?

Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1038
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby jtprophet » Mon Aug 07, 2017 3:39 pm

Oh I dont know just was curious as I have always noticed how they didnt have them attached, but I do see your point however based on the number of planes that are at each airport now regarding the disco floor statement.
By the way thank-you for your contributions!

John
jtprophet
 
Posts: 120
Joined: Mon Apr 04, 2016 2:21 pm
Callsign: DAL1464

Re: AI Aircraft beacon

Postby BecOzIcan » Mon Aug 07, 2017 4:04 pm

:-) Thanks John

Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1038
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Re: AI Aircraft beacon

Postby wkitty42 » Mon Aug 07, 2017 6:07 pm

not only the rotating beacons but it would also be nice to see them turn on their landing lights, too... that might make them easier to spot when they are still some miles off... right now you have to have a good eye and binoculars to spot them inbound ;)

but i do agree with the reasonings as to why they don't currently have these options...
"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: 5568
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: AI Aircraft beacon

Postby wlbragg » Mon Aug 07, 2017 6:13 pm

FWI: Some of the "GA" AI aircraft are modeled with lights that use sun-angle and ground-speed to condition when they're visible. The GeeBee has a complete set for reference I believe. I don't know if it included landing light or not, but it may have.

Appears it's commented out so I don't know whether it was ever implemented or not. I know I had implemented some lights on some GA. Still should give you the general idea as to how to do it.

I think it really adds to the simulation at night, I doubt it would be that much of a hit if the traffic flow is normal and stable. If it is bunched up, then maybe not.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4809
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: AI Aircraft beacon

Postby wlbragg » Tue Aug 08, 2017 2:38 am

I set up the PA-28 with navigation, beacon and landing lights. This is a touch-and-go scenario I have running at KEQA. This is one method of adding lights to the AI model. Look at the c182 in fgdate/AI/Aircraft for another method. I think these lights look more realistic.

Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4809
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: AI Aircraft beacon

Postby jtprophet » Tue Aug 08, 2017 2:16 pm

Thank-you for that example, the landing lights were definitely visible for me although the others not so obvious; frame rates looked to be around 30 would you say?

I will certainly follow the C182 example and see if I can get the rotating beacons working on the airliners.
jtprophet
 
Posts: 120
Joined: Mon Apr 04, 2016 2:21 pm
Callsign: DAL1464

Re: AI Aircraft beacon

Postby wlbragg » Tue Aug 08, 2017 5:40 pm

I think my statement implied I thought the c182 lights were more realistic. Not what I was trying to say. I think the implementation you see in this video is more realistic than the c182.

Here is the pa-28 code for comparison against the c182.
Code: Select all
<?xml version="1.0"?>

<PropertyList>

  <description>pa-28</description>
  <author>David Megginson, modified for AI use Brett Harrison</author> 
  <path>Models/pa-28.ac</path>

  <nasal>
    <load>
      <![CDATA[
        aircraft.light.new("/sim/model/pa-28/lighting/beacon", [0.10, 0.90]);
        setprop("/sim/model/pa-28/lighting/beacon/enabled", 1)
      ]]>   
    </load>
    <unload>
    </unload>
  </nasal>

  <animation>
    <name>propall</name>
    <object-name>prop</object-name>
    <object-name>propdisc</object-name>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propdisc</object-name>
    <condition>
      <greater-than>
        <property>velocities/true-airspeed-kt</property>
        <value>50</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>prop</object-name>
    <condition>
      <less-than>
        <property>velocities/true-airspeed-kt</property>
        <value>60</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>propall</object-name>
    <property>velocities/true-airspeed-kt</property>
    <factor> 90 </factor>
    <center>
      <x-m> -2.48050</x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 1.06520 </z-m>
    </center>
    <axis>
      <x> -1.000 </x>
      <y>  0.000 </y>
      <z>  0.000 </z>
    </axis>
  </animation>

  <!-- Landing Light -->
  <animation>
      <type>select</type>
      <object-name>LandingLightL</object-name>
      <object-name>LandingLightR</object-name>
      <nopreview/> -->
      <condition>
        <and>
           <greater-than>
              <property>/sim/time/sun-angle-rad</property>
              <value>1.57</value>
           </greater-than>
           <greater-than>
              <property>velocities/true-airspeed-kt</property>
              <value>0</value>
           </greater-than>
        </and>
      </condition>
  </animation>

  <animation>
      <type>flash</type>
      <object-name>LandingLightL</object-name>
      <center>
          <x-m>-0.61229</x-m>
          <y-m>-5.01234</y-m>
          <z-m> 1.13965</z-m>
      </center>
      <axis>
          <x>-1</x>
          <y>0</y>
          <z>0</z>
      </axis>
      <power>8</power>
      <factor>6</factor>
      <offset>0</offset>
      <two-sides type="bool">false</two-sides>
      <min>0.5</min>
      <max>80</max>
  </animation>

  <animation>
      <type>flash</type>
      <object-name>LandingLightR</object-name>
      <center>
          <x-m>-0.61229</x-m>
          <y-m> 4.99278</y-m>
          <z-m> 1.13965</z-m>
      </center>
      <axis>
          <x>-1</x>
          <y>0</y>
          <z>0</z>
      </axis>
      <power>8</power>
      <factor>6</factor>
      <offset>-.5</offset>
      <two-sides type="bool">false</two-sides>
      <min>0.5</min>
      <max>80</max>
  </animation>

  <!-- Red Nav light -->
  <animation>
      <type>material</type>
      <object-name>LeftNav_Light</object-name>
      <emission>
          <red>1</red>
          <green>0.05</green>
          <blue>0.05</blue>
      </emission>
  </animation>

  <!-- Green Nav light -->
  <animation>
      <type>material</type>
      <object-name>RightNav_Light</object-name>
      <emission>
          <red>0.05</red>
          <green>1</green>
          <blue>0.05</blue>
      </emission>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LeftNav_Light</object-name>
    <object-name>RightNav_Light</object-name>
    <condition>
      <and>
         <greater-than>
            <property>/sim/time/sun-angle-rad</property>
            <value>1.57</value>
         </greater-than>
         <greater-than>
            <property>velocities/true-airspeed-kt</property>
            <value>0</value>
         </greater-than>
      </and>
    </condition>
  </animation>

  <!-- Red Beacon light -->
  <animation>
      <type>material</type>
      <object-name>BeaconX</object-name>
      <emission>
          <red>1</red>
          <green>0.05</green>
          <blue>0.05</blue>
      </emission>
  </animation>

  <animation>
      <type>select</type>
      <object-name>BeaconX</object-name>
      <nopreview/>
      <condition>
        <and>
          <property>/sim/model/pa-28/lighting/beacon/state</property>
           <greater-than>
              <property>/sim/time/sun-angle-rad</property>
              <value>1.57</value>
           </greater-than>
           <greater-than>
              <property>velocities/true-airspeed-kt</property>
              <value>0</value>
           </greater-than>
        </and>
      </condition>
  </animation>
  <BeaconXparams>
      <light-near>0.4</light-near>
      <light-med>0.8</light-med>
      <light-far>10</light-far>
  </BeaconXparams>
  <animation>
      <type>alpha-test</type>
      <object-name>BeaconX</object-name>
      <alpha-factor>0.001</alpha-factor>
  </animation>
  <animation>
      <type>translate</type>
      <object-name>BeaconX</object-name>
      <offset-m>4.39</offset-m>
      <axis>
          <x> 3.95</x>
          <y> 0.0</y>
          <z> 2.73</z>
      </axis>
  </animation>
  <animation>
      <type>billboard</type>
      <object-name>BeaconX</object-name>
      <spherical type="bool">true</spherical>
  </animation>
  <animation>
      <type>dist-scale</type>
      <object-name>BeaconX</object-name>
      <interpolation>
          <entry>
              <ind>0</ind>
              <dep alias="/BeaconXparams/light-near"/>
          </entry>
          <entry>
              <ind>500</ind>
              <dep alias="/BeaconXparams/light-med"/>
          </entry>
          <entry>
              <ind>16000</ind>
              <dep alias="/BeaconXparams/light-far"/>
          </entry>
      </interpolation>
  </animation>

</PropertyList>
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4809
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: AI Aircraft beacon

Postby wlbragg » Tue Aug 08, 2017 5:46 pm

As far as frame rate, I have frame rate at this "custom scenery" airport of around 20. It's very heavy scenery, several AI scenarios running simultaneously, airport keep grass effects (both of them). The AI aircraft are a mix of our wonderful low-poly models and a few of the hi-poly models.
I don't think the light animations touched the frame rate in this case.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4809
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: AI Aircraft beacon

Postby wlbragg » Tue Aug 08, 2017 5:58 pm

Here is a link to the entire pa-28 AI folder
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4809
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: AI Aircraft beacon

Postby jtprophet » Wed Aug 09, 2017 6:21 pm

So I could use this model example exhibiting lighting just as if it were used the same as the KRHV example?
jtprophet
 
Posts: 120
Joined: Mon Apr 04, 2016 2:21 pm
Callsign: DAL1464

Re: AI Aircraft beacon

Postby wlbragg » Wed Aug 09, 2017 6:37 pm

Yes, except the lights in this example are part of the pa-28 model (built in) you would need to either add them to the cub, make a stand alone version of the lights and incorporate them into the cub, or use the pa-28 as the tow plane. If I am understanding your questions correctly.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4809
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: AI Aircraft beacon

Postby wlbragg » Thu Aug 10, 2017 4:54 am

In case anyone is interested I added strobes to the pa-28. I also change it from a two light wingtip landing light configuration to one center landing light.

It's actually pretty cool, you can see it coming at night from a long ways off.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4809
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: AI Aircraft beacon

Postby BecOzIcan » Fri Aug 11, 2017 5:34 am

wlbragg wrote in Thu Aug 10, 2017 4:54 am:In case anyone is interested I added strobes to the pa-28. I also change it from a two light wingtip landing light configuration to one center landing light.

It's actually pretty cool, you can see it coming at night from a long ways off.


Petty nice. Currently building the AI A350-900. Will have a look at integrating lighting on this one an evaluate impact.

Cheers
Ian
Current Projects: AI Traffic, Models & Liveries
User avatar
BecOzIcan
 
Posts: 1038
Joined: Tue Oct 04, 2011 10:43 pm
Location: Sydney, NSW, Australia
Version: 2.12
OS: Win10

Next

Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 5 guests