Re: [Flightgear-devel] about mp refueling
Jean Pellotier wrote > Le 29/08/2010 11:16, Vivian Meazza a écrit : > > jean pellotier wrote > > > > > >> Le 28/08/2010 22:49, Vivian Meazza a écrit : > >> > >>> AFAIKS in the code an aircraft gets a TACAN if the callsign is MOBIL1 > >>> (060X), MOBIL2 (061X), or MOBIL3 (062X). On the other hand if the > >>> > >> callsign > >> > >>> includes MOBIL, it is recognized as a tanker on MP. The property > >>> > >> 'isTanker' > >> > >>> is not transmitted by default over the net and is not handled on > >>> > >> receipt. It > >> > >>> is set to 'false' for all mp aircraft, and is only set to true if the > >>> callsign contains MOBIL is the first part. > >>> > >>> The tanker property is used in aar.nas to determine if refueling takes > >>> place. > >>> > >>> Hmm ... this one needs a bit more investigation ... mainly to remind > >>> > >> myself > >> > >>> what I did in the first place :-). > >>> > >>> > >>> > >> you're right, and thinks are now more clear to me. in fact the change > in > >> the tanker property is taken in account by aar.nas, so exporting it by > >> mp will work. > >> > >> I just wanted not to be forced to use a MOBIL callsign to do refueling > >> by mp, this function should be enabled only by the tanker property. > >> > >> > > Hmm - the code doesn't set tanker to false if it can't find MOBIL in the > > callsign. So if you set tanker to true on MP - that might work. > > > > the code doesn't set tanker to false, but never set contact to true line > 462 in AIMultiplayer.cxx, starting with: > > if ( isTanker) { > > and without contact, no refueling ... > > to summarry: the c++ code only test the tanker contact if the callsign is > a MOBIL, and aar.nas use the tanker property and > the contact to allow refueling. > my code use the tanker property instead of the callsign test in the c++ > code, but i'm not sure this is the best way to go. > > > > > I think there is a chance that you can already do what you want. If you > > would like to try? > > > > > we are a lot who tried a refuel without a MOBIL tanker, without a > success so far, and the question they ask is what's wrong, i took a > tanker, and refueling is impossible? > > OK I've put something in Git which works as follows: If the callsign is MOBIL1, 2, or 3, the MP Player is recognized as a tanker It will have a TACAN transmitter assigned and the property 'tanker' is set to true. If the callsign is MOBIL*, the MP Player is recognized as a tanker but no TACAN is assigned. The property 'tanker' is set to true. If the callsign is *, and the property 'tanker' is true the MP player is recognized as a tanker. The property 'tanker' may be toggles at runtime in the transmit player, and will be reflected in the client. I hope that's enough for you to make it all work using some Nasal, while not losing the original concept. I hope that's enough for you to make it all work using some Nasal, while not losing the original concept. You can put this in the ~-set.xml file: false or use some Nasal to initialize the property. I've tested it briefly toggling the property at runtime, and it seems to work. Vivian -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] about mp refueling
Le 29/08/2010 11:16, Vivian Meazza a écrit : > jean pellotier wrote > > >> Le 28/08/2010 22:49, Vivian Meazza a écrit : >> >>> AFAIKS in the code an aircraft gets a TACAN if the callsign is MOBIL1 >>> (060X), MOBIL2 (061X), or MOBIL3 (062X). On the other hand if the >>> >> callsign >> >>> includes MOBIL, it is recognized as a tanker on MP. The property >>> >> 'isTanker' >> >>> is not transmitted by default over the net and is not handled on >>> >> receipt. It >> >>> is set to 'false' for all mp aircraft, and is only set to true if the >>> callsign contains MOBIL is the first part. >>> >>> The tanker property is used in aar.nas to determine if refueling takes >>> place. >>> >>> Hmm ... this one needs a bit more investigation ... mainly to remind >>> >> myself >> >>> what I did in the first place :-). >>> >>> >>> >> you're right, and thinks are now more clear to me. in fact the change in >> the tanker property is taken in account by aar.nas, so exporting it by >> mp will work. >> >> I just wanted not to be forced to use a MOBIL callsign to do refueling >> by mp, this function should be enabled only by the tanker property. >> >> > Hmm - the code doesn't set tanker to false if it can't find MOBIL in the > callsign. So if you set tanker to true on MP - that might work. > the code doesn't set tanker to false, but never set contact to true line 462 in AIMultiplayer.cxx, starting with: if ( isTanker) { and without contact, no refueling ... to summarry: the c++ code only test the tanker contact if the callsign is a MOBIL, and aar.nas use the tanker property and the contact to allow refueling. my code use the tanker property instead of the callsign test in the c++ code, but i'm not sure this is the best way to go. > I think there is a chance that you can already do what you want. If you > would like to try? > > we are a lot who tried a refuel without a MOBIL tanker, without a success so far, and the question they ask is what's wrong, i took a tanker, and refueling is impossible? > Vivian > > jano -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] about mp refueling
jean pellotier wrote > > Le 28/08/2010 22:49, Vivian Meazza a écrit : > > > > AFAIKS in the code an aircraft gets a TACAN if the callsign is MOBIL1 > > (060X), MOBIL2 (061X), or MOBIL3 (062X). On the other hand if the > callsign > > includes MOBIL, it is recognized as a tanker on MP. The property > 'isTanker' > > is not transmitted by default over the net and is not handled on > receipt. It > > is set to 'false' for all mp aircraft, and is only set to true if the > > callsign contains MOBIL is the first part. > > > > The tanker property is used in aar.nas to determine if refueling takes > > place. > > > > Hmm ... this one needs a bit more investigation ... mainly to remind > myself > > what I did in the first place :-). > > > > > you're right, and thinks are now more clear to me. in fact the change in > the tanker property is taken in account by aar.nas, so exporting it by > mp will work. > > I just wanted not to be forced to use a MOBIL callsign to do refueling > by mp, this function should be enabled only by the tanker property. > Hmm - the code doesn't set tanker to false if it can't find MOBIL in the callsign. So if you set tanker to true on MP - that might work. I think there is a chance that you can already do what you want. If you would like to try? Vivian -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] about mp refueling
Le 28/08/2010 22:49, Vivian Meazza a écrit : > > AFAIKS in the code an aircraft gets a TACAN if the callsign is MOBIL1 > (060X), MOBIL2 (061X), or MOBIL3 (062X). On the other hand if the callsign > includes MOBIL, it is recognized as a tanker on MP. The property 'isTanker' > is not transmitted by default over the net and is not handled on receipt. It > is set to 'false' for all mp aircraft, and is only set to true if the > callsign contains MOBIL is the first part. > > The tanker property is used in aar.nas to determine if refueling takes > place. > > Hmm ... this one needs a bit more investigation ... mainly to remind myself > what I did in the first place :-). > > you're right, and thinks are now more clear to me. in fact the change in the tanker property is taken in account by aar.nas, so exporting it by mp will work. I just wanted not to be forced to use a MOBIL callsign to do refueling by mp, this function should be enabled only by the tanker property. jano -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] about mp refueling
jean pellotier > > > >> currently we can only refuel by mp behing a "MOBIL" plane, with a plane > >> having the "multiplay/tanker" set. > >> > >> here's a proposal that permit to use any callsign (yes i know in this > >> case the tanker will not have a tacan working), and any plane, for > >> exemple the tanker pilot can cut the probe/drogue alimentation, or with > >> adding a refueling pod any plane can become a tanker > >> > >> if a c++ guru can have a look and commit (any comment welcome, my c++ > >> skills are just at a beguinner state). > >> > >> the victor is waiting for this (or something similar), with a > refuelling > >> available by mp only when the drogue is out . > >> > >> > > It is already the case that any aircraft can become a tanker simply by > using > > a callsign starting "MOBIL" > > > by using the callsign MOBIL, we just have a tacan, and are able to be > used as tanker only if the plane has multiplay/tanker set to true, so > this only works for some planes (victor, c130 and kc135), and to have a > working refueling, the tanker pilot must have a MOBIL callsign. AFAIKS in the code an aircraft gets a TACAN if the callsign is MOBIL1 (060X), MOBIL2 (061X), or MOBIL3 (062X). On the other hand if the callsign includes MOBIL, it is recognized as a tanker on MP. The property 'isTanker' is not transmitted by default over the net and is not handled on receipt. It is set to 'false' for all mp aircraft, and is only set to true if the callsign contains MOBIL is the first part. The tanker property is used in aar.nas to determine if refueling takes place. Hmm ... this one needs a bit more investigation ... mainly to remind myself what I did in the first place :-). > > I'm not quite sure what you want here. Would I be correct in saying that > you > > want to be able to switch the tanker status on and off over MP? If so - > I > > think that is a good idea, and one that was intended from the outset, > but > > never got implemented. (I cant remember why - I think it just got lost). > > > I want two things: permit a working refueling with whatever callsign you > want, even if the tacan can only be used with MOBIL callsigns, and the > second is to be able to switch the tanker on/off status while flying, eg > if your drogue is not deployed (got the victor ready for this), or if > you are low in fuel (for the day the tanker fuel content will be > impacted by the refueling). > > Another concern is that in case we are using a refueling pod, a lots of > planes can be used as casual tankers. > > If so I'll get on the case. > > > > > if so many thanks. It will take a little while to research this one. Vivian -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] about mp refueling
Le 28/08/2010 20:01, Vivian Meazza a écrit : > jean pellotier wrote: > > > >> currently we can only refuel by mp behing a "MOBIL" plane, with a plane >> having the "multiplay/tanker" set. >> >> here's a proposal that permit to use any callsign (yes i know in this >> case the tanker will not have a tacan working), and any plane, for >> exemple the tanker pilot can cut the probe/drogue alimentation, or with >> adding a refueling pod any plane can become a tanker >> >> if a c++ guru can have a look and commit (any comment welcome, my c++ >> skills are just at a beguinner state). >> >> the victor is waiting for this (or something similar), with a refuelling >> available by mp only when the drogue is out . >> >> > It is already the case that any aircraft can become a tanker simply by using > a callsign starting "MOBIL" > by using the callsign MOBIL, we just have a tacan, and are able to be used as tanker only if the plane has multiplay/tanker set to true, so this only works for some planes (victor, c130 and kc135), and to have a working refueling, the tanker pilot must have a MOBIL callsign. > I'm not quite sure what you want here. Would I be correct in saying that you > want to be able to switch the tanker status on and off over MP? If so - I > think that is a good idea, and one that was intended from the outset, but > never got implemented. (I cant remember why - I think it just got lost). > I want two things: permit a working refueling with whatever callsign you want, even if the tacan can only be used with MOBIL callsigns, and the second is to be able to switch the tanker on/off status while flying, eg if your drogue is not deployed (got the victor ready for this), or if you are low in fuel (for the day the tanker fuel content will be impacted by the refueling). Another concern is that in case we are using a refueling pod, a lots of planes can be used as casual tankers. > If so I'll get on the case. > > if so many thanks. > Vivian > > jano -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] about mp refueling
jean pellotier wrote: > currently we can only refuel by mp behing a "MOBIL" plane, with a plane > having the "multiplay/tanker" set. > > here's a proposal that permit to use any callsign (yes i know in this > case the tanker will not have a tacan working), and any plane, for > exemple the tanker pilot can cut the probe/drogue alimentation, or with > adding a refueling pod any plane can become a tanker > > if a c++ guru can have a look and commit (any comment welcome, my c++ > skills are just at a beguinner state). > > the victor is waiting for this (or something similar), with a refuelling > available by mp only when the drogue is out . > It is already the case that any aircraft can become a tanker simply by using a callsign starting "MOBIL". I'm not quite sure what you want here. Would I be correct in saying that you want to be able to switch the tanker status on and off over MP? If so - I think that is a good idea, and one that was intended from the outset, but never got implemented. (I cant remember why - I think it just got lost). If so I'll get on the case. Vivian -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
[Flightgear-devel] about mp refueling
Hi, currently we can only refuel by mp behing a "MOBIL" plane, with a plane having the "multiplay/tanker" set. here's a proposal that permit to use any callsign (yes i know in this case the tanker will not have a tacan working), and any plane, for exemple the tanker pilot can cut the probe/drogue alimentation, or with adding a refueling pod any plane can become a tanker if a c++ guru can have a look and commit (any comment welcome, my c++ skills are just at a beguinner state). the victor is waiting for this (or something similar), with a refuelling available by mp only when the drogue is out . jano diff --git a/src/AIModel/AIMultiplayer.cxx b/src/AIModel/AIMultiplayer.cxx index d2fb505..be90190 100644 --- a/src/AIModel/AIMultiplayer.cxx +++ b/src/AIModel/AIMultiplayer.cxx @@ -51,18 +51,8 @@ FGAIMultiplayer::~FGAIMultiplayer() { bool FGAIMultiplayer::init(bool search_in_AI_path) { props->setStringValue("sim/model/path", model_path.c_str()); //refuel_node = fgGetNode("systems/refuel/contact", true); -isTanker = false; // do this until this property is - // passed over the net +isTanker = false; // set the tanker property to false by default for all mp aircrafts -string str1 = _getCallsign(); -string str2 = "MOBIL"; - -string::size_type loc1= str1.find( str2, 0 ); -if ( (loc1 != string::npos && str2 != "") ){ -// cout << " string found " << str2 << " in " << str1 << endl; -isTanker = true; -// cout << "isTanker " << isTanker << " " << mCallSignsetBoolValue("tanker",isTanker); +//props->setBoolValue("tanker",isTanker); +props->tie("tanker", SGRawValuePointer(&isTanker)); props->tie("controls/invisible", SGRawValuePointer(&invisible)); @@ -102,6 +93,7 @@ void FGAIMultiplayer::unbind() { props->untie("controls/lag-adjust-system-speed"); props->untie("controls/invisible"); props->untie("refuel/contact"); +props->untie("tanker"); } void FGAIMultiplayer::update(double dt) -- Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel