Jump to content

Automatically accept pireps


mark1million

Recommended Posts

  • Administrators

Nabeel, now my VA is using kACARS and the data is reliable i was wondering is there any way i could automatically accept pireps from that acars only?

Yes, you'd have to add the option to the PIREP array of 'accepted' => PIREP_ACCEPTED.

Perhaps Jeff can point you in the right direction on where to place that, I don't have it installed

Link to comment
Share on other sites

Guest lorathon

Nabeel, i have tried adding this after communicating with jeff and it does not work, is that the correct format?

'accepted' => PIREP_ACCEPTED

In to the array i have tried,

'accepted' => 'PIREP_ACCEPTED',

and

'accepted' => PIREP_ACCEPTED,

Nabeel,

Is the PIREP_ACCEPTED supposed to go into PirepData or come out of it?

Link to comment
Share on other sites

Guest lorathon

Nevermind. I believe I found it.

PIREPData.class.php

Around line 770


VALUES ( {$pirepdata['pilotid']}, 
						'{$pirepdata['code']}', 
						'{$pirepdata['flightnum']}', 
						'{$pirepdata['depicao']}', 
						'{$pirepdata['arricao']}', 
						'{$pirepdata['route']}',
						'{$pirepdata['route_details']}',
						'{$pirepdata['distance']}',
						'{$pirepdata['aircraft']}', 
						'{$pirepdata['flighttime']}', 
						'{$flighttime_stamp}',
						'{$pirepdata['landingrate']}',
						NOW(), 
						".PIREP_PENDING.", 
						'{$pirepdata['log']}',
						'{$pirepdata['load']}',
						'{$pirepdata['fuelused']}',
						'0',
						'{$pirepdata['source']}',
						{$pirepdata['exported']},
						'{$pirepdata['rawdata']}')";

I am assuming Mark should replace the PIREP_PENDING with PIREP_ACCEPTED

Link to comment
Share on other sites

  • Moderators

Not sure where to post this,

Nabeel and Jeff, i have an updated script from Jeff which now accepts pireps from kACARS but it isnt updating the pilots hours, its adding the pirep as accepted OK just not adding to the pilots hours totals.

I have manually run the reset hours from the admin menu which has updated everyone correctly.

Jeff, I will post on your forum also.

Link to comment
Share on other sites

  • Administrators

Not sure where to post this,

Nabeel and Jeff, i have an updated script from Jeff which now accepts pireps from kACARS but it isnt updating the pilots hours, its adding the pirep as accepted OK just not adding to the pilots hours totals.

I have manually run the reset hours from the admin menu which has updated everyone correctly.

Jeff, I will post on your forum also.

I will change it to re-calculate when changing the status. You'd place that code probably in the kACARS module is the best idea.

  • Like 1
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...