Search Unity

Physics [RELEASED] Silantro Flight Simulator

Discussion in 'Tools In Progress' started by Oyedoyin1, Mar 20, 2018.

?

Which is better in terms of "user-friendliness" and "performance"

Poll closed Aug 13, 2018.
  1. 1 giant script

    0 vote(s)
    0.0%
  2. Multiple smaller scripts

    15 vote(s)
    100.0%
  1. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    Is it possible to somehow simplify the physics(basically, make it like in GTA V aerophysics) for making the controls more smooth? Cause it is sometimes hard to control an airplane on a phone.
    The thing is that I don't really know each piece of your script and even if know, I'm bad at physics:), so I'll be very thankful if you advise me which components might be disabled in the aerofoil script to simplify its physics.;)
     
    Last edited: Sep 19, 2019
  2. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Email me with a description of what you're trying to do so I can help.
     
  3. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Cessna Citation Mustang

     
  4. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    I've sent you the email. Perhaps my question is unclear, so I'll try to rephrase it:). Basically, I want to fix the problem when a plane starts changing the angle of attack up when there are no elevators used. Especially, it happens on massive planes with big wings, like KC-10. The thing I want is that a plane rotates only in accordance with the rotation of elevators.

    UPD: I've partially resolved the problem by making all the surfaces 90 degrees horizontal so that they don't make any default lift force.
     
    Last edited: Sep 21, 2019
  5. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    I also have another question dealing with the orbit camera. How is it possible to make the camera(also like in GTA 5) fixed all the time, so that when an aircraft turns 180 degrees, the camera looks at its back as always and not at the front?
     
  6. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    The issue has been resolved by using Cinemachine.
     
    Oyedoyin1 likes this.
  7. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    I'm really sorry I haven't gotten back to you...I wasn't feeling well.

    What happens is that as the aircraft speed increases, the wings generate more lift than the stabilizers can balance. This leads to an increase in the angle of attack which increases the lift even more ...you can see the cycle continue.
    This can be countered by either trimming the control surface or having a computer adjust the control surface to keep the aircraft straight and level.

    I'm currently working on a PID system to provide balance and control to the aircrafts, The Autothrottle system is working perfectly but the Pitch and Roll system still require additional tuning.
     
    Last edited: Sep 24, 2019
    WebLab and Bartolomeus755 like this.
  8. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    1: The ability to select individual airfoils for wing sections coming in the next update. Three States are selectable;



    1. Uniform: A particular airfoil is selected and used for all the aerofoil sections.
    2. Three-Point: The Root airfoil, Wing-Fold Line and Tip airfoil can be selected.
    3: Individual: Each section of the wing section airfoil can be selected and used.




    2: Thermodynamically accurate engines. Each station of the engine performance can now be evaluated other very important details such as EGT are now available for uses such as Infra-red Radar tracking

    1. TurboJet Engine


    Performance Data:



    3. New Engines: Such as;

    1: PulseJet
    2: RamJet
    3: TurboRamJet: So aircrafts such as the SR-71 can now be simulated
     
    John-G and WebLab like this.
  9. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    Selected airfoil for each section can be visualized in the editor



     
  10. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Testing the New Engines and Foil System

    TurboProp Update





    Flight Test




    Up Next .....The PulseJet :D:D
     
  11. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    Pulse Jet now in action





     
    Willbkool_FPCS likes this.
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Not sure if you pure goal is realistic behaviour and 'must' use PI / PID, or rather to stabalize. But if to stabilize, you could use Neural Network. Training for such system like yours is just max few minutes.
    And you can reuse NN for any plane. No need tune every plane manually via PID.
     
    Oyedoyin1 likes this.
  13. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Honestly, realism is a top priority but Stabilization is the current goal...been on it for months now.

    I was able to get the PID system working for stabilization on the pitch axis but a disturbance is still arising in the system


    The aircraft initially starts jagged but stabilizes around the 5-second mark but something is happening around the 15-second mark that I still can understand.

    Yes, my final plan is to use Neural networks and Machine learning for true AI control..I've even gotten an asset from the store (ANN) but It seems it'll take a lot of time to understand and get working which is currently stopping me from getting into it.

    So please if you have any resource or basically anything that'll help with the NN development or the stabilization stuff, I'll be very happy ;)
     
  14. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    Very interesting problem you are describing.

    I understand NN may not necessary be the easiest tech to get into it, but once having it working and set up for system (s), it can learn fast and save a lot of time.

    In following I will attach references, to something I was working with.
    As a base, I used Evolving Neural Networks NEAT.
    I was teaching my NN to thruster control a spaceship (space shuttle, or satellite alike) to find desired orientation in 3D space. Basically 3D gimbal controller. Once system was done, teaching was taking only moment. And I could reconfigure and easily teach it again, if needed.

    I was trying initially with PID, or custom algorithms, but 3D space control with thrusters, is complex problem. I didn't want use lerp, damping, or other programming tricks to mimic this behavior. I wanted close to real physics behavior, as if adding, or removing thrusters, will affect dynamics of the space craft / satellite. Imagine space shuttle, which has directional thursters. Or satellite, which can spin and also can adjust look at direction, with using thrusters. Sure, for smaller crafts gyroscope is used. And that can be easily mimck. But that wasn't my goal.

    If I recall correctly, I was using 3 inputs and 3 outputs.
    3 Inputs that is orientation in 3D space, xyz.
    3 outputs were thrusters (range -1 to 1), by controlling adding local force of yaw, pitch, roll. So the spinning an orientation is purely controlled, by adding forces, in places, as if there would be thrusters (Unfortunately I have not shown actually on the vid). But again, as mentioned, no damping, quaternion lerp, or similar tricks.

    So in your case, is to take orientation and speed control as inputs, and outputs will be your ailerons, flaps etc. Depending on aircraft model.


    Not sure how directly useful will be this one for you, but you could give a try. Or at least give a look. Is not complete project. Something I have experimented while ago.
    You don't need watch full vid. At the beginning I TRY to explain the idea however. But I suggest look into attached resources in the description of the video. Specially reference to other video.
    It may give you better understanding on the subject. Of course, it will require more work.



    Hope that will help.
     
    Oyedoyin1 likes this.
  15. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Thank you very much!!
     
  16. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  17. RomcioPaluszek

    RomcioPaluszek

    Joined:
    Jul 7, 2015
    Posts:
    5
    Hi Oyedoyin1,

    I would like to upgrade Fixed wing simulator package which I have for nearly half year, but I cannot find electric motor inside version 2.X. Is electric power system deprecated?
     
  18. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Not Intensionally :D:D

    I was supposed to work on a full overhaul of the system (The motors weren't generating power like I wanted), but I've been distracted with the Turbine engines.

    Send me an empty email, I'll try and work on something before the weekend.
     
  19. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    You can now plot numerical flap data from Javafoil to the airfoils to improve the system accuracy. The aerodynamic variables used for calculation (when flaps are engaged) will now be based on the plotted data.

    NACA 63A-415 with Flaps at 35 degrees


    Flow Analysis





    Editing Window in Unity


    New Airfoil Prefab with plotted data



    Also thinking about moving from afl data import to txt so as to open more data collection ports from Javafoil:D
     
    Antypodish likes this.
  20. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  21. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    Aircrafts can now be re-armed on the go with weapon system refresh

     
  22. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    Resupply System complete. Aircrafts can now be rearmed and refuelled in a dedicated hanger.

     
  23. digitalerr0r

    digitalerr0r

    Joined:
    Sep 15, 2013
    Posts:
    25
    Thanks for making a great looking asset! How is the support for air breaks?
     
  24. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Yes, there is.



    In action;

    Mirage III:




    F-15:
     
    digitalerr0r likes this.
  25. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    Piston engine update complete. It is now easier to setup (Requires less data that can be gotten from Wikipedia) and is more accurate.






    Also vital information and various stages in the engine cycle can be obtained.

    Engine used for sample: https://en.wikipedia.org/wiki/Junkers_Jumo_222

     
    Last edited: Oct 22, 2019
  26. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    #UPDATE

    New Flight Path tracking system; the current position of the aircraft is now recorded at intervals to plot its flight path. It can be used to make Waypoints for AI aircrafts amongst other uses.







     
  27. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Flight Path Data will be saved to a file that can be used outside of unity or loaded and viewed in the Editor



     
  28. rayflex

    rayflex

    Joined:
    Nov 18, 2013
    Posts:
    6
    Hi.

    I recently bought Silantro Helicopter Simulator Toolkit, which is really nice, however I also bought Silantro UH-1Y Venom to go with it, and I can't get it to fly at all. Errors related to airfoil not being set. I try to set them, which eliminates errors, but probably not set correctly because all seems fine except there is apparently no lift. It just sits there on the ground at full speed. I just downloaded, so it's the latest 2.0 version.

    Anything you can do to help?

    Thanks,
    -Scott
     
  29. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Really sorry about that. Haven't had time to upload the recent updates.

    Send me an empty mail:
    silantrosimulator@gmail.com
     
  30. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    How to make landing easier, cause as for now, when an airplane touches the ground, it starts jumping and reflecting the hit? Perhaps a raise of gravity force on ground touch could be helpful?
     
  31. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Actually Its an issue with the Unity Wheel Collider. It doesn't absorb the aircraft's energy on landing as it should, when Its a car or something within that weight group, the effect isn't as noticeable, but when you start dealing with tens of kgs, the effect becomes very apparent :D
    The ground effect cushion helps in some cases, but I'm currently working on improving its accuracy, here's an example (Old):
    https://drive.google.com/file/d/1VEaBY-kn4L2TFT36C2EpuWA1n662Mvg5/view?usp=sharing

    Someone recommended a dedicated wheel plugin that solves the problem
     
    WebLab likes this.
  32. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    Hmm, thanks for the reply. I'll try that variant. As far as I understand the plugin is called "Vehicle physics PRO".
     
  33. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
  34. WebLab

    WebLab

    Joined:
    Apr 10, 2018
    Posts:
    38
    I have one more question. How to make an aircraft more maneuverable even at low speed? The thing is that it is hard to control them on mobiles, so I'd like to make it more casual, basically make the physics more obedient.

    UPD: I've practically solved the issue by multiplying the pitchAxis variable (in aerofoil script) by 2 and changing the engine force mode to VelocityChange(the force magnitude should be divided by the mass of an object).
     
    Last edited: Nov 17, 2019
    Oyedoyin1 likes this.
  35. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    COMING SOON!!:D:D;);)





     
  36. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  37. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  38. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  39. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Stall Test

     
  40. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    Spoileron Control Test

     
  41. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  42. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915


     
    John-G likes this.
  43. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  44. The_Geoff

    The_Geoff

    Joined:
    Mar 22, 2014
    Posts:
    7
    Just started using Silantro and I'm very impressed so far.

    I have run into one problem though - I'm setting up a simulation of an O-1 Bird Dog using Silantro (https://en.wikipedia.org/wiki/Cessna_O-1_Bird_Dog). I've set up the O-470-11 engine and checked that it's generating the correct amount of power, but the aircraft is moving way too fast - it easily hits 500 knots in level flight, while the real O-1 struggled to reach 100.

    It is a very light aircraft - empty weight of 732kg. But considering your videos of WWI biplanes I don't think this should be an issue.

    Is there some component related to drag I should be adjusting? How would you typically tune the flight model to match real-world parameters?
     
  45. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915

    Its quite funny that I was randomly online when you wrote this :D:D

    To the issue tho, yes in the current system you'll have to set drag variables for the fuselage and gear strut. Something around 0.026 for the fuselage and 0.0043 for the strut should do for that particular aircraft.

    However I'm putting finishing touches on the new panel analysis system (shown in the images above) that will provide accurate analysis of the aircraft fuselage and the drag around it.

    Forward your message to my mail, I'll get back to you tomorrow so we'll test it out.
     
  46. The_Geoff

    The_Geoff

    Joined:
    Mar 22, 2014
    Posts:
    7
    Ah - I hadn't set the base aircraft drag (in the rigidbody component). That explains it! Thanks for the fast response.

    To match the expected aircraft performance I've set the drag to 0.1 for now - this gives a top speed of around 105 knots. The new system looks great, looking forward to trying it out when it is ready.
     
    Oyedoyin1 likes this.
  47. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
    F-15 Tests







     
  48. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  49. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915
  50. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    915




     
    Last edited: Nov 26, 2019