The A2A Simulations Community

"Come share your passion for flight"
It is currently Fri Dec 14, 2018 6:24 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Fri Feb 19, 2016 9:41 am 
Offline
Technical Sergeant
User avatar

Joined: Sun Jun 12, 2011 2:11 am
Posts: 972
Location: Germany
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."


Top
 Profile  
 
PostPosted: Wed Dec 05, 2018 5:52 am 
Offline
Airman Basic

Joined: Wed Dec 05, 2018 5:43 am
Posts: 6
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


Top
 Profile  
 
PostPosted: Wed Dec 05, 2018 1:20 pm 
Offline
Staff Sergeant

Joined: Mon Dec 31, 2012 1:38 am
Posts: 359
Location: Bonham, Texas
I found it.

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

Code:
  (L:PlaneStartLatitude,Radians) (L:PlaneStartLatitude,Radians) - (>L:dLat,Radians)
  (L:PlaneStartLongitude,Radians) (L:PlaneStartLongitude,Radians) - (>L:dLon,Radians)


I believe this should be:

Code:
  (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


Top
 Profile  
 
PostPosted: Wed Dec 05, 2018 11:59 pm 
Offline
Staff Sergeant

Joined: Mon Dec 31, 2012 1:38 am
Posts: 359
Location: Bonham, Texas
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) (&gt;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


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 2:45 am 
Offline
Airman Basic

Joined: Wed Dec 05, 2018 5:43 am
Posts: 6
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


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 10:03 am 
Offline
Staff Sergeant

Joined: Mon Dec 31, 2012 1:38 am
Posts: 359
Location: Bonham, Texas
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


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 11:30 am 
Offline
Airman Basic

Joined: Wed Dec 05, 2018 5:43 am
Posts: 6
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


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 1:29 pm 
Offline
Staff Sergeant

Joined: Mon Dec 31, 2012 1:38 am
Posts: 359
Location: Bonham, Texas
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


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 1:34 pm 
Offline
Staff Sergeant

Joined: Mon Dec 31, 2012 1:38 am
Posts: 359
Location: Bonham, Texas
Woah, I overlooked a big one:

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

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

Hook


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 3:38 pm 
Offline
Airman Basic

Joined: Wed Dec 05, 2018 5:43 am
Posts: 6
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


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 4:01 pm 
Offline
Airman Basic

Joined: Wed Dec 05, 2018 5:43 am
Posts: 6
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


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 4:24 pm 
Offline
Airman Basic

Joined: Wed Dec 05, 2018 5:43 am
Posts: 6
It works damn well now, even the Nm are correct. Thank you a lot !!!

_________________
ImageImage


Top
 Profile  
 
PostPosted: Thu Dec 06, 2018 8:10 pm 
Offline
Staff Sergeant

Joined: Mon Dec 31, 2012 1:38 am
Posts: 359
Location: Bonham, Texas
Thanks for the report. I'm glad you got it working.

I should have posted the entire line:

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

(L:PauseOnDistanceLeft,miles) (&gt;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


Top
 Profile  
 
PostPosted: Fri Dec 07, 2018 4:33 pm 
Offline
Staff Sergeant

Joined: Mon Dec 31, 2012 1:38 am
Posts: 359
Location: Bonham, Texas
"The 54 minute hour" fixes:

viewtopic.php?f=80&t=33591


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group