Continued from Part 7
The refactor continues.
With raw Channel* data being broadcast by the Flight Data Service, we still need to process it before it can be displayed to the user -> either due to the 'noisy' nature of the data (such as a fluctuations in instantaneous vario readings) or the need to aggregate multiple Channels (such as determining Wind Drift or Thermal Location).
The Processors exist to do these tasks of aggregation and low pass filtering. As Channel data arrives at the Display, that data is fed to each of the Processors that the Display has instantiated. If the Processor has all of the data it needs, a result will be returned. If insufficient time has passed since the last invocation of the Processor, the Processor will simply return the cached last result.
Processors come in two forms:
Adjusters, on the other hand, take a single raw Channel and perform an action upon it. Think low pass filtering as one example.
Framed Processors typically involve simple operations that do not involve complex computation or access to external data sources beyond the raw Channels.
For more complex computation, one would implement a Custom Processor. Examples would include Wind Drift and Waypoint Navigation.
All of the Processors are obtained via the Processor Factory. This factory abstracts the need to differentiate between the Framed and Custom implementations. Requesting a Processor from the Factory is done via the Processor ID.
With the Processors up and running, we can now Display the results.
* A Channel is a single raw stream of data coming directly from the device - such as vario, pressure or gps altitude, latitude, longitude, ground speed.
Onto Part 9: Displays.
The refactor continues.
With raw Channel* data being broadcast by the Flight Data Service, we still need to process it before it can be displayed to the user -> either due to the 'noisy' nature of the data (such as a fluctuations in instantaneous vario readings) or the need to aggregate multiple Channels (such as determining Wind Drift or Thermal Location).
The Processors exist to do these tasks of aggregation and low pass filtering. As Channel data arrives at the Display, that data is fed to each of the Processors that the Display has instantiated. If the Processor has all of the data it needs, a result will be returned. If insufficient time has passed since the last invocation of the Processor, the Processor will simply return the cached last result.
Processor |
Processors come in two forms:
- Framed.
- Custom.
- Converters.
- Adjusters.
Adjusters, on the other hand, take a single raw Channel and perform an action upon it. Think low pass filtering as one example.
Converters and Adjusters |
Framed Processors typically involve simple operations that do not involve complex computation or access to external data sources beyond the raw Channels.
For more complex computation, one would implement a Custom Processor. Examples would include Wind Drift and Waypoint Navigation.
Custom Processors |
All of the Processors are obtained via the Processor Factory. This factory abstracts the need to differentiate between the Framed and Custom implementations. Requesting a Processor from the Factory is done via the Processor ID.
Processor IDs |
With the Processors up and running, we can now Display the results.
* A Channel is a single raw stream of data coming directly from the device - such as vario, pressure or gps altitude, latitude, longitude, ground speed.
Onto Part 9: Displays.
No comments:
Post a Comment