• No se han encontrado resultados

José Smith traduce la Biblia y otras Escrituras

Weather data is critical to automated flight. Deciding which runway to pick in specific weather conditions allows for safe landings and takeoffs. The FAA uses the international standard METAR for communicating the current weather at a specific airport. A METAR message typically looks like:

KJAX 020256Z 02003KT 10SM TSRA OVC01OCB SCT100 BKN130 18/17 A2996

Details of a METAR message will not be discussed in this section. Instead, we present our methodology for collecting this data and interpreting it for the flight computer.

Writing code to interpret this data would be a waste of time given that several systems exist with the ability to represent a METAR message in an easily readable format. Therefore, we used an API provided by the Aviation Weather Center [5] to gather this data. The API provided by the Aviation Weather Center returns METAR data in an XML format and interprets the METAR data such that data elements returned include temperature (in Celsius) and the wind speed. In querying the API, the parameters include a station string (for specifying the station to retrieve weather from), a time range, lon-lat rectangle, radial distance, and flight path. These parameters allow for gathering weather based on several situations. Station string specifies the weather station to retrieve the METAR data from. The time range specifies the time interval of the requested METAR data. In our case, this would always be set to include one to two hours before the current hour. One to two hours is chosen for the case that the API reported no weather within the past hour. A lon-lat rectangle can be given to gather all METAR data within a

specified area. The radial distance can be passed in to gather all METAR data within the radial distance of a lon-lat point and flight path allows for the retrieval of all METAR data on a specified flight path of waypoints.

These parameters allow us to gather data for a few specific situations the aircraft might be in. For example, if we needed to get the weather for the current area, but were not sure what airports were nearby, we could use the radial distance parameter to get the weather. When approaching the destination airport, we would only need to use the station string to get the weather needed to pick the runway to land on (if one is not assigned to the aircraft). Other

E28 parameters have not needed to be used now, but might find a use case in the future.

The parameters are passed in via the URL of the query. For example,

https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&re questType=retrieve&format=xml&radialDistance=20;-104.65,39.83&hoursBeforeNow=3

will get the METAR data within 20 nautical miles of longitude -104.65 latitude 39.83 up to 3 hours before now. The result we get back is in XML.

Figure 14E – Example Weather Data

JAXB (Java Architecture XML Binding) [6] allows for the creation of java classes based on XML schema. With this, we used the XML schema posted by Aviation Weather to generate the java classes used to represent the retrieved METAR data. This allows for easy access to specific METAR data without having to write helper classes to parse the XML data. After creating the java classes for storing the METAR data, the general interface for retrieving weather data was implemented.

For our weather interface, we implemented the ability to grab the nearest METAR data given an airport identifier, and a lon-lat. Finally, there is also a function to pick a runway based on the current wind conditions and the specified minimum runway required, max crosswind component, and max headwind component. Grabbing the nearest METAR data involves using the API discussed previously and taking advantage of the radial distance parameter. For picking a runway, the function takes in a METAR object and given airport as well as the requirements

E29 specific to the aircraft for picking a runway (minimum runway needed, max headwind

component, and max crosswind component). Using this information, the runway selection function first gathers the wind direction and speed from the METAR data given. Then there is a check to see if the winds are fast enough to consider crosswind/headwinds. If the winds are negligible, then the runway with the smallest heading differential is chosen based on the wind direction. When the winds are strong enough to cause considerable crosswinds/headwinds, the cross-wind component and headwind components are calculated. Once calculated, the function searches for the smallest heading difference in the wind direction as well as ensuring that the runway does not exceed the max head/crosswind components. The function then returns a runway object.

E30

Works Cited

[

1. R. Bagby, "Helper Classes Are A Code Smell," 10 June 2012. [Online]. Available:

http://www.robbagby.com/posts/helper-classes-are-a-code-smell/. [Accessed February 2017]. [

2. M. Ward, "Avoiding Utility Classes," 21 May 2012. [Online]. Available:

https://github.com/marshallward/marshallward.org/blob/master/content/avoid_util_classes.rst. [Accessed February 2017].

[

3. StatefulJ, "StatefulJ Framework," 2016. [Online]. Available: https://github.com/statefulj/statefulj.

[

4. iMatix Corporation, "ZeroMQ Guide," 2014. [Online]. Available: http://zguide.zeromq.org. [Accessed August 2016].

[

5. Aviation Weather Center, "Aviation Weather Center," US Dept of Commerce, [Online]. Available: http://www.weather.gov/.

[

6. Oracle, "Java Architecture for XML Binding (JAXB)," [Online]. Available: http://www.oracle.com/technetwork/articles/javase/index-140168.html.

Appendix F