AirNav Systems Forum

AirNav Radar => AirNav Radar Discussion => Topic started by: viking9 on November 05, 2008, 05:09:16 PM

Title: Report generator
Post by: viking9 on November 05, 2008, 05:09:16 PM
Why does Reporter not produce all the information that is in MyLog? Is it a bug or a 'feature'?

Tom
Title: Re: Report generator
Post by: Allocator on November 05, 2008, 05:51:17 PM
What else would you like to see in Reporter?
Title: Re: Report generator
Post by: viking9 on November 05, 2008, 06:21:10 PM
How about first time seen as well as last time and the last squawk?

Those would be useful in pinning down non-positional aircraft seen overhead.
Title: Re: Report generator
Post by: HMN851X on November 06, 2008, 07:13:03 AM
One thing I would like to see in the Report generator is all flights. I try to track flights in and out of my local Airport but the Report only shows the first flight of the day by the Aircraft for example

NPT501 crosses the Isle of man at 01:00 in the Morning but then arrives in the Isle of Man at 06:15 but this flight is not showen in the report :-(

this also is the same for Flybe flights as well
Title: Re: Report generator
Post by: tarbat on November 06, 2008, 08:12:44 AM
HMN851X, yes, that's been asked for before - see http://www.airnavsystems.com/forum/index.php?topic=1399.msg11189#msg11189

I've posted SQL in that thread that will give you all flights for all aircraft for the previous day.  Attached is my report for yesterday, created using SQLite Maestro.

Here's the SQL I currently use for my daily report:
SELECT DISTINCT
  Aircraft.Registration,
  Flights.Callsign,
  Flights.Route,
  Aircraft.AircraftTypeSmall,
  Aircraft.Airline,
  Aircraft.AircraftTypeLong,
  Flights.StartTime,
  Flights.EndTime,
  Aircraft.ModeS,
  date('now','-1 day') AS FIELD_1,
  substr(Flights.StartTime,1,4)||"-"||substr(Flights.StartTime,6,2)||"-"||substr(Flights.StartTime,9,2) AS FIELD_2
FROM
Aircraft
LEFT OUTER JOIN Flights ON (Aircraft.ModeS=Flights.ModeS)
WHERE
  (FIELD_1 = FIELD_2)
ORDER BY
  Aircraft.Registration,
  Flights.StartTime,
  Flights.EndTime,
  Aircraft.ModeS
Title: Re: Report generator
Post by: tarbat on December 12, 2008, 10:40:45 AM
I've been working on a new SQL query that lists ALL aircraft received yesterday, including those without a Flight ID.  SQL listed below, and example report attached.

SELECT DISTINCT
  Aircraft.Registration AS "Reg",
  Flights.Callsign AS "Flight ID",
  Flights.Route AS "Route",
  Aircraft.AircraftTypeSmall AS "ICAO Type",
  Aircraft.Airline AS "Airline",
  Aircraft.AircraftTypeLong AS "Aircraft",
  substr(Flights.EndTime,12,5) AS "Flight Ended",
  Aircraft.ModeS AS "Mode S"
FROM
Aircraft
LEFT OUTER JOIN Flights ON (Aircraft.ModeS=Flights.ModeS)
WHERE
  ((date('now','-1 day') = substr(Aircraft.LastTime,1,4)||"-"||substr(Aircraft.LastTime,6,2)||"-"||substr(Aircraft.LastTime,9,2)) AND
  (Flights.StartTime IS NULL)) OR
  ((date('now','-1 day') = substr(Flights.EndTime,1,4)||"-"||substr(Flights.EndTime,6,2)||"-"||substr(Flights.EndTime,9,2)))
ORDER BY
  Reg,
  Flights.EndTime,
  Aircraft.ModeS