Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by bass

  1. I make a simple VATSIM card and have a problem. It is impossible to output an array of all coordinates, now only one is displayed. <h3 id="example">Example:</h3> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.1/dist/leaflet.css" /> <script src="https://unpkg.com/leaflet@1.0.1/dist/leaflet.js"></script> <div id="map" style="width: 800px; height: 400px"> </div> <script src="http://code.jquery.com/jquery-2.0.3.min.js"> </script> <script> //var map = L.map('map').setView([0,0], 2); var map = L.map('map', { 'center': [48.11815, 16.55964], 'zoom': 3, 'layers': [ L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', { attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>' }) ] }); function moveISS (data) { $.getJSON('http://test.uspeh-partner.xyz/fsbuild/json.php', function(data) { data.forEach(function(item, index) { var lat = item.latitude; var lon = item.longitude; iss.setLatLng([lat, lon]); isscirc.setLatLng([lat, lon]); map.panTo([lat, lon], animate=true); }); // iss.setLatLng([lat, lon]); // isscirc.setLatLng([lat, lon]); // map.panTo([lat, lon], animate=true); }); setTimeout(moveISS, 10000); } var ISSIcon = L.icon({ iconUrl: 'http://open-notify.org/Open-Notify-API/map/ISSIcon.png', iconSize: [50, 30], iconAnchor: [25, 15], popupAnchor: [50, 25], shadowUrl: 'http://open-notify.org/Open-Notify-API/map/ISSIcon_shadow.png', shadowSize: [60, 40], shadowAnchor: [30, 15] }); var iss = L.marker([0, 0], {icon: ISSIcon}).addTo(map); var isscirc = L.circle([0,0], 2200e3, {color: "#c22", opacity: 0.3, weight:1, fillColor: "#c22", fillOpacity: 0.1}).addTo(map); moveISS(); console.log(data); </script>
  2. Hello, for my site I made a check whether the pilot arrived at the right airport or not. The script is installed in pirep_viewreport.tpl This script I found on the Internet and applied it to the site. In fact it is a distance rival. 1) You set an acceptable landing distance from the point (Airport) to an example of 35 km. 2) The data is compared, Example: If the pilot landed the aircraft no further than 35 km from the point of coordinates of your arrival airport, the Value is ALL GOOD, if this distance is more than permissible (in my case 35 km), So the pilot arrived at some other airport and issued a warning !. This photo shows that I should fly to UNNT, but I made a circle and returned to the airport of departure. On this photo you can see a warning !!! "You did not land the plane at the designated airport!" This is the conclusion of an example when everything is fine. The pilot arrived at the right airport. This is the code itself. <!--Скрипт сравнения расстояния--> <?php // Радиус земли define('EARTH_RADIUS', 6372795); function calculateTheDistance ($φA, $λA, $φB, $λB) { // перевести координаты в радианы $lat1 = $φA * M_PI / 180; $lat2 = $φB * M_PI / 180; $long1 = $λA * M_PI / 180; $long2 = $λB * M_PI / 180; // косинусы и синусы широт и разницы долгот $cl1 = cos($lat1); $cl2 = cos($lat2); $sl1 = sin($lat1); $sl2 = sin($lat2); $delta = $long2 - $long1; $cdelta = cos($delta); $sdelta = sin($delta); // вычисления длины большого круга $y = sqrt(pow($cl2 * $sdelta, 2) + pow($cl1 * $sl2 - $sl1 * $cl2 * $cdelta, 2)); $x = $sl1 * $sl2 + $cl1 * $cl2 * $cdelta; // $ad = atan2($y, $x); $dist = $ad * EARTH_RADIUS; return $dist; } $query = "SELECT * FROM phpvms_airports WHERE icao='$pirep->arricao'"; $Result = DB::get_results($query); foreach($Result as $a) { $lat1 = $a->lat; $long1 = $a->lng; } $lat2 = round($latP, 4); //LAT точки приземления $long2 = round($lngP, 4); //LON точки прибытия ?> <br> <?php $dopustimaia = 35000; // Это число в метрах допустимых от точки (Аэропорта) $itogovaia = calculateTheDistance($lat1, $long1, $lat2, $long2); // Это должна быть переменная точки приземления if ($dopustimaia > $itogovaia) { echo '<div class="view-header"> <div class="header-icon"> <i class="pe page-header-icon pe-7s-map-marker"></i> </div> <div class="header-title"> <h3>Благодарность от администрации</h3> <small> Рейс окончен в назначенном аэропорту. </small> </div> </div>'; } else { echo '<div class="view-header"> <div class="header-icon"> <i class="pe page-header-icon pe-7s-speaker"></i> </div> <div class="header-title"> <h3>Предупреждение!</h3> <small> С вас будет взысконно -1000 миль и -10 часов налета. Вы посадили самолет не в назначенном аэропорту! </small> </div> </div>'; } ?>
  3. Yes, only here there is an article, how to draw any information with the API json http://aero-info.do.am/publ/vyvodim_dannye_iz_tablicy_v_vide_json/1-1-0-5
  4. Who needs a good plug-in to create an effect like on the scoreboard at the airport, you can download here. You can apply to any information. http://aero-info.do.am/load/shablony_html/komponenty/tekst_kak_na_tablo_aehroporta/15-1-0-5
  5. bass


    I saw the Log in the report with your application. How is it different from the others? It makes no sense to install your agent. I'm looking for a software that transmits the Log high, visibility, wind, flaps, speed, steering, stalling, lights, weather conditions (rain, snow, storm), and so on, I have a script that calculates the errors and exposes the Rating for the flight and sweeps the data into the database. Below taking notes. For example (+5 for taking off in strong winds, -10 for not included lamp, -15 over the speed limit release flap )
  6. bass


    Windows XP? not work?
  7. Sometimes the message Cloud not get data
  8. Yes, I made the flight booking. Loaded at the right airport, and put on the emergency brake, click on GET Flight, but nothing happens)
  9. Can't run the program APVA Click on GET FLIGHT and nothing happens.
  10. How to add LOG weather data, visibility, wind, release the flaps, landing gear and so on?
  11. Aircraft is our of service- What does it mean? Always goes this error.
  12. Departure boards.New scoreboard built on a frame of HTML and CSS.Output <?php include('departure.tpl'); ?> in any part of your website. In this form you can display any table with your information.Who in flight (acars)Extreme flightBooked flightsand so on... Details here
  13. bass


    /action.php/pilots ??? It does not suit me(
  14. bass


    Reviewed a lot of information, but was not able to get this module to work(((Is there someone who have this module working?
  15. Hey all, I made a small module that generates the Personal ID card of the pilot, and even generates the overall statistics of the company. All information is displayed on the foreground of any pictures JPGWho is interested in the module, write in PM) The module generates links that you can embed on sites, forums, blogs with information about the company or the personal card pilot. =) -------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------
  16. To help you, you need to look at the HTML code of your site
  17. Help to make in PHP code. A visual example of what I want to show on the page of the pilot. Want to get to the page profile_main.TPL information.In a Reminder that I'm part of the event (date of event date and time ) Tried to put some of the code from events_event.tpl <?php $check = EventsData::check_signup(Auth::$userinfo->pilotid, 6); if($check->total >= '1') { echo '<td>Yes</td>'; } else { echo '<td>No</td>';?> <?php } ?>
  18. This module does not work on the default PHPVMS engine This work was done to me under the order. If interested, I can give contacts to the person who did this for me.
  19. I have such a system. It is possible from the airport, only if there is a FREE (not booked) plane.
  20. I haven't tried it, but I think that will work.
  21. There is a code which can output a table of the last flights. frontpage_reports.tpl (index.php/pireps/mine) Question!How to display such a list, only for each pilot separately?
  22. Hi, could you tell me in what file you can change the download site ?Now the page is loaded the website frontpage_main.tplI want to make that site the first page loaded Login_form.tpl
  23. Hi all.I did a widget for other sites that would show information about my company. Has the ability to display code on other sites. Pilots <!-- Запрос на получения данных Новые пилоты--> <?php $xml = simplexml_load_file("http://exemple.ru/lib/rss/latestpilots.rss"); $json = json_encode($xml); $data = json_decode($json, TRUE); ?> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td>Pilots</td> </tr> <?php foreach($data['channel']['item'] as $row) { ?> <tr> <td><?php echo $row['title'];?></td> </tr> <?php } ?> </table> <!--конец--> Reports <!-- Запрос на получения данных Крайний рейс--> <?php $xml = simplexml_load_file("http://exemple.ru/lib/rss/latestpireps.rss"); $json = json_encode($xml); $data = json_decode($json, TRUE); ?> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td>Pireps</td> <td>Pilots</td> </tr> <?php foreach($data['channel']['item'] as $row) { ?> <tr> <td><?php echo $row['title'];?></td> <td><?php echo $row['description'];?></td> </tr> <?php } ?> </table> <!--конец-->
  • Create New...