Jump to content

druptown

Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by druptown

  1. same here, it doesn't render the route. It's just a straight line from A to B

    I guess because the Routemap has this in it and acarsmap doesn't. So if anyone can check how to add that to acarsmap.....

    One sidenote to make : this should get it's info from the acarsdata table in the db instead of the schedules. Acarsdata copies the route from the schedules anyway and if a pilot enters his own route, that one is taken.

    <?php
    /* Populate the route */
    if(is_array($mapdata->route_details))
    {
    $list = array();
    
    foreach($mapdata->route_details as $route)
    {
    if($route->type == NAV_VOR)
    {
    $icon = fileurl('/lib/images/icon_vor.png');
    }
    else
    {
    $icon = fileurl('/lib/images/icon_fix.png');
    }
    
    echo 'var loc = new google.maps.LatLng('.$route->lat.', '.$route->lng.');
    var _marker = new google.maps.Marker({
    position: loc,
    map: map,
    icon: "'.$icon.'",
    title: "'.$route->title.'"
    });
    bounds.extend(loc);';
    
    // For the polyline
    $list[] = "new google.maps.LatLng({$route->lat}, {$route->lng})";
    }
    }
    ?>
    

  2. well, there is actually something wrong with google maps.

    PHPVMS has a module called routesmap, you can use it to show all schedules you have on a map if you remove the limit in the module. Which I did.

    It worked great......, untill we passed the 10000 schedules. Now it's only a blank page. It seems that googlemaps can 't handle the amount of markers/polylines. It only has to draw 60000 markers and 30000 polylines

  3. I've added this piece of code and the problem is almost fixed, but the times are still off.

    It works for calculating the hours and minutes correctly, but it forgets the seconds in the pireps flight time. They are not added.... which results in 5 min difference on 10 flights allready.

    Any updates on the monthly stats not showing correcly? It seems that Util::date can't handle the seconds.

    We 've got an difference of 7 minutes allready with 45h flown.

    It shows very hard now since it's our first month and the alltimesstats are shown above, that will get better next month. But still, I'm a perfectionist and like things to be correct.

  4. Dave,

    Found it. I have changed line 60 of toppilot.php into

    regards,

    Cor

    I've added this piece of code and the problem is almost fixed, but the times are still off.

    It works for calculating the hours and minutes correctly, but it forgets the seconds in the pireps flight time. They are not added.... which results in 5 min difference on 10 flights allready.

  5. Not exactly sure what you are asking but I think you are asking if the counts are made before or after the PIREP is accepted. The module currently counts all PIREPS that are pending or approved, the instructions and consequences are in the initial post of this thread.

    I'm having some doubts about what to change so it does only count accepted pireps

            $start = StatsData::GetStartDate();
           $startmonth = date('m', strtotime($start->submitdate));
           $startyear = date('Y', strtotime($start->submitdate));
           $today = getdate();
    
           while ($startyear <= $today[year] ) {
    
               $pilots = PilotData::getAllPilots();
               $month_stats = TopPilotData::get_monthly_stats($startmonth, $startyear);
    
               foreach ($pilots as $pilot) {
                   $totaltime=0;
                   $totalflights=0;
                   $totalmiles=0;
                   if(isset($month_stats)) {
                       foreach ($month_stats as $pirep) {
                           if ($pilot->pilotid == $pirep->pilotid  /* && $pirep->accepted == 1 */ ) {
                               $totaltime = $totaltime + $pirep->flighttime;
                               $totalflights++;
                               $totalmiles = $totalmiles + $pirep->distance;
                           }
                       }
                   }
                   if($totalflights > 0) {
                       TopPilotData::record_stats($pilot->pilotid, $totalflights, $totaltime, $totalmiles, $startmonth, $startyear);
                   }
               }
               if ($startmonth == 12) {$startyear++; $startmonth = 1;}
               else {$startmonth++;}
           }
       }

    My guess is that it has something to do with "/* && $pirep->accepted == 1 */".

    You said to change something on line 52 but that is an empty line in my toppilot.php

  6. I've got an issue too.

    For starters I must say that it works great, my compliments for that.

    but here comes the problem. I've got 2 copies of my website; 1 dummy, which is used to test new stuff (so I don't destroy the real website) and then the real website.

    On the dummy there are only about 30 airports in the database and it works splendid, but you probably hear it coming: on the real website, which has about 42000 airports in the database, it only shows a blank page. No content what so ever. Not even the navigation bar.

    Both site are 100%¨identical , except for the database contents.

    Could it be that the script can't handle this amount of airports?

  7. Instead of using

    <td><div class="progress-container">
    
    <div class="progressbargood" style="width: <%=flight.percomplete%>"><%=flight.percomplete%>%</div>
    
    </td>
    
    

    i've used this :

    <td><div class="progress-container"> 
    <?php 
               if($schedule->distance > $flight->distremaining)
    			echo '<div class="progressbargood" style="width: <%=flight.percomplete%>"><%=flight.percomplete%>%</div>';
               else
    			echo '<div class="progressbarbad" style="width: <%=flight.percomplete%>"><%=flight.percomplete%>%</div>';
           ?>
    
    </td>

    but there's something wrong with the line :

                if($schedule->distance > $flight->distremaining)
    

    It seems that I'm calling the data the wrong way since the "IF" function always returns a FALSE value and echos the "ELSE" value.

    The purpose of all this is that if a pilot forgets to land and flies on, my progress bar turns red. Not it starts counting ASC again when the distance remaining is larger than the totaldistance.

    Any help would be nice.

  8. I have two problems with the progress indicator:

    1. 0% is not in the left side of the bar - see image

    2. how can I make the % to be vertically centered?

    LE

    1. is solved partially, I used in the template <center> and this moved it. Now the bar starts from the left, but the % value is also moved to the left.

    2. still an issue.

    Can you show me how you used that <center> in the template? I can't get it right. My bar works, but it's filling from the center out to left and right, just as yours.

×
×
  • Create New...