-
Posts
1470 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by freshJet
-
-
And try with $end = count($routedata); instead?
That would also have worked actually. Thanks again.
-
Yeah, that's what I was trying to do. It seemed logical at the time
Your version returns 1100nm.
EDIT: Fixed, thanks. I changed:
for($i=1; $i<$end; $i++){
to:
for($i=1; $i<=$end; $i++){
-
I am trying to return the total distance of a route, rather than the great circle distance. I have a complicated method, but I'm not convinced with the result:
function getFPDistance(){ $schedule = SchedulesData::getScheduleDetailed($_GET['plan']); $params->deplat = $schedule->deplat; $params->deplng = $schedule->deplng; $params->arrlat = $schedule->arrlat; $params->arrlng = $schedule->arrlng; $params->route = $_POST['route']; $routedata = NavData::parseRoute($params); $depairport = OperationsData::getAirportInfo($schedule->depicao); $arrairport = OperationsData::getAirportInfo($schedule->arricao); $end = (count($routedata) - 1); $total = 0; $a = -1; $b = 0; # Put lat/lng of each waypoint into array $lat = array(); $lng = array(); foreach($routedata as $wp){ $lat[] = $wp->lat; $lng[] = $wp->lng; } # Calculate the distance between each waypoint in the array for($i=0; $i<$end; $i++){ $a++; $b++; $dist1 = distance($lat[$a], $lng[$a], $arrairport->lat, $arrairport->lng); $dist2 = distance($lat[$b], $lng[$b], $arrairport->lat, $arrairport->lng); $dist = $dist1 - $dist2; $total = $total + $dist; } # Get the distance between the departure airport and the first waypoint $dep_to_first = distance($depairport->lat, $depairport->lng, $lat[0], $lng[0]); # Get the distance between the last waypoint and arrival airport $last_to_arr = distance($lat[$end], $lng[$end], $arrairport->lat, $arrairport->lng); # Add these to the total $total = $total + $dep_to_first + $last_to_arr; return round($total); }
For EGCC-GCTS, this returns 1650nm, with GC distance being 1648nm, route shown below.
NOKIN UN862 LAMAT UN90 NOTRO UM30 SALCO UN864 MONTO UN857 TERTO
Any ideas?
-
AFAIK the charter flight option in kACARS does not depend on the flighttype in the schedules. The flighttype can be P or H, but the pilot can still select charter flight in kACARS.
Ensure that the passenger count exists, as the charter option allows the user to enter the passenger count manually.
-
Takes far too long to load.
-
Woops, that's a very embarrassing mistake
-
I hate to ask for more, but is there a way to get the data from only ACCEPTED PIREPs and have it ignore the data from rejected PIREPs? right now we have completely delete the rejected pireps for the data to stay correct.
public static function TotalCargoBetweenDates($icao, $startdate, $enddate) { //Count total cargo $query = "SELECT SUM(cargo) as cargo FROM phpvms_pireps WHERE depicao = '$icao' OR arricao = '$icao' AND flighttype = 'C' AND DATE(submitdate) >= '$startdate' AND DATE(submitdate) <= '$enddate' AND accepted = '1'"; $result = DB::get_row($query); return $result->cargo; }
-
You can also use the built in function
StatsData::TopRoutes($airline_code)
which also will cache the data for a couple of hours (on release versions of phpVMS) to lighten the load on the system.
I looked at the default, mine is better as the default only shows the top routes based on the timesflown in the schedules. When you overwrite your schedules, these are reset to zero. With mine, it counts the routes manually from the PIREPs.
-
Refreshed admin panel to go with the new site. Still a few touch ups needed here and there.
-
3
-
-
Those are unrelated to the skin, the skin is how the site looks.
Modules usually come with installation instructions. Simpilot always provides detailed installation guides.
-
-
public static function TotalCargoBetweenDates($icao, $startdate, $enddate) { //Count total cargo $query = "SELECT SUM(cargo) as cargo FROM phpvms_pireps WHERE depicao = '$icao' OR arricao = '$icao' AND flighttype = 'C' AND DATE(submitdate) >= '$startdate' AND DATE(submitdate) <= '$enddate'"; $result = DB::get_row($query); return $result->cargo; }
-
Oh, I didn't realise there was a default function
-
Oops, it was something very minor
public static function TotalHoursBetweenDates($icao, $startdate, $enddate) { //Count total hours $query = "SELECT SUM(flighttime) as hours FROM phpvms_pireps WHERE depicao = '$icao' OR arricao = '$icao' AND DATE(submitdate) >= '$startdate' AND DATE(submitdate) <= '$enddate'"; $result = DB::get_row($query); return $result->hours; }
-
You can either place it in PilotStats.class.php or in your own class file. Call it by doing:
echo PilotStats::topRoutes();
-
Cheers guys
Some pics of pilot features:
Stats page is still WIP
-
I don't like the way the top of the white navigation bar moves into the blue backround, looks abit interesting
I don't know what you mean?
http://postimg.org/image/jetrwhc9r/ For me it shows that they are a little bit crammed. Other than that i like it a lot! Nice work man.
Yeah that's just while I get it fixed
-
Well, it doesn't like webkit anyway...
-
Cheers, try it now. Thinking back, it did look like that originally but I cleaned it up using CSS.
EDIT: That didn't work, lineheight is the only property relating to height. I've just noticed it's cutting off the bottom of the image in Chrome.
-
That is odd, looks fine from my end.
What browser are you using? Everything looked OK in Chrome when I tested it.
-
nice minimalistic looking site. However, the latest news section doesnt need that much room. Maybe put something else at the side of it?
Yeah, wondered that too.
-
Your carousel seems to be much taller than the content.
Also what's with the modal it's really annoying. If I wasn't trying to give feedback I would've just left as soon as that popped up.
I like where the design is going (esp compared to your previous designs) but there seems to be a strange mix of flat and shadows/gradients...
Can't see what you mean about the carousel though? Can I see a screenshot?
There is only one gradient, and shadows are limited to where they're necessary - even then they're very faint.
And I did contemplate the use of the modal on the homepage, I'll just get rid of it.
-
It's been a long time and a lot of work. I'm all coded out, but here's my new site
-
1
-
-
It's been a long time and a lot of work. I'm all coded out, but here's my new site
www.freshjetvirtual.com
-
2
-
HubStats Class
in Releases
Posted
Try clearing your cache.