Board index FlightGear Development Aircraft

Anyone has jsbsim missile examples?

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

Anyone has jsbsim missile examples?

Postby jasonru405 » Sat May 26, 2018 9:22 am

Hi All,

I planned to create the Storm Shadow Missile (see here: http://typhoon.starstreak.net/common/AG ... #undefined)
that have navigation systems (autopilot) in jsbsim way.

Is there anyone who knew an example of missile configuration in jsbsim way?

Regards,
jasonru405
 
Posts: 1
Joined: Fri May 25, 2018 8:31 am

Re: Anyone has jsbsim missile examples?

Postby Necolatis » Sat May 26, 2018 11:27 am

Look in Vitos SU-15. Not sure you can use it though, due to licensing.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1907
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.3.2
OS: Windows 10

Re: Anyone has jsbsim missile examples?

Postby abassign » Sat May 26, 2018 1:59 pm

Also I am interested in a sort of Rocket Kit, a series of procedures that can effectively simulate many types of missiles released by a fighter aircraft. I am working, for the G91R1B, at the release of the loads from the sub pylons (Hard points) for this I used the submodels function, it is a very interesting function written in C ++ and therefore very efficient, but has many things that make it incomplete. For example, it is necessary to write a lot of NASAL code to add some simple functions, such as the subjective visualization of the missile launch or other ballistic object, it is complicated to manage some aspects of the simulation etc. In short, a function that should be completed in order to make the operation of a ballistic object or a missile more realistic.
The most interesting thing would be to manage the missile with a specific JSBSim thread for the missile (or ballistic object), thread that operates with a task separate from the main JSBSim. Theoretically it would be possible, but FGFS does not manage these features.
In short, there is work to be done, but if the work is done well, the effects will always be beautiful.

abassign
 
Posts: 771
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: Anyone has jsbsim missile examples?

Postby Necolatis » Sat May 26, 2018 3:38 pm

abassign if you just want a nasal missile script, it exists. Can fire various types of ordnance. Runs in separate thread, but still limited to frame-rate updates, else it wont guide properly against AI targets.
Has some demands how it wants the radar to supply it with target info, but its not overly hard to implement.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1907
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.3.2
OS: Windows 10

Re: Anyone has jsbsim missile examples?

Postby PINTO » Sat May 26, 2018 5:12 pm

OPRF has successfully used in-sim against other entities in multiplayer: LOAL, anti radiation, various types of cruise missiles (both sea skimming and terrain following), missiles which freefall for several seconds before the engine activates, beam riders, and nonpowered guided cluster bombs, amongst others. GPS guidance iirc is already in the script just no one has created a missile with waypoints yet.

This all comes from one script, and is controled via nasal, not JSBSim, but it works very well.
Actively developing the MiG-21bis (link to repo) (link to thread)

http://opredflag.com is an active flightgear dogfighting community (using a system that isn’t bombable)
User avatar
PINTO
 
Posts: 936
Joined: Wed Oct 21, 2015 6:28 pm
Callsign: pinto
Version: 2016.3.0
OS: Win10

Re: Anyone has jsbsim missile examples?

Postby abassign » Sat May 26, 2018 8:07 pm

Necolatis wrote in Sat May 26, 2018 3:38 pm:abassign if you just want a nasal missile script, it exists ... Has some demands how it wants the radar to supply it with target info, but its not overly hard to implement.


Yes I know, I've looked at various jobs, but I'm sorry that every time it is necessary to rewrite most of the code, there is no standard function to launch a missile (or a bomb or something else) using, for example, only XML. For the description of the ballistic flight of an object, NASAL works well only if the frame rate is sufficiently high, does not exploit the potential of a 120 Hz integrator like the JSBSim and then launching a missile or bomb looks more like a game than a function of high realism.
As you saw in the video I sent, the ballistic objects are not bad, but they have very few control parameters and a lot of NASAL code is needed to control the object.
abassign
 
Posts: 771
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: Anyone has jsbsim missile examples?

Postby Thorsten » Sun May 27, 2018 5:48 am

For the description of the ballistic flight of an object, NASAL works well only if the frame rate is sufficiently high


If you don't know how to code. If you do know and take the next higher order dt^2 into account, you can simulate co-orbiting objects at 5 fps with a drift of order of a few mm/s while everything moves more than 7 km per second.

Guidance and control suffer from poor framerates, not ballistic trajectory computation.
Thorsten
 
Posts: 10635
Joined: Mon Nov 02, 2009 8:33 am

Re: Anyone has jsbsim missile examples?

Postby enrogue » Wed May 30, 2018 9:29 am

There is an interesting feature built into the AIBallistic system that I've never seen used - the external force feature:

from http://wiki.flightgear.org/Howto:Add_submodels

<external-force>
If true the submodel is subjected to an external force.

<force-path>
A string describing the property where the magnitude, azimuth and elevation of the external force is to be found. The following child properties are instantiated:
force-lb
force-azimuth-deg
force-elevation-deg
You need to manipulate these properties with some Nasal to apply an external force to the submodel.

<force-stabilised>
If true, the submodel aligns with the external force. Defaults to false. If both this and <aero-stabilised> are true this takes priority.

<no-roll>
If true, the submodel does not bank in turns. Defaults to false.

If you already have the Nasal in place to view your submodels path, it would be interesting to experiment with applying forces & looking at the results :)
User avatar
enrogue
 
Posts: 155
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: Anyone has jsbsim missile examples?

Postby Thorsten » Wed May 30, 2018 10:43 am

There is an interesting feature built into the AIBallistic system that I've never seen used - the external force feature:


The Shuttle SRB separation motors are implemented via external force when they push the boosters away. Not worth if you have a running Nasal example, ballistic submodels are too buggy to be really useful.
Thorsten
 
Posts: 10635
Joined: Mon Nov 02, 2009 8:33 am

Re: Anyone has jsbsim missile examples?

Postby enrogue » Wed May 30, 2018 12:23 pm

Thanks for the pointer Thorsten - I admit I hadn't looked very hard

I just did a grep through FGAddon & found the feature is also used to accelerate rocket submodels in Detlef Fabers work (F-86, bf109, mosquito etc), and staging in the Vostok

In my tinkering in the past I'd discovered submodels to sometimes randomly not appear, but I haven't looked at it recently
User avatar
enrogue
 
Posts: 155
Joined: Mon May 19, 2014 6:40 pm
Location: London (UK)
Callsign: enrogue
OS: OS X, Ubuntu

Re: Anyone has jsbsim missile examples?

Postby abassign » Wed May 30, 2018 10:50 pm

Thorsten wrote in Wed May 30, 2018 10:43 am:
There is an interesting feature built into the AIBallistic system that I've never seen used - the external force feature:

... ballistic submodels are too buggy to be really useful.


I agree, but looking at the code is not bad. AIBalistic was born to manage machine guns and tracer projectiles. It is a relatively simple and efficient program as a code to execute. Unfortunately, it does not use a JSBSim instance for more complex objects such as guided or self-guided missiles. An AISubmodel instance is then used that combines the ballistic object with a physical model described in XML, but the AISubmodel model is different from the one normally mounted on the aircraft.

It would be interesting to be able to integrate the AISubmodel and AIBalistic (once the submodel is released) with the XML that describes the model. In fact, when I release the reservoir, we need to hide with an XML instruction of type <Condition> and then visualize the submodel (which is the same object!) With an opposite XML instruction of type <Condition>, a what we NASAL made with instructions, and if AISubmodel was integrated as a variant of <animation>, it would be possible to release a tank or a bomb simply a trigger.

NASAL I find it very inconvenient as a modification requires the restart of the aircraft and then changes on the code happen very slowly, especially if you have little experience. I noticed the "somersaults" that the programmer who inserted the bombs in the A10 had to do!

Another drawback is that it is complicated to insert a chamber which points the submodel and follows it along its path. In the case of the detachable tank I had to reposition a camera, which I called sub-model, according to the last submodel off-hook. This is a nice waste of time and the performances are not very good!

It would then be interesting, always with a command like Animation, to be able to insert a JSBSim instance with the relative XML code, so as to be able to fully describe the missile. I noticed that it is not difficult to start a JSBSim instance from C ++ of FGFS, of course it would be useful for this instance to be a separate thread, in order to avoid an excessive slowdown. In this way the rilaciato object can have much more sophisticated functions and feel the external environment.

We want to try to modify these functions so useful for the realism of the system? :)
abassign
 
Posts: 771
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: Anyone has jsbsim missile examples?

Postby Thorsten » Thu May 31, 2018 4:56 am

and if AISubmodel was integrated as a variant of <animation>, it would be possible to release a tank or a bomb simply a trigger.


Except of course drag and interaction with the atmosphere would be wrong unless you invest some more work. Not to mention that guided missiles would not have guidance... The problem with generic structures is that they work out of the box but usually don't deliver what you need for your particular problem. Case in point - the generic electrical system is hopelessly inadequate to describe the wiring of any real more complex aircraft.

NASAL I find it very inconvenient as a modification requires the restart of the aircraft and then changes on the code happen very slowly, especially if you have little experience.


Either that, or you just re-load the Nasal file you're working on...
Thorsten
 
Posts: 10635
Joined: Mon Nov 02, 2009 8:33 am

Re: Anyone has jsbsim missile examples?

Postby 5H1N0B1 » Thu May 31, 2018 5:06 pm

The OPRF script is used by the f14, f15, Viggen, Mirage 2000, Mig21, now the f16. This is the very same code for each aircraft (except the mirage because I'm late on updating the loading system) The whole thing work to save a lot of fps, drag, size, weight, warhead... there is lot of guidance type, from none to laser, radar (fox1/fox3), IR guidance, with sun jamming it or flares. There is straight going missile for short distance, some of them follow a bell trajectory,other are following the ground or the sea itself. There is 32 parameters that is actually taken in account and defined in a xml file for each working missiles.
The Scalp itself already exist, and follow a GPS target. actually it is not following a waypoint route, but this could be done easily and the function will be ready of other missiles like that. It even unfold its wing when dropped...

There is also a missile view (in another file) that allow to force the view on fired missile, and you can choose it and navigate to view the next missile. (Actually on the f16 and Mirage)

Also this script can be loaded both on yasim, jsbsim aircraft...It even provide damage with both OPRF code and bombable code !
It's a bit complicated, because this is a weapons systems and it also include a targeting system (the radar) / a load system, a firing system (missile) and a damage system. And I may have forgotten some...

So, a generic code exist, and we are constantly working on it. (Currently more Leto and Pinto ;) and the whole OPRF team testing and giving feed back). This code is the code that came from XIII and have evolved in years to be like that, through literally thousand of hours spent on it, from XIII, Leto, Richard, Pinto myself and probably more people...
You guys can just ignore that, and it's ok, but I suggest not to re invent the wheel or start it (again) from scratch ...

Good luck in your research.

Have a nice day.
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 207
Joined: Thu Aug 30, 2012 9:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu


Return to Aircraft

Who is online

Users browsing this forum: AhrefsBot [Bot], Bing [Bot] and 3 guests