Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Timothee

Pages: 1 ... 4 5 [6]
76
Bug reports / [VAM2.6.2] Landing penalty calculation
« on: December 29, 2016, 09:20:14 PM »
Hey

I don't know if this is considered a bug, but I noticed some changes in the calculation of the landing penalty which leads to a "strange" result.

If I remember correctly in VAM 2.5 the VA parameter "Landing Penalty 1" was never used. At the moment the landing penalty 1 is always subtracted from the planes status no matter how good the landing was. That means flight wear + landing penalty 1 is deducted even for a perfect landing.
This seems a bit weird because penalty sounds like something negative.

If this is the desired behaviour I can accept that. If not it would be nice if you could correct it.

As a workaround I changed the VA parameters as followed:
Landing Penalty 1: 0
Landing Penalty 2: 3
Landing Penalty 3: 6

77
Hey

I think something is wrong with the calculation of charter flights showing in the personal statistics.

We have one pilot with 75 regular flights, including 7 rejected flights. Couting of rejected flights is disabled.
The personal statistics shows correctly 68 total flights. But it also shows -14 charter flights.
In the calculations I noticed the rejected flights are subtracted twice which leads to this number.

The issue was found in pilot_profile_stats.php and pilot_profile_details_stats.php.

I wasn't able to correct this problem yet. I replaced the calculation with the one from VAM 2.5.2, which was working fine, but I'm sure there is a reason why you changed it in this version, so maybe you could have a look at it.

Regards

78
Bug reports / Re: [VAM2.6.2] Pilot rank is not calculated correctly
« on: December 13, 2016, 05:27:27 PM »
Don't forget to change line 33 as well:

it reads:

Code: [Select]
while ($row = $result->fetch_assoc()) {
$pilot = $row['gvauser_id'];

Change to:

while ($row = $result->fetch_assoc()) {
$pilot = $row['pilot'];

Just my 2 cents :-)

Cheers,

Peter

Oh right of course, I did change it but somehow overlooked it when I posted it here. Thanks.

79
Totally understand your point.
In this case may I suggest to put this in the documentation somewhere or make the field for alternate airports mandatory?
Just because others had the same problem (http://virtualairlinesmanager.net/foro//index.php?topic=1042.0) and may not be able to solve it.

80
New and Announcements / Re: VAM 2.6 Hot Fix 02 released
« on: December 12, 2016, 09:19:51 AM »
Hey

Thanks for the new hotfix. Your work is very appreciated.

Regards

81
Bug reports / [VAM2.6.2] Pilot rank is not calculated correctly
« on: December 12, 2016, 09:17:56 AM »
Hey

In review_pilot_rank.php you refer to the view v_top_hours for calculating the new rank. Unfortunately the view only contains the top 5 pilots. Any pilot not listed there will not get a new rank even if he has enough hours.
I replaced the SQL statements as followed. But maybe you see a better solution or like to solve it differentely:
Code: [Select]
if ($no_count_rejected==1)
{
  $sql = "select pilot, rank_id, round(sum(time),2) + g.transfered_hours as total_time from v_total_data_flight v inner join gvausers g on g.gvauser_id = v.pilot where id_flight is not null and status<>2 group by pilot order by total_time desc";
}
else
{
  $sql = "select pilot, rank_id, round(sum(time),2) + g.transfered_hours as total_time from v_total_data_flight v inner join gvausers g on g.gvauser_id = v.pilot where id_flight is not null group by pilot order by total_time desc";
}

82
Bug reports / [VAM2.6] Pilot salary calculated as income
« on: December 08, 2016, 09:36:53 AM »
Hey

This has been reported before for older versions but it doesn't seem to be fixed. The pilot salary is inserted as a positiv number in va_finances but instead should be negativ.
The following line in acept_flight.php needs to be changed:
Code: [Select]
$sql = "insert into va_finances (amount,parameter_id,finance_date,gvauser_id,description,report_type,report_id) values (-$quantity, '99995',now(),$pilot ,'$fligth_type:$departure - $arrival','$type', '$flight')";


83
Hey

What exactly was the point of adding the following line to vam_acars_pilot_connection.php?

Code: [Select]
$sql = "update fleets set booked=0 ,gvauser_id=NULL , booked_at=NULL where booked=1 and hangar=0 and gvauser_id=$id";

The behaviour now is, a user loads his booked route into SIM ACARS and the booking of the aircraft is immediately deleted. Any other pilot at the same airport is now able to book the same aircraft again, although there still exists a reserve.

There is absolutely no need to reset the booking at this point! The booking gets reset anyway as soon the pilot sends the PIREP or as soon as the defined time for bookings is reached.

84
Hey

In route_selection_stage2.php there is an error in the SQL statement. When selecting an aircraft for a route the arrival airport shows the name and flag of the departure aiport.
The following line has to be changed:
Code: [Select]
AND a2.ident=r.departure
to
Code: [Select]
AND a2.ident=r.arrival

This issue has been fixed already in my modified query over here: http://virtualairlinesmanager.net/foro//index.php?topic=1054.0

85
Support for VAM 2.4 - 2.6 / Re: Book a flight
« on: December 04, 2016, 05:06:06 PM »
Hey

If you are using VAM 2.6 maybe you experience the same problem which I described here: http://virtualairlinesmanager.net/foro//index.php?topic=1054.msg4406#msg4406
Without change any files you need to set an alternate airport in your routes, otherwise the route is not found.

Regards

86
Bug reports / [VAM2.6] Not possible to book route without alternate airport
« on: December 04, 2016, 05:03:07 PM »
Hey
With VAM 2.6 it is not possible anymore to book routes which do not have an alternate airport set.
The relevant SQL query in route_selection_stage1.php is selecting the country name and flag for the alternate airport which fails if none is found. The result is an empty list although there are routes available.
The same problem happens also in route_selection_stage2.php where no aircraft is available if no alternate airport is set.

Edit:
I implemented a quick and dirty method and modified all three SQL statements (changed inner join to left join for alternate AP). The statement for route_selection_stage2.php had to be changed completely. They are not really tested but seem to work fine.

route_selection_stage1.php
Code: [Select]
$sql1 = "select a3.iso_country as alt_country, a3.name as alt_name,a1.name as dep_name, a2.name as arr_name,
a1.iso_country as dep_country,a2.iso_country as arr_country,flight, departure, arrival, alternative, registry, plane_icao,
f.fleet_id, plane_icao
from routes ro
        inner join reserves re on ro.route_id=re.route_id
        inner join fleets f on f.fleet_id=re.fleet_id
        inner join fleettypes ft on ft.fleettype_id=f.fleettype_id
        inner join airports a1 on a1.ident=ro.departure
        inner join airports a2 on a2.ident=ro.arrival
        left join airports a3 on a3.ident=ro.alternative
        where ro.route_id=$route and re.gvauser_id=$id";

Code: [Select]
$sql2 = "select distinct a3.iso_country as alt_country, a3.name as alt_name,a1.name as dep_name, a2.name as arr_name, a1.iso_country as dep_country,a2.iso_country as arr_country, r.route_id as route, flight,r.departure,r.arrival,alternative,etd,eta,duration from
fleets f inner join gvausers g on g.location = f.location
inner join routes r on r.departure = f.location
inner join fleettypes_routes ftr on ftr.route_id = r.route_id
inner join fleettypes_gvausers ftu on ftu.fleettype_id = f.fleettype_id
inner join airports a1 on (a1.ident=r.departure)
inner join airports a2 on (a2.ident=r.arrival)
left join airports a3 on (a3.ident=r.alternative)
where f.booked=0
and ftr.fleettype_id = f.fleettype_id
and g.gvauser_id=$id
and ftu.gvauser_id=$id";


route_selection_stage2.php
Code: [Select]
    $sql = "SELECT DISTINCT a3.name as alt_name, a3.iso_country as alt_country, a1.name as dep_name, a2.name as arr_name, a1.iso_country as dep_country,a2.iso_country as arr_country , r.route_id,r.flight flight, f.fleet_id, registry as reg, status , plane_description, r.departure, r.arrival, duration, etd,eta,pax_price,flproute,comments, alternative, flight_level
FROM gvausers gu     
    INNER JOIN routes r ON r.departure = gu.location
INNER JOIN airports a1 ON a1.ident=r.departure
    LEFT JOIN airports a3 ON r.alternative=a3.ident
INNER JOIN airports a2 ON a2.ident=r.arrival
    INNER JOIN fleets f ON f.location = gu.location
    INNER JOIN fleettypes_gvausers ftgu ON ftgu.fleettype_id = f.fleettype_id AND gu.gvauser_id = ftgu.gvauser_id
    INNER JOIN fleettypes_routes ftro ON ftro.fleettype_id = f.fleettype_id AND ftro.route_id = r.route_id
INNER JOIN fleettypes ft ON ft.fleettype_id = f.fleettype_id AND ft.fleettype_id = ftgu.fleettype_id AND ft.fleettype_id = ftro.fleettype_id
WHERE gu.gvauser_id=$id
AND f.booked = 0
AND r.route_id=$route order by plane_description, registry asc";

87
Bug reports / Re: Preview Bug
« on: April 27, 2016, 10:23:10 PM »
Hey

I know what the problem is here, unfortunately I wasn't able so far to solve it. If you click the green "Accept" button in the flight info page, the page ajax/vampirep.php is loaded. This script does only calculate the pilots salary and nothing more. The relevant script calculate_flight_finances.php is never called.

But if you accept a flight with the green ok button on the overview page, the script acept_flight.php is loaded. Everything is calculated correctly.

As i said I don't have a quick solution for this problem but I will look into it.


88
Support for VAM 2.4 - 2.6 / Re: Aircraft usage
« on: April 27, 2016, 10:27:45 AM »
Hi

Yes this SQL query is a bit strange since the table "fleets" already contains the summarized hours. There is no need to calculate the sum again.

Unless I'm mistaken I would recommend to replace the statement with the following:
select f.registry, f.hours hrs from fleets f order by f.hours desc limit 5

The Fleets page (fleet_public.php) does exactly the same in its query to get the hours.

89
Bug reports / Re: Flight booked as regular but shown as charter
« on: April 26, 2016, 08:55:52 AM »
This might indeed be a problem with flights during midnight. We had yesterday a VA member with a booked flight. The aircraft was shown was booked and SimACARS loaded the correct flight. But after reporting the flight it was shown as charter instead of regular. He stopped tracking at  00:12:11.

Thanks to LeCoyote for the hint. Btw. if you are the one I think you are then your fixes are always appreciated ;)

Pages: 1 ... 4 5 [6]