Jump to content

Recommended Posts

  • Administrators
Posted

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

  • Moderators
Posted

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,

Guest lorathon
Posted

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?

Guest lorathon
Posted

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

  • Administrators
Posted

Instead of editing that then, just call:

PIREPData::ChangePIREPStatus($pirepid, PIREP_ACCEPTED)

I guess you get the $pirepid after you submit it

  • Moderators
Posted

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.

  • Administrators
Posted

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
Guest lorathon
Posted

Mark,

I will give it a little looksie when I get home.

Regards,

Jeff

  • Moderators
Posted

Thanks Jeff,

I wasnt sure where to post if it was a phpVMS or kACARS resolution but if like Nabeel said its just a case of placing the current update script in the file then it should be an easy fix.

Hopefully...

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...