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 [2] 3 4 ... 6
16
Bug reports / Re: [VAM2.6.2] Acars Data MAX_JOIN_SIZE
« on: January 10, 2019, 11:25:33 AM »
Over time another query leads to the same problem.

In flight_details.php the first SQL statement (about line 34) again contains more joins than necessary.

Original statement:
Code: [Select]
$sql = "select * , date_format(flight_date,'$va_date_format') as flight_date from vam_track vt , vampireps vp ,gvausers u where vt.flight_id = vp.flightid and u.gvauser_id = vp.gvauser_id and vp.flightid='" . $vamflightid . "'";

Modified statement:
Code: [Select]
$sql = "select * , date_format(flight_date,'$va_date_format') as flight_date from vampireps vp, gvausers u where u.gvauser_id = vp.gvauser_id and vp.flightid='" . $vamflightid . "'";

17
Support for VAM 2.4 - 2.6 / Re: Flight Validation
« on: September 19, 2018, 10:20:14 PM »
Yes thats a well known problem. Create an index for the column report_id of the table va_finances.

Code: [Select]
ALTER TABLE va_finances ADD INDEX (report_id);

18
Support for VAM 2.4 - 2.6 / Re: Fleet page shows no aircraft
« on: August 03, 2018, 01:57:37 PM »
Set a location (ICAO code) for your planes. I'm sure that solves your problem.

19
Support for VAM 2.4 - 2.6 / Re: Fleet page shows no aircraft
« on: August 02, 2018, 06:30:19 PM »
Impossible to say without further information. In the SQL query are at least 5 tables involved, so depends in which one you are missing something.
Post a screenshot of the following screen from the Admin Panel: Fleet manager -> <your aircraft> -> Edit

20
Support for VAM 2.4 - 2.6 / Re: Problem calling Details of Flight
« on: August 02, 2018, 10:11:19 AM »
Note sure if this was the problem you are describing but check this solution
http://virtualairlinesmanager.net/foro//index.php?topic=1319.0

21
So just in case, I only told half the truth. Looks like it depends on the server configuration whether HTTPS works. One possible solution for a problem is found here:
http://virtualairlinesmanager.net/foro//index.php?topic=1886.0

22
Support for SIM ACARS / Re: [Solved] Error trying to connect (SSL?)
« on: July 31, 2018, 08:12:09 PM »
Glad you solved it.
You can actually test it by yourself. Go to https://www.ssllabs.com and select test your server.
If you look for TLS 1.0 in the report it will be shown as not supported (Off).

23
Support for SIM ACARS / Re: Error trying to connect (SSL?)
« on: July 31, 2018, 07:53:43 PM »
Assuming the URL in your signature is your VA I did some tests with it. Don't worry, before SIM ACARS tries to connect to VAM a SSL/TLS handshake has to be established, so I don't need a valid URL or a VAM user.

What I noticed is, SIM ACARS is trying to negotiate TLS 1.0, which is disabled on your webserver. Thats actually a good practice. Since TLS 1.0 is still enabled on our webserver I never had this issue.
I don't have some deep knowledge about .NET but what I assume is SIM ACARS was compiled to be compatible with older frameworks or has the security protocol explicitly set to TLS 1.0.

However, luckily we are able to override this behaviour. Create a new file in your SIM ACARS directory called "SIM ACARS.exe.config".
Put the following content inside that file:
Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <runtime>
      <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false" />
    </runtime>
</configuration>

The value is a bit misleading but you actually tell the application to use strong protocols. Now test again. If it works you have to provide this additional file to your VA pilots.

24
This issue is bothering me since I started to use VAM.
I havenĀ“t looked into the files yet so this is just an idea: Why not do the sql call with each map refresh and count the rows/data sets.
If you could output the table as an array (like $live_flights = array( "$flight_no1", "$flight_no2", ...), you could probably use foreach or a for loop to create a marker for each flight.
I will play arround with MySQL a bit and test a few ideas.

Regards
Tim

This isn't really the issue here. The markers for every plane etc. works perfectly fine, even if multiple flights at the same time are active. What we are talking about are the initial coordinates the map is centered on when loaded.

25
Yes that was what I was going for, glad you found it ;)

26
Just a wild guess but how many rows does the table "airports" count in your installation?

27
The SQL query you pasted isn't the one responsible for the map coordinates. There are the following lines just below:

Code: [Select]
[...]
$sql_map2 = "select * from vam_live_acars where flight_id='".$row["flight_id"]."' order by id asc";
if (!$result2 = $db_map->query($sql_map2)) {
die('There was an error running the query  [' . $db_map->error . ']');
}
while ($row2 = $result2->fetch_assoc()) {
$flights_coordinates ["gvauser_id"] = $row2["gvauser_id"];
$flights_coordinates ["latitude"] = $row2["latitude"];
$flights_coordinates ["longitude"] = $row2["longitude"];
$flights_coordinates ["heading"] = $row2["heading"];
$datos [$index2][$index] = $flights_coordinates;
$index ++;
}
[...]
var var_location = new google.maps.LatLng(<?php echo $datos[0][0]["latitude"]; ?>,<?php echo $datos[0][0]["longitude"]; ?>);
[...]

As you will see, the source of the coordinates is vam_live_acars (sorted ascending). Obviously the map can only have one view location, so the location is set to the first coordinates found in vam_live_acars. This will always return the departure airport of the first flight (in case multiple flights are active). Don't get me wrong, the query is used to display the current flight path of each flight so it needs to be there, but it can not be used to set the map coordinates.

What you probably could do is implementing the tracking of the selected aircraft, quite similiar to the follow mode in Flightradar24. But to achieve this a complete rewrite of the current map would be necessary. Currently VAM reloads the complete page to refresh the map. It would be much smoother to reload only the markers. This is just an idea and not something I have done already.

Whatever you have in mind doing, for the current coordinates of each pilot the table vam_live_flights is your friend. There is one line per flight including the coordinates since the last update from SIMAcars.


28
I assume you corrected the entry in your VAM database. The problem is, SIMAcars doesn't care for this table.
SIMAcars comes with its own database, including a table with airports. For validating departure and arrival airports the data from the local database is used.

The local database has to be edited manually by each SIMAcars user, using a tool like DB Browser for SQLite.
You may wonder why SIMAcars is using a local database for this. The only benefit is, SIMAcars can be used offline without an Internet connection and is therefore able to validate your position.
From my point of view, there is too much logic implemented in SIMAcars, but thats another story.

To solve your problem you don't have many options.

a) Provide a corrected DB file for your VA pilots. But replacing the file will also delete all reports which are stored locally and the VA profile (username, password, URL, etc.)
b) Explain each VA pilot how they can edit the database manually
c) Wait for SIMAcars 1.X which hopefully will include an update function for this case or works completely different (validation of airports done by VAM)
d) Write your own tracker

29
QUESTION:  After creating a NEW VIRTUAL AIRLINE link in SIMACARS... having http://HTTPS://www.blahblah.com...  will SIMACARS be able to connect to a HTTPS:?

Yes, without a doubt. We are using SSL. Just correct the script locations in vam_index_header.php and vam_header.php. IIRC one link leads to bootstrapcdn.com and the other to datatables.net. If you don't correct them you will get a certificate warning even if you are using a valid certificate.

For SIMAcars you don't need to change much, just create a new VA profile with HTTPS instead of HTTP (redirections will not work!).

30
So I will start with answering your questions first before I will start with my concerns.

a) Yes, the data you are looking for is in the table vam_live_flights and is updated every 60 seconds by SIMAcars
b) The table vam_track is "static" and only updated once a pilot sends his report
c) As stated in b) this is not the data you are looking for
d) Sure

SIMAcars is updating vam_live_flights and vam_live_acars every 60 seconds. vam_live_flights contains one row for every active flight. vam_live_acars contains multiple rows per flight, the data is used to display the flight track on the map.

As you already noticed, the map loads the departure airport of a flight. This is due to the SQL query, selecting the first coordinates in vam_live_acars. This will return always the departure aiport so its useless. It would make more sense to get the coordinates from vam_live_flights.

However, you want a tracking map. This is easy to achieve, just correct the SQL query. But, what you probably didn't thought about, what do you want to track if you have multiple active flights?

Because of this, I set the coordinates in our VA to 0, 0 to display more or less the whole world. Sure there is no fancy tracking but as I said, as soon you have more than one flight you don't know anymore what you want to track.

Code: [Select]
[...]
var var_location = new google.maps.LatLng(0, 0);
var var_mapoptions = {
center: var_location,
zoom: 2,
[...]

Pages: 1 [2] 3 4 ... 6