Jump to content

ln-asm

Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by ln-asm

  1. Hey guys,

    I'm recoding our VA's website these days, and I'm trying to get rid of the latest flight map but not quite sure what to replace it with.. Is there anyone who has done something similar, or just have any ideas in general on what else one could do with the space?

    Thanks :)

    Anders

  2. You can add the code where ever you want it to be displayed.

    For anyone using this code: be aware, Vatsim is rather strict when it comes to downloading data from their servers, and with this code, every metar will be downloaded every time someone accesses the page. If you have quite some traffic to your site, they'll easily block your server's access to download from Vatsim, so you might want to consider downloading and save the data on your server, and then have a script check if your local file is older than x minutes, and if it is, redownload. It's not too difficult to set up, and all you need can be found by a simple search (I don't have access to my FTP at the moment so I can't post my code)

    Have a read in the Vatsim forums as well:

    http://forums.vatsim.net/viewtopic.php?f=68&t=65859

    Anders

  3. and iff you delete a pilot with more then 1000 flights they will also be lost how will you do that?

    That's what happens in the default phpVMS setup, but if he creates his own script, no flights needs to be lost ;)

    We (Virtual Norwegian) run a script on a daily basis to send pirep reminders, delete pilots etc without losing any of the pireps. Tho we ended up deleting 80,000 of them on our own because it took way to long to accept new pireps..

    Great idea with the module by the way. Would be a lot easier than sending emails back and forth to be deleted from the system like we've been doing for resignations

    Anders

  4. Hello everybody :)

    I'm currently trying to create a simple new live map and the map itself is more or less good to go, but I'd like to draw a flight path from the departure airport -> current position of the aircraft -> arrival airport when you take the mouse over a marker.

    I have all the information needed, but for some reason the flight path won't be drawn correctly. If I have 2 or more aircraft on the map, it will only draw the path of one of the aircraft, regardless of which one you hover.

    I don't really know Javascript too well, so I really hope someone in here will be able to help out :)

    This is the code I have at this point:

    var planes = [
     ['NAX932B', 59.32, 11.95, 0, 183, 60.1939, 11.1004, 55.6179, 12.656, '25000', '310', 'NAX106 - Anders Moen', 'LN-NOO', 'ENGM', 'EKCH', '106', 'Climbing', '00:42']
    ];
    // planes 0 = flight number, 1 = latitude, 2 = longitude, 3 = counter, 4 = heading, 5 = dep airport latitude, 6 = dep airport longitude, 7 = arr airport latitude, 8 = arr airport longitude, 9 = altitude, 10 = speed, 11 = pilot, 12 = aircraft, 13 = dep ICAO, 14 = arr ICAO, 15 = clean pilot ID, 16 = phase of flight, 17 = EET
    
    for (var i = 0; i < locations.length; i++) {
    
       var planes = locations[i];
    var hdg = planes[4];
    var image = new google.maps.MarkerImage("http://www.virtualnorwegian.net/img/livemap/"+hdg+".png",null,new google.maps.Point(0,0),new google.maps.Point(15, 15),new google.maps.Size(30, 30));
    var contentString = planes[0];
    var infowindow = new google.maps.InfoWindow({content: contentString});
    var quickinfowindow = new google.maps.InfoWindow({content: contentString});
    var myLatLng = new google.maps.LatLng(planes[1], planes[2]);
    var lat1 = planes[5]; var lat2 = planes[1]; var lat3 = planes[7];
    var lng1 = planes[6]; var lng2 = planes[2]; var lng3 = planes[8];
    
     // Aircraft on map
     var marker = new google.maps.Marker({
     	position: myLatLng,
    	 map: map,
    	 icon: image,
    	 optimized: false,
    	 internalid: planes[15],
    	 zIndex: planes[3],
    	 rotation: planes[4],
    	 mouseovertxt: '<b>'+planes[11]+'</b><br />'+planes[0]+'-'+planes[13]+'-'+planes[14]+'<br />Status: '+planes[16]+'<br />EET: '+planes[17]
     });
    
    
    // Dep->plane->arr
    var flightPlanCoordinates = [
    	new google.maps.LatLng(lat1, lng1),
    	new google.maps.LatLng(lat2, lng2),
    	new google.maps.LatLng(lat3, lng3)
    ];
    
    flightPath = new google.maps.Polyline({
    	path: flightPlanCoordinates,
    	geodesic: true,
    	strokeColor: "#c3524f",
    	strokeOpacity: 1.0,
    	strokeWeight: 2
    });
    
    
    // Mouseover
     google.maps.event.addListener(marker, 'mouseover', function () {
     	quickinfowindow.setContent(this.mouseovertxt);
    	 quickinfowindow.open(map, this);
    	 flightPath.setMap(map);
     });
    
    
    // Mouseout
     google.maps.event.addListener(marker, 'mouseout', function () {
    	 quickinfowindow.close();
    	 flightPath.setMap(null);
     });
    
    }
    

    Like I wrote, everything here works fine, except the flight path when there are 2 or more aircraft on the map. I have searched and searched, and I've seen other people write that you need to clear the flightPlanCoordinates with flightPlanCoordinates = []; but this has not given me any other results.

    Any ideas? :)

    Thanks!

    Anders

  5. logo.png

    Virtual Norwegian is a virtual airline based on the real airline Norwegian Air Shuttle, one of Europe's largest low cost carriers.

    As a pilot in Virtual Norwegian, you get to choose among flights to over 100 destinations, operated from our hubs in Norway, Sweden, Denmark, Finland, Spain, UK and our recently added hub in Bangkok.

    Make a short hop in Scandinavia, or perhaps a longer flight into the heart of Europe, or maybe even try a long haul flight from Scandinavia to either Bangkok or New York?

    Choose between several airframes, such as the Boeing 737-300/800, our brand new Boeing 787-8 or our historic MD80 or Fokker 50.

    Our schedules are updated weekly, and the ATS-routes and callsigns are updated continously, so you are guaranteed up-to-date flights.

    Norwegian is rapidly expanding, and around November, several new routes will be launched, including flights from several German airports to several Spanish airports and from some of the northern capitals to Florida.

    And with an order of over 250 new aircrafts, it's not going to stop just yet!

    We got a large and friendly community, with about 400 active pilots, where everyone are willing to help each other, whether it's through our forums, support center, email or Facebook.

    We can also offer something rare among virtual airlines, a highly realistic CrewBriefing, based on the real one!

    You can check out a preview of our automatically created documents from the CrewBriefing here: http://cb.virtualnor...net/preview.pdf

    Why not join us today for lots of fun?

    The Virtual Norwegian Staff

    http://www.virtualnorwegian.net

    • Like 2
  6. I was actually thinking more of what happens when you hit the "Accept"-button for pending PIREPs in the administration center, not how the PIREP itself it filed. But it looks like there could be something in this file anyway, I'll try to figure out something! But yeah, if anyone knows exactly which tables and what columns are updated in the database when you accept a PIREP, that'd be highly appreciated :)

    Anders

  7. Hello everybody!

    I've tried to search for this, but I can't seem to find anything...I'm just wondering, what exactly is updated in the database when accepting a PIREP?

    What I have so far:

    - PIREP status set to 1 (accepted)

    - Added hours to pilot's account

    - Added number of flights to pilot's account

    but is there anything else than this?

    Also: is there anyone who knows where I can find the SQL query for pending PIREPs?

    Thank you very much for your replies! :)

    Anders

  8. Hello,

    after some researching on this I decided to make this thread..

    When I went to our site today, these to errors suddenly came up:

    Warning: file_put_contents(): Only 8192 of 11249 bytes written, possibly out of free disk space in /usr/local/pem/vhosts/100297/webspace/httpdocs/core/classes/CodonCache.class.php on line 210
    and this:
    Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

    What should I do about this?

    I do have sites which aren't part of phpVMS at all (same domain, same database etc), and they work without any problems at all.

    Expect that those errors shows, the only thing I've seen not working so far is the ACARS. Not able to log in at all...

    Many thanks for your help!

    Anders

  9. Hello,

    we have run into the same problem as olk03.

    We have tried what simpilot said, it didn't help. And also, when we look at phpvms_sessions, every pilotid is 0, which sounds very incorrect..

    In the beginning everything worked just fine, we got logged in, but then suddenly it wouldn't let us in anymore.

    Thanks in advance!

×
×
  • Create New...