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

'------------------------------------------------------------------------------
3.3.3.3.5. Sub step 3.5 - Delete temporary table ETMS_ImportedTraffic In the fifth sub step the temporary table ETMS_ImportedTraffic is emptied. The executed code is:
'------------------------------------------------------------------------------
DoCmd.DeleteObject acTable, "ETMS_ImportedTraffic"
DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentDb.Name, acTable, "ETMS_ImportedTraffic", "ModelETMS_ImportedTraffic", True
'------------------------------------------------------------------------------
The state of the traffic table after this step is not final. Some other modification will take place after executing the following steps like changing the departure and arrival airport codes to IATA code, deleting the inconsistent flight heads, converting the date/time fields' values to GMT time…

 

3.3.3.4. Step 4 -Import ETMS flight file
Considering that the ETMS application provides data with format almost identical with AERO2K data for the flight legs, the fligh_chord text file importing is one-step operation:
'--------------------------------------------------------------------------------
DoCmd.TransferText acImportDelim, "ETMS Flight Import Specification", "ETMS_ImportedFlight", FileName, False, ""
'--------------------------------------------------------------------------------
The "ETMS Flight Import Specification" is a predefined mode to import the ETMS flight text file, which’s path\name is stored in the FileName variable. This specification

 

selects from the text file only the fields that the AERO2K needs and also defines each one’s date type (cf. Table 56).
The state of the flight table after this step is not final. Some modification will take place after executing the following steps, like modifying the TrafficId for each leg to link the legs with their corresponding heads, updating the flight legs that belong to the same flight but they have the same event time, converting the date/time fields' values to GMT time, inserting new legs for the flights that pass the midnight or even calculating the average speed and climb/descent rate for each two consecutive flight legs that belong to the same flight.

3.3.3.5. Step 5 - Link the two imported tables

This step is the most important step of the importing procedure. It links the flight heads with the flight legs. Table 61 shows how ETMSTraffic and ETMSFlight tables are linked:

The linking procedure consists of 8 sub steps:
3.3.3.5.1. Sub step 5.1 - Delete inconsistent records from traffic table For each importing procedure, the user must select a certain date for importing, because ETMS application exports data for one or several days. To select the date, the user will update a textbox on the importing interface (date/time format: yyyy-mm-dd). This date will be used after in the linking step or in some other steps. The inconsistent data in the traffic file are data that do not belong to the selected date. If a flight ends before the selected date or begins after this date, then that flight will be deleted (only the flight head because the flight legs are not linked yet and they can not be found to be deleted) without saving it into the inconsistent flight table (ETMS_InconsistentTraffic). The deletion query SQL code is:
'------------------------------------------------------------------------------

 

DELETE * FROM ETMSTraffic WHERE ((([ETMSTraffic].[MaxStopTime])<CDate([Forms]![ImportETMS]![txImportDate]))) Or ((([ETMSTraffic].[DepartureTime])>=DateAdd('d',1,[Forms]![ImportETMS]![txImpo rtDate])));
'------------------------------------------------------------------------------

After executing this sub step, the traffic table will have only flights that belong to the same date (the departure date or the arrival date is the same as the selected date).
 
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:AERO2K Flight Movement Inventory Project Report(60)