• 热门标签
时间:2011-08-28 16:29来源:蓝天飞行翻译 作者:航空
曝光台 注意防骗 网曝天猫店富美金盛家居专营店坑蒙拐骗欺诈消费者

WHERE (((True)<>False));
'--------------------------------------------------------------------------------
Step 10 - Split the flights that pass the midnight
The splitting procedure must find all the flights that pass from one day to the next one. To split the flight at midnight a new record is inserted between the record with EventTime just before midnight and the next record, that implicitly passes midnight. To split the AmocFlight table, the table must be ordered by TrafficId, and EventTime: For each record the EventTime is checked to see if it is before midnight and if the EventTime of the next record passes to the next day. If the condition is verified, then a new record will be inserted with the EventTime at midnight. The name of the procedure that splits the AmocFlight table at midnight is "SplitFlights()".
Step 11 - Prepare data for merging
This step's purpose is to save in the flight table, two values for each flight leg. These values are the average speed and the climb/descent rate for two consecutive flight legs that belong to the same flight.
This step includes five sub steps:

3.2.3.1.13. Sub step 11.1 - Delete temporary expanded flight table
First sub step is used to clear the content of the temporary expanded flight table, in which the calculation will take place. The executed code is:
'------------------------------------------------------------------------------
DoCmd.DeleteObject acTable, "Amoc_ExpandedFlight"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "Amoc_ExpandedFlight", "ModelFlight", True
'------------------------------------------------------------------------------

3.2.3.1.14. Sub step 11.2 - Copy all flight legs to the expanded flight table
In this sub step all flight legs from the flight table will be appended to the temporary expanded flight table, which is empty. It is necessary to use this temporary table, even if the table has the same structure than the flight table, because the UniqueID field must be filled with consecutive values for each flight and that flight must be sorted ascending by EventTime field values. So finally, in Amoc_ExpandedFlight table, each flight will have ordered flight legs and the unique identifier will have consecutive values in ascending order. The appending query SQL code is:
'------------------------------------------------------------------------------
INSERT INTO Amoc_ExpandedFlight ( TrafficId, CallSign, EventTime, Latitude, Longitude, FlightLevel, GroundSpeed, Source )
SELECT AmocFlight.TrafficId, AmocFlight.CallSign, AmocFlight.EventTime, AmocFlight.Latitude, AmocFlight.Longitude, AmocFlight.FlightLevel, AmocFlight.GroundSpeed, AmocFlight.Source
FROM AmocFlight
ORDER BY AmocFlight.TrafficId, AmocFlight.EventTime;
'------------------------------------------------------------------------------

3.2.3.1.15. Sub step 11.3 - Calculate the average speed and the climb/descent rate
To calculate these two values for each pair of two consecutive flight legs belonging to the same flight, the list of all these pairs is needed. A selecting query is used (AmocFlightUniqueIdPairs). This query will return for each two consecutive flight legs that belong to the same flight, the next values:
UID1 -first leg unique identifier UID2 - second leg unique identifier EventTime1 -first leg event time EventTime2 - second leg event time Lat1 -first leg latitude Lon1 -first leg longitude Lat2 - second leg latitude Lon2 - second leg longitude Level1 - first leg flight level Level2 - second leg flight level

 

The selecting query SQL code is:
'------------------------------------------------------------------------------

SELECT Amoc_ExpandedFlight.UniqueID AS UID1, Amoc_ExpandedFlight_1.UniqueID AS UID2, Amoc_ExpandedFlight.EventTime AS EventTime1, Amoc_ExpandedFlight_1.EventTime AS EventTime2, Amoc_ExpandedFlight.Latitude AS Lat1, Amoc_ExpandedFlight.Longitude AS Lon1, Amoc_ExpandedFlight_1.Latitude AS Lat2, Amoc_ExpandedFlight_1.Longitude AS Lon2, Amoc_ExpandedFlight.FlightLevel
 
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:AERO2K Flight Movement Inventory Project Report(52)