B377 Guppy AFK feature not working?

A place for technical help setting up your Stratocruiser with FSX
new reply
User avatar
gulredrel
Master Sergeant
Posts: 1039
Joined: 12 Jun 2011
Location: Germany

B377 Guppy AFK feature not working?

Post gulredrel »

Hello,

could someone please check, if the AFK feature is working in the PG?
Tried distance but nothing paused and distance will not count down as seen in the GA planes.

I have COTS and the latest update, cause installed all a2a planes last Werk in my new Win10 system.

Thanks
Jens

edit: damn auto correction on tablet; where's the edit option in tapatalk?
"Give me a ping, Vasili. One ping only, please."

EricS
Airman Basic
Posts: 6
Joined: 05 Dec 2018

Re: B377 Guppy AFK feature not working?

Post EricS »

Hi guys,

I just wanted to report that with the latest version installed, even the standard 377 has this bug (the only one i've seen so far). The distance doesn't count down so totaly useless. To compensate, I use time limit.
But when I use the 1.1 version, it works perfect, there are juste other weird things like a turbo blowing on a shut down engine for example.
Isn't there any way to fix this? Even by editing ourselves a file?

Thanks

Regards.
ImageImage

Hook
Master Sergeant
Posts: 1217
Joined: 31 Dec 2012
Location: Bonham, Texas

Re: B377 Guppy AFK feature not working?

Post Hook »

I found it.

In the file WoS_B377\panel\b377\code.xml there is a section near the top that reads:

Code: Select all

  (L:PlaneStartLatitude,Radians) (L:PlaneStartLatitude,Radians) - (>L:dLat,Radians) 
  (L:PlaneStartLongitude,Radians) (L:PlaneStartLongitude,Radians) - (>L:dLon,Radians) 
I believe this should be:

Code: Select all

  (A:PLANE LATITUDE,Radians)  (L:PlaneStartLatitude,Radians) - (>L:dLat,Radians) 
  (A:PLANE LONGITUDE,Radians) (L:PlaneStartLongitude,Radians) - (>L:dLon,Radians) 
The original code will always assign zero to the dLat and dLon variables which are used to compute the distance traveled. This calculation thinks the plane has not moved, so the distance in the dialog does not update.

I was able to edit this successfully with Notepad++ but I did not test it. THE ENTIRE FILE IS ONLY ONE LINE <-- Important.

If you attempt to edit this yourself, be sure to make a backup of the code.xml file first. You should probably test it with career mode turned off. It might be a good idea to make copies of any B377 status files that A2A uses to keep track of the aircraft. Make sure the final edited file still looks like the original and is still only one line. If some editor splits it into multiple lines it may not work.

Hook

Hook
Master Sergeant
Posts: 1217
Joined: 31 Dec 2012
Location: Bonham, Texas

Re: B377 Guppy AFK feature not working?

Post Hook »

While researching a couple of other things in the code, I ran across another error. When setting and displaying the distance in the AFK dialog it says "nm" for nautical miles but the computation is in statute miles. One statute mile is 0.868976 nautical miles, or 1 nautical mile is 1.15078 statute miles.

Fixing this goes beyond a simple edit but could be done by changing ",miles)" to ",nmiles)" 9 places in afk.xml and changing all instances in code.xml from "(L:PauseOnDistance,bool) 1 ==" through "(L:PauseOnDistanceLeft,miles) (>L:PauseOnDistanceLeftPAST,miles)" of ",miles)" to ",nmiles)" and changing 1.609344 to 1.852 in that section of code.

This problem is beginning to sound familiar. I suspect I found and fixed it several years ago. I do not recall fixing the statute mile conversion at that time , I just remember that the distance was wrong.

Hook

EricS
Airman Basic
Posts: 6
Joined: 05 Dec 2018

Re: B377 Guppy AFK feature not working?

Post EricS »

Thank you Hook,

I'm gonna try this out, I will be able to re-update it to the last version now and having that function working.
I've the 377 since a very long time and I just rediscovered it some weeks ago. What an amazing and challenging plane.
The problem is just that I don't have the time for staying next to it 10 hours long and time compression is a bit wonky with this one, it works but some calculations are false after that and it becomes unstable in some cases. So this AFK function is just a great tool for that.
ImageImage

Hook
Master Sergeant
Posts: 1217
Joined: 31 Dec 2012
Location: Bonham, Texas

Re: B377 Guppy AFK feature not working?

Post Hook »

Thanks, EricS. Please let me know how it works.

Just make sure that when you set the distance, set it in statute miles. Measure on Google Earth.

If you set the distance and it starts to decrement during the flight, then the code is probably working. If it does not decrement, then the change doesn't work and you should revert to the original code. This will require restarting the flight, so test it early in the flight.

Hook

EricS
Airman Basic
Posts: 6
Joined: 05 Dec 2018

Re: B377 Guppy AFK feature not working?

Post EricS »

I've done all the changes you said, it seems to count down well but I need to find a way testing if it's now true NM.
When it reaches "0" its doesn't pause the game, the other options still do pause. There muse be a little thing missing somewhere I need to find out.
ImageImage

Hook
Master Sergeant
Posts: 1217
Joined: 31 Dec 2012
Location: Bonham, Texas

Re: B377 Guppy AFK feature not working?

Post Hook »

EricS wrote:I've done all the changes you said, it seems to count down well but I need to find a way testing if it's now true NM.
When it reaches "0" its doesn't pause the game, the other options still do pause. There muse be a little thing missing somewhere I need to find out.
Did you make the change for nautical miles? That's pretty ambitious. :)

If the game doesn't pause then it may be something else in the code. I'll look at it later today. If you did the nautical mile conversion that may have affected something elsewhere.

Hook

Hook
Master Sergeant
Posts: 1217
Joined: 31 Dec 2012
Location: Bonham, Texas

Re: B377 Guppy AFK feature not working?

Post Hook »

Woah, I overlooked a big one:

(L:PauseOnDistanceLeft,miles) 0 == if{

You never compare a floating point number to exactly zero. Try replacing == with < which should work.

Hook

EricS
Airman Basic
Posts: 6
Joined: 05 Dec 2018

Re: B377 Guppy AFK feature not working?

Post EricS »

Thank you dude. I tryed this one but it completely wrecks the speed gauge (green almost everywhere) and got the messages when loading a saved game "low cabin turbo presssure" and "cabin is freezing". I don't really understand what's the link between.
I'm wondering me how you read that code because everything in one single line, it's just unreadable lol.
ImageImage

EricS
Airman Basic
Posts: 6
Joined: 05 Dec 2018

Re: B377 Guppy AFK feature not working?

Post EricS »

I works now, great job Hook, I just added ";" behind &lt, I've found it was impossible to open the file with IExplorer, it meaned the file was wrecked because something was missing and looked elsewhere in the file how &lt is incorporated.

Now gonna try if those are true NM.
ImageImage

EricS
Airman Basic
Posts: 6
Joined: 05 Dec 2018

Re: B377 Guppy AFK feature not working?

Post EricS »

It works damn well now, even the Nm are correct. Thank you a lot !!!
ImageImage

Hook
Master Sergeant
Posts: 1217
Joined: 31 Dec 2012
Location: Bonham, Texas

Re: B377 Guppy AFK feature not working?

Post Hook »

Thanks for the report. I'm glad you got it working.

I should have posted the entire line:

(L:PauseOnDistanceLeft,miles) 0 < if{

I didn't realize the semicolon might be confusing. I was in a rush to get out the door for an appointment. Never do tech support while double parked. :)

There are two other things I've fixed on the Stratocruiser. One is in a thread titled "The 54 minute hour" and the other has to do with low volume external engine sounds where an edit to the bounding box with RADitor fixes a few problems. I'd have to do a search for that one.

I opened the code.xml file in notepad++ which will display long lines properly broken instead of all on one line, but does not change the text to do this. I found and copied the pertinent part of the code to a new file, then added line breaks and indentation until it was readable. This portion of the code looks like this:

Code: Select all

(L:PauseOnDistance,bool) 1 == 
if{ 
  (L:PauseOnDistanceLeft,miles) (L:PauseOnDistanceLeftPAST,miles) != 
  if{ 
    (L:PauseOnDistanceLeft,miles) (>L:PauseOnDistanceGoal,miles) 
    (A:PLANE LATITUDE,Radians) (>L:PlaneStartLatitude,Radians) 
    (A:PLANE LONGITUDE,Radians) (>L:PlaneStartLongitude,Radians) 
  } 
  6371 (>L:R,number) 
  (L:PlaneStartLatitude,Radians) (L:PlaneStartLatitude,Radians) - (>L:dLat,Radians) 
  (L:PlaneStartLongitude,Radians) (L:PlaneStartLongitude,Radians) - (>L:dLon,Radians) 
  (L:dLat,Radians) 2 / sin 2 pow (>L:LONLAT_A1,number) 
  (L:PlaneStartLatitude,Radians) cos (A:PLANE LATITUDE,Radians) cos * (L:dLon,Radians) 2 / sin 2 pow * (>L:LONLAT_A2,number) 
  (L:LONLAT_A1,number) (L:LONLAT_A2,number) + (>L:LONLAT_A,number) 
  2 (L:LONLAT_A,number) sqrt 1 (L:LONLAT_A,number) - sqrt atg2 * (>L:LONLAT_C,number) 
  (L:PauseOnDistanceLeft,miles) 0 > 
  if{ 
    (L:PauseOnDistanceGoal,miles) (L:R,number) (L:LONLAT_C,number) * 1.609344 / - (>L:PauseOnDistanceLeft,miles) 
    (L:PauseOnDistanceLeft,miles) 0 == 
    if{ 
      0 (>L:PauseOnDistance,bool) 
      1 (>L:Paused,bool) 
      (>K:PAUSE_ON) 
    } 
  } 
} 
els{ 
  0 (>L:PauseOnDistanceLeft,miles) 
} 

(L:PauseOnDistanceLeft,miles) (>L:PauseOnDistanceLeftPAST,miles)

I converted it to C syntax for readability and that's when I noticed the problem with dLon and dLat. The above version is the original before any fixes.

Hook

Hook
Master Sergeant
Posts: 1217
Joined: 31 Dec 2012
Location: Bonham, Texas

Re: B377 Guppy AFK feature not working?

Post Hook »


new reply

Return to “Boeing 377 Tech Support”

Who is online

Users browsing this forum: No registered users and 2 guests