Jump to content

Auto Accept/Reject Pirep


Vangelis

Recommended Posts

 

smartCARS version 2.1.32.0, 2019/11/5 UTC
[18:11:07] Preflight started, flying offline
[18:11:07] Flying ERJ145XR - House - No Yoke
[18:16:23] Pushing back with 5327 kg of fuel
[18:17:23] Engine 2 is on
[18:18:12] Engine 1 is on
[18:19:26] Flaps set to position 1
[18:19:29] Flaps set to position 2
[18:20:29] Taxiing to runway
[18:23:46] Taking off
[18:24:14] Climbing, pitch: 16, roll: level, 138 kts
[18:24:20] Gear lever raised at 138 ft at 134 kts
[18:25:31] Flaps set to position 1 at 2092 ft at 173 kts
[18:25:36] Flaps set to position 0 at 2205 ft at 177 kts
[18:31:05] Sim paused
[19:32:45] Sim unpaused
[19:39:02] Cruising at 19000ft, pitch: 2, 392 kts
[19:47:57] Descending
[19:57:40] Approaching
[20:04:31] Flaps set to position 1 at 4584 ft at 197 kts
[20:06:04] Flaps set to position 2 at 3155 ft at 184 kts
[20:06:29] Final approach, 173 kts
[20:07:05] Gear lever lowered at 2575 ft at 154 kts
[20:07:05] Flaps set to position 3 at 2573 ft at 154 kts
[20:07:42] Flaps set to position 4 at 2294 ft at 159 kts
[20:10:13] Touched down at -181 fpm, gear lever: down, pitch: 4, roll: level, 126 kts
[20:10:29] Landed in 2307 ft, fuel: 4309 kg, weight: 22387 kg
[20:10:29] Taxiing to gate
[20:10:36] Flaps set to position 3
[20:11:03] The flight may now be ended
[20:11:04] Arrived, flight duration: 00:44
[20:11:25] Flaps set to position 0
[20:15:44] Engine 1 is off
[20:15:46] Engine 2 is off

Edited by Laurent
Link to comment
Share on other sites

  • 2 weeks later...
  • Administrators
1 minute ago, miniarma said:

Ive been trying to get this to auto accept for days but nothing seems to work. I am using phpvms 5.5.2.72 simpilot/php7.2

Any version I can use that will auto accept the pireps ?

Thanks

Are there any errors in the browser console or in the error_log file related to this module?

The module is untested in phpVMS 5.5.2.72 - but it should work. Let us know of any errors.

Link to comment
Share on other sites

3 hours ago, ProAvia said:

Are there any errors in the browser console or in the error_log file related to this module?

The module is untested in phpVMS 5.5.2.72 - but it should work. Let us know of any errors.

I've check the browser console for errors and nothing is related to the module itself.

Link to comment
Share on other sites

  • Administrators

How about in the error_log file in the root of phpvms or in /admin? If there isn't an error_log file in either place, you may have to turn error reporting on thru your hosting panel.

The only reason I jumped in here is I am the one who put version 5.5.2.72 together - and some addon modules will show an error under php 7.2 that may need to be fixed. 

Link to comment
Share on other sites

2 hours ago, ProAvia said:

How about in the error_log file in the root of phpvms or in /admin? If there isn't an error_log file in either place, you may have to turn error reporting on thru your hosting panel.

The only reason I jumped in here is I am the one who put version 5.5.2.72 together - and some addon modules will show an error under php 7.2 that may need to be fixed. 

There isnt any error_log files. We are hosting with OVH and there doesnt seem to be an option on the panel to enable error reporting. I will contact them to see if they can turn that feature on.

Soon as I get an update ill let you know.

Thanks

Link to comment
Share on other sites

  • 3 weeks later...

I figured out the error. Here is what I was getting;

[08:07:51 PM] [ERROR] An unknown or unsatisfactoy response was received during the PIREP filing. It was : <br />
<b>Warning</b>:  imagecreatefromstring(): Empty string or invalid image in <b>/home/u565345103/domains/walkerair.us/public_html/crew/core/common/PilotData.class.php</b> on line <b>1016</b><br />
<br />
<b>Fatal error</b>:  Call to undefined method PilotData::UpdatePilotPay() in <b>/home/u565345103/domains/walkerair.us/public_html/crew/core/common/PirepAcData.class.php</b> on line <b>170</b><br />

The first error "imagecreatefromstring" was due to me not using full URL or rank images--I had to go back and modify that in admin.

The second error was that UpdatePilotPay() is missing from the Autopirep zip file in this thread. Unknown why but I managed to find a link to file that had the entire function (it was also not in the phpvms I downloaded either.... weird) Once I did that my pireps were going through with no error from SmartCARS.

Here is code that was missing from PilotData.class.php

	/**
	 * Update a pilot's pay. Pass the pilot ID, and the number of
	 * hours they are being paid for
	 *
	 * @param int $pilotid The pilot ID
	 * @param int $flighthours Number of hours to pay the pilot for
	 * @return bool Success
	 *
	 */
	public static function updatePilotPay($pilotid, $flighthours)
	{
		$sql = 'SELECT payrate
					FROM '.TABLE_PREFIX.'ranks r, '.TABLE_PREFIX.'pilots p
					WHERE p.rank=r.rank
						AND p.pilotid='.$pilotid;

		$payrate = DB::get_row($sql);

		$payupdate = self::getPilotPay($flighthours, $payrate->payrate);

		$sql = 'UPDATE '.TABLE_PREFIX.'pilots
					SET totalpay=totalpay+'.$payupdate.'
					WHERE pilotid='.$pilotid;

		DB::query($sql);

		if(DB::errno() != 0)
			return false;

		return true;
	}

 

Link to comment
Share on other sites

  • 2 weeks later...

Does anyone have a thought on how I go about figuring out why a pirep wasn't approved?

4 out of 5 flights were auto approved; 5th one is sitting at pending.

The only difference is I have no criteria specified now -- previously I had the defaults but found I didn't want them. Do I have to specify some kind of criteria for it to work?

I don't appear to have any errors in the php log.

And I'm assuming now that it failed because I had nothing defined in "Criteria". I guess I must have at least "1" criteria in the list.

Edited by Ither
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Hi I have managed to get it running but one thing puzzles me where do i get the criteria codes from ?

and can I add a criteria for adding fuel while in flight ?

 

Regards

Wazza

 

ok strike that its installed but not working there is a flight taken after i installed it and it still showing pending..

 

Edited by Booagce
Link to comment
Share on other sites

  • 4 months later...

Hi!

I have installed the module, configured everything correctly, it does not generate any error, unless I see it, and when I finish the flight and report with SmartCars, the PIREP remains as pending, it does not auto-accept.

I don't know what may be failing. Can someone help me?

Link to comment
Share on other sites

  • Administrators
6 hours ago, AlexOlPed said:

Hi!

I have installed the module, configured everything correctly, it does not generate any error, unless I see it, and when I finish the flight and report with SmartCars, the PIREP remains as pending, it does not auto-accept.

I don't know what may be failing. Can someone help me?

 

phpVMS version?

PHP version?

MySQL or MariaDB version?

Link to comment
Share on other sites

Sounds like you have not set it up correctly. If a module is setup correctly, it works, if it is not working then there is something amiss. Is the an admin sidie with settings? Do you have to edit the local.config file to add some lines to it? You have to make sure they are all in if so and you haven't missed anything. Have you added the criteria?

Link to comment
Share on other sites

16 hours ago, Strider said:

Sounds like you have not set it up correctly. If a module is setup correctly, it works, if it is not working then there is something amiss. Is the an admin sidie with settings? Do you have to edit the local.config file to add some lines to it? You have to make sure they are all in if so and you haven't missed anything. Have you added the criteria?


Mmmm idk, instructions are straight forward, I get the same no error. Files and codes are where they need to be. But Auto Accepting does not work. Looking around at page 1 - 3 Maybe it could be the PIREPData.class.php? This is updated for MySQLi right?(really dumb to ask cause i think it is) I even kept the default criteria. No luck 😕.

What I am going to try (while wait for a response for someone to help cause please i have no idea what to even check 😕 ) is in those first dew pages try those downloadable fixes the OG post commented stating that it fixes those users specific issues. maybe this'll work for me, again; unless someone has a sure fix

Link to comment
Share on other sites

16 hours ago, Strider said:

Sounds like you have not set it up correctly. If a module is setup correctly, it works, if it is not working then there is something amiss. Is the an admin sidie with settings? Do you have to edit the local.config file to add some lines to it? You have to make sure they are all in if so and you haven't missed anything. Have you added the criteria?

 

Well, I have carried out all the steps correctly as indicated by the readme, and it does not throw any error and I see everything correctly, but I cannot get it to do the autoaccept.

 

I attach the image

Screenshot 2020-07-25_18-41-32-699.png.zip

Link to comment
Share on other sites

  • Administrators

phpVMS 5.5.2 or 5.5.2.72 ??

 

PHP 7.3 may be an issue. phpVMS 5.5.2.72 will install in PHP 7.0-7.2 . It shows errors with PHP 7.3 and above. I am not even sure that phpVMS 5.5.2 will easily install in PHP 7.0 and above.

MariaDB 10.3 and above also cause issues with phpVMS 5.5.2 and 5.5.2.72

 

Is this a new install or an existing install? If existing, what was the old PHP version?

Link to comment
Share on other sites

The only version of phpvms that will install without errors into php v7.3 is phpvms v7 which is only in beta testing right now. Make sure you have the settings correctly setup in the admin panel. You need to set the criteria to accept pireps, if it doesn't find or they are not setup it won't work.

Link to comment
Share on other sites

Can you post your pirepdata.class file?

 

I recall when I integrated his (I use custom one now) way back at start the pirepdata file had the function in wrong spot so I ended up with pending pireps. 
 

I can look at it and reference my backups from last year. 

Link to comment
Share on other sites

16 minutes ago, Ither said:

Can you post your pirepdata.class file?

 

I recall when I integrated his (I use custom one now) way back at start the pirepdata file had the function in wrong spot so I ended up with pending pireps. 
 

I can look at it and reference my backups from last year. 

 

I attach the pirepdata.class

PIREPData.class.php.zip

Link to comment
Share on other sites

18 hours ago, ProAvia said:

phpVMS 5.5.2 or 5.5.2.72 ??

 

PHP 7.3 may be an issue. phpVMS 5.5.2.72 will install in PHP 7.0-7.2 . It shows errors with PHP 7.3 and above. I am not even sure that phpVMS 5.5.2 will easily install in PHP 7.0 and above.

MariaDB 10.3 and above also cause issues with phpVMS 5.5.2 and 5.5.2.72

 

Is this a new install or an existing install? If existing, what was the old PHP version?

I have this version: PhpVMS 5.5.2.72 simpilot/php7.2

 

I need this version because it's the version that is compatible with SmartCARS. My intention is that when version phpvms 7 is compatible with SmartCARS, then I would either migrate to that new version or make a new environment.

Link to comment
Share on other sites

44 minutes ago, Strider said:

The only version of phpvms that will install without errors into php v7.3 is phpvms v7 which is only in beta testing right now. Make sure you have the settings correctly setup in the admin panel. You need to set the criteria to accept pireps, if it doesn't find or they are not setup it won't work.

What criteria do I have to add in the list to accept the pireps?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...