Board index FlightGear Development Aircraft Systems

F-14B's Weapon System  Topic is solved

Modeling aircraft systems, like electrical stuff, hydraulics, pneumatics? Feel free to ask support.

Re: F-14B's Weapon System

Postby Bomber » Sun May 05, 2013 4:24 pm

Hooray, his initial answer to the question wasn't helpfull..... and that's why I responded.

Thorsten set out to be antagonistic towards me from my initial post here at FG, it's personal with him. So anything he can say to belittle me he does... it's normal behaviour from indivduals who feel that their internet persona is threatened.. I had no personal gripe with him when I joined here, but from the minute I dared post my opinion on mouse control of equipment within a comabt sim environment he went off on one.

Posting he'd like to do something if he had the time is something we could all do..... maybe I should post a few throw away comments like that.

The facts of this thread is that he supports unrealsim when it comes to clouds but naysays an idea that might be unrealistic from someone else.... I don't care how clever he thinks he is, or how stupid he thinks I am..

And posting later that's it's someone elses opinion he's repeating doesn't change the initial post.

And by the way how certain are you that the the aim-9 as coded is actually seeking a heat signature, and has 100% realistic behaviour...?

Simon
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1934
Joined: Fri Dec 14, 2007 7:06 pm
OS: Windows XP and 10

Re: F-14B's Weapon System

Postby Thorsten » Sun May 05, 2013 4:39 pm

The facts of this thread is that he supports unrealsim when it comes to clouds but naysays an idea that might be unrealistic from someone else.... I don't care how clever he thinks he is, or how stupid he thinks I am..


Since I explained the cloud thing now two times without any visible effect, I am slowly forced to the conclusion that you either can't read or don't want to :D


Hooray, his initial answer to the question wasn't helpfull..... and that's why I responded.


Except it was... entirely correct. Well, some people care about that.

Thorsten set out to be antagonistic towards me from my initial post here at FG, it's personal with him. So anything he can say to belittle me he does...


Right. I took the time to respond to this thread on the off-chance that you would later join the discussion so I could belittle you... That'd be... causality violation. Or a badly cooked conspiracy theory.
Thorsten
 
Posts: 11087
Joined: Mon Nov 02, 2009 8:33 am

Re: F-14B's Weapon System

Postby Hooray » Sun May 05, 2013 4:52 pm

Bomber: I can assure you that I had more disagreements with Thorsten than you'll believe, and he's just not the kind of guy who takes things personally - really, you can tell that just by looking at how he keeps responding to people regardless of past occurences. Thorsten will respond pretty well to logical arguments, and well, real facts/evidence. He simply doesn't respond too well to emotional arguments or tirades, and claims that you cannot back up.

What you now said regarding Thorsten, you also said once about my way of responding to you. So maybe the problem is not with other people ? I find it pretty telling that you can so quickly provide an account of disagreements. Thorsten on the other hand, doesn't seem to have an issue with moving on rather quickly, and not even with admitting that he's wrong (once you can prove him wrong that is).

We are all wrong at times, and being a part of this community, learning is another important part - we can learn a lot from each other, there's no reason to always resort to ad hominem behavior.

Really, Thorsten's been wrong about many things that he whined about when he first came here - now, he's looking at things differently - and if you are following the devel list, you'll see that he's also on the receiving end.
Posting he'd like to do something if he had the time is something we could all do.....

That isn't quite fair, for example: even just try to make sense of xiii's code - I'd reckon, that you would have a pretty hard time (I know I did!), knowing Thorsten's code, I know that he could probably understand most of the code, without having to keep a browser window open to look up tons of things.

It's kinda pointless now to challenge him like that - there are not many people here who could have provided what Xiii provided, and there are very few people here who could help people get started on the right track, it just isn't helpful to alienate the very people that are supportive of the idea.

The facts of this thread is that he supports unrealsim when it comes to clouds but naysays an idea that might be unrealistic from someone else....


Sorry, plain wrong: Ever heard about the Dunning-Kruger effect ?
If not, I advise you to have a look: http://en.wikipedia.org/wiki/Dunning%E2 ... ger_effect
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: F-14B's Weapon System

Postby 5H1N0B1 » Fri Dec 20, 2013 7:24 am

just in passing, do you know that I worked on this in 2012, and since we have a more compplpete weapons systems on the 2000 ?

And I tried to do it in a generic way. Still some woork to do, but the whole things is working and can already be adapted on other aircraft.
I just improved Xiii's code.
To be realistic we need to class the missile in differents way :
I)First the fox classification :
- fox 1 : Pasive missile that following a target that have been illuminated by your own aircaft's radar. it's old missile like Aim7. The target have to stay in a very directionnal cone.
- fox 2 : Heat seeking missile. (limited range)
- fox 3 Kind of fire an forget.

Actually the script don't follow heat or Radar. it's just a target. To be more realistic, We should have a list, like "radardist" (or use the same) when the Equivalent Radar surface, the heat and perhpas more can be written for each FG (major) planes.(not part of the script)

II)But this isn't enough too be realistic. Missille like the Phoenix are Semi active cruise missille : I's fired too an illluinated target, climb at ~100 k feets, at middl activate it' own active radar and just dive to the target...At mach 5.(this missile is coded on the "missile.nas). At this speed, in 1 second the missile traval more than a km.

The old sript "had a minimum distance" to detonnate an calculate each frame if you hade pass close to your target. At mach 5 it isn't posible. you have too calculate if the minimum distance have been reached ooonn th "line" between each fame. (That's trignonometry)

III) New missiles are radar active, haave a datalink with the aircraft, go fast and are agile (not like a fat anti bomber Phoenix)
IV)Ground missile ; They can stay at low alt (like air to ea missile) to reach their target, or they can follow terrain like the SCALP...or go direct like "maverik" AGM-65

I spent a lot of time to make the orginal "fox2.nas" in "missile.nas" and make it generic and the more realitic a possible.
Two problems are pointed now :
1) In order to make it even more realitic, your aircraft must have a complete panel, and a complete weapons systems.
2) Boring child. As we want to be realistic, they want to have fun. And I saw some firing something like 100 missile, just to have fun. I had to block th Loads for when wheels are on the ground...

it took time to developp. Some people are for other say "no to war", and kids re playing. Only the F14 and the 2000 have seeking capabilities in flightgear. So this is not the "more" important part.
Btw, i really love Flightgear Clouds/weather systems :)

Kindly

5H1N0B1
Last edited by 5H1N0B1 on Fri Dec 20, 2013 8:46 am, edited 1 time in total.
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 210
Joined: Thu Aug 30, 2012 9:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: F-14B's Weapon System

Postby Hooray » Fri Dec 20, 2013 7:40 am

WRT generalizing things, you would first of all want to extract the part that interacts with the AI system and encapsulate that, so that the logic can be separately re-used and maintained.

Scriptable AI and scripted FDMs are very popular and we still need to come up with good tutorials/howtos for those: viewtopic.php?f=30&t=20857

the next step would ideally involve coming up with an OO framework for modeling different types of missiles, possibly using subclasses for each missile type. And then, there's obviously also the FDM part, which would ideally be a separate class, too.

Basically, along these lines:
Code: Select all
var ScriptableAIObject = {};
var ScriptableFDM = {};
var MissileBase = {parents:[ScriptableFDM, ScriptableAIObject] };
var SeekingMissile = {parents:[MissileBase] };
var fox2 = {parents:[SeekingMissile] };


Thus, a new Missile implementation would require people to implement the interface of the ScriptableFDM class and the MissileBase class.

Preferably, such a generalization effort would be conducted "in the open", so that other people can have a look and provide constructive feedback, snippets or code - meanwhile, we do have enough people familiar with advanced Nasal concepts. Ultimately, xiii should have some say when it comes to reviewing and committing things - but this is something that should really be tackled by several people, to ensure that the component can be easily reused by other aircraft.

A properly done design will support different aircraft, different FDMs, different missile types - but also use of these missiles in AI objects, such as in the bombable addon.

We can help with this, but obviously it needs to be done in a proactive fashion, where feedback is regularly solicited and applied - otherwise, we'll just end up with another half-baked implementation that won't support most use-cases. Look at the recent 744 ND work, it only took a few weeks to generalize a highly aircraft specific implementation and come up with something that can be easily used on other aircraft, including even support for AI traffic.

Based on your posting you don't seem to be just interested in this stuff, but also seem to have done some research and coding, which is a good thing - because we've had other -very ambitious- folks here, who had no clue about anything but still wanted to redo the fox2.nas script without understanding a single thing about Nasal, FDMs, FG or missiles in general. So you seem to be in a much better position already - I would just ask to share your existing code/design (use gitorious or the wiki) so that we can provide feedback, support and help.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: F-14B's Weapon System

Postby 5H1N0B1 » Fri Dec 20, 2013 9:24 am

Hi Hooray,
I'll be glad than other people have look on the "missile.nas" script; I made it in order to share (in reallity, an mirage 2000 would NEVER fire a AIM-54 Phoenix...)
And it will for sure "clean" the code or bring new attack angle/new vision of it, and perhaps a simple way to do it.

The whole systems is verry fonctionnal in the "m2000-5" which is on the GIT.
The systems isn't only "missile.nas".
It also depend of :

"radar2.nas" -> a bit different than the original one, in order to select the target, and not only the "closest" (Just on line changed)
"MiscRwr.nas"-> Where the actual target can be selected.
Between those 2 there is something irrelevant : the "radar2.nas" create if I'm correct a Threat/Target object and then another Target Object is created in order to feed the Missile.nas...

And these when you have a Target and fire a missile it's explained here : http://forum.flightgear.org/viewtopic.php?f=4&t=20576#p191792

Note that the behavior a the missile is stored in the "Missile/loading_Missiles.nas" and each missile have a complete different behaviour, but I'm pretty sure that a .xml would better here.

I hope these explanation could be clear.
In fact this is a mix between a script and object programing. I'm pretty sure it can be greatly improved and be completly object and avoid redondant code...

Let me know if you want more or if something ins't correctly documented.

Kindly

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

Re: F-14B's Weapon System

Postby Hooray » Fri Dec 20, 2013 11:05 am

Okay, thanks for the clarification and the pointers - I briefly looked at the code in git, in particular missile.nas - here's some initial feedback regarding generalization requirements (i.e. things required for reuse on other aircraft):

  • I do like the fact that this is already using object oriented programming
  • many things can be directly reused because of this
  • what's needed, is decoupling the aircraft specific parts, and missile specific stuff
  • also there are some huge methods that should probably be down-stripped and make use of additional helper-functions instead, e.g. the update*() methods are huge monster functions :D
  • the FDM specific stuff should be implemented via a separate helper class, so that each missile can have its own FDM, without having to touch the missile class itself
  • likewise, handling animations in the missile class violates the MVC principle - i.e. makes it more difficult to use the same class for different missiles, would be also better to do this sort of thing in missile-specific superclasses ?
  • system-dependencies like radar etc would probably be also better made more explicit, so that reuse on other aircraft is more straightforward ?
  • some more comments would be helpful for people new to the code :D

Maybe we can find enough people interested in this, to make this happen ?
As could be seen during the ND project, having 3-5 contributors working on the same thing, can create good results fairly quickly, i.e. within just a few weeks.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: F-14B's Weapon System

Postby 5H1N0B1 » Fri Dec 20, 2013 4:03 pm

I really put a lot of comment on it, but there is a point when you start to forget to add comment...That's really right, my bad :oops:
Especially because for this project (and for flightgear in general) this is not just "codding" as you said.

People have also to know trignometry (huge part in "missile.nas") but also how missile flies, behave, seek their target, how the radar is locking it, how an aircraft can avoid tracking etc...

what's needed, is decoupling the aircraft specific parts, and missile specific stuff
This could be not so hard. To my point of view the very aicraft specific part are about "Load management"... But not only (I don't have code here....I'm at my job :| ) ...still some work to do.

likewise, handling animations in the missile class violates the MVC principle - i.e. makes it more difficult to use the same class for different missiles, would be also better to do this sort of thing in missile-specific superclasses ?
.. Sorry I really don't understand what you mean... (I'm a little rusty...)

the FDM specific stuff should be implemented via a separate helper class, so that each missile can have its own FDM, without having to touch the missile class itself
I didn't even think about it...A big Yes for that !!

It's really cool if this work can be developed by other people. I'm pretty sure that some people will love to put something very similar on their plane.(Some from UK :wink:)
And I like the way you see it.
(Just within few week it just seems incredible...-as it took me a full month (I was unemployed...) to make it from Xiii code- but if we can be 3-5 I have no doubt we can do it)
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 210
Joined: Thu Aug 30, 2012 9:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: F-14B's Weapon System

Postby Hooray » Fri Dec 20, 2013 4:15 pm

currently, everybody is busy, i.e. release preparations and holidays - but it would seem do-able in 2014.
To get this started, some more comments would help, so that newcomers can get started more easily - we have lots of people here who are familiar with sophisticated Nasal code, but may not be familiar with missile/FDM stuff - in such situations, it really helps big time to have good comments, but also some way to "self-test" important things - this is especially important to ensure that changes can be easily made AND TESTED - i.e. unit testing. Like a handful of sanity tests for important building blocks - so that we can help you re-organize the code, and test our changes.

Another important thing would be not just supporting multiple aircraft, but also multiple missiles per aircraft - a properly re-designed script would support multiple missiles per AI aircraft for example, which could make the bombable addon really interesting :D

I suggest that we use the wiki to come up with the requirements for this and lay out the plans (just a brainstorming): http://wiki.flightgear.org/Scripted_AI_Missiles
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: F-14B's Weapon System

Postby 5H1N0B1 » Fri Dec 20, 2013 4:33 pm

Another important thing would be not just supporting multiple aircraft, but also multiple missiles per aircraft - a properly re-designed script would support multiple missiles per AI aircraft for example, which could make the bombable addon really interesting :D
->Actually I can fire different missiles in one fly on the 2000.
When the object "MISSILE" is created, we fill the internal FDM (Which could just be anther separate object), and you can fire an "MICA radar missile", then a "MAGIC" heat missile, and so, even before the first missile reach the target.
But it would be really great to put it in AI systems (And so clean the code). We also want to implement correct "flare" reactions, rwr and missile alerts (and I don't know how) : because some missile are very accurate... :mrgreen:

I'll start to put lot more comment in the code.
(I have some update to commit in the mirage 2000-5, I'll add comments on the list. And then, I'll ask Helijah for my commit.)
I'll also describe how I did test the missiles (And why the "Missile view" is very important)

I will also have a holiday period where I probably couldn't reach a computer, so I'll do it in January.

I suggest that we use the wiki to come up with the requirements for this and lay out the plans (just a brainstorming).

As I'm a rookie in this kind of things, could you provide me a link where I could start the brainstroming ?

Thanks a lot.

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

Re: F-14B's Weapon System

Postby Hooray » Fri Dec 20, 2013 5:00 pm

okay, that sounds good - I already started adding everything to the wik, see: http://wiki.flightgear.org/Scripted_AI_Missiles
However, I haven't evaluated this thread, so anything we discussed here is still missing - for a brainstorming, just copy&paste things there and try to make up headings for different topics.
This will probably grow over time.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: F-14B's Weapon System

Postby 5H1N0B1 » Sun Dec 29, 2013 8:37 pm

ok I've started to work on this.
Also start to add more comment one "missile.nas"
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 210
Joined: Thu Aug 30, 2012 9:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Previous

Return to Systems

Who is online

Users browsing this forum: No registered users and 0 guests