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.

Topics - Timothee

Pages: [1]
Support for SIM ACARS / Landing heading
« on: June 19, 2017, 09:41:53 AM »

The final flight reports contain the value "landing heading". This value does not correspond with the actual heading during landing but with the final position when the flight is ended (for exmaple gate position).
As an example: I landed in LEBB on Runway 30, I would expect the landing heading is somewhere near 300° but SIM ACARS reported 9°.

Would be nice if you could correct this in the next SIM ACARS version.

Bug reports / [VAM2.6.2] Acars Data MAX_JOIN_SIZE
« on: May 07, 2017, 03:14:32 PM »

After a while it may happen that the flight details page only shows an error message instead of the acars data:
Code: [Select]
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
In my oppinion there is an unnecessary join in the SQL statement.
I changed the last SQL query in flight_details.php and validate_vam_acars.php as followed:
Code: [Select]
$sql = "select vt.time_flag, vt.flight_status,vt.ias,,vt.altitude,vt.fuel_used,vt.oat from vam_track vt where vt.flight_id='" . $vamflightid . "' order by asc";

Support for SIM ACARS / Taxi to gate
« on: May 02, 2017, 09:01:31 PM »

What exactly triggers the taxi to gate message in SIM ACARS? Is it time based after touchdown or speed indicated?
I am asking because I get a taxi speed penalty quite often immediately after the taxi to gate message. I would need to brake unrealisticly hard to avoid a taxi speed penalty.


For those who are using VAM for more than a year may have noticed that the statistics (global and pilot) for flights per day in current month do not show the correct values anymore.
The calculation ignores the current year and adds all flights per day, no matter what year they took part. Say I made 2 flights in 2016-04-30 and 4 flights in 2017-04-30 the statistic will show 6 flights for today.

To correct this I changed the following two SQL queries.

vam/stats.php (line 38)
Code: [Select]
$sql2 = "select IFNULL(sum(c),0) as co from v_flights_pilots where date_format(flightdate,'%m%Y')=date_format(now(),'%m%Y')  and date_format(flightdate,'%d')=$i";

vam/pilot_profile_stats_sql.php (line 274)
Code: [Select]
$sql2 = "select IFNULL(sum(c),0) as co from v_flights_pilots where pilot=$pilotid and date_format(flightdate,'%m%Y')=date_format(now(),'%m%Y') and date_format(flightdate,'%d')=$i";

Suggestions to add to VAM and SIM ACARS / [SIM ACARS] Refueling penalty
« on: January 09, 2017, 04:59:30 PM »

It would be nice if the refueling penalty is ignored as long as the plane is on ground or the engines are off. It should only count if the aircraft is in the air.


Bug reports / [VAM2.6.2] Landing penalty calculation
« on: December 29, 2016, 09:20:14 PM »

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


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.


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

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";
  $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";

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

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')";


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.


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
Code: [Select]
AND a2.ident=r.arrival

This issue has been fixed already in my modified query over here:

Bug reports / [VAM2.6] Not possible to book route without alternate airport
« on: December 04, 2016, 05:03:07 PM »
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.

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.

Code: [Select]
$sql1 = "select a3.iso_country as alt_country, as alt_name, as dep_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, as alt_name, as dep_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";

Code: [Select]
    $sql = "SELECT DISTINCT as alt_name, a3.iso_country as alt_country, as dep_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";

Pages: [1]