Telemetry Processor
Once part of the middleware, the telemetry processor consumes the telemetry stream published by the acquisition controller and derives some key information from it. Mainly, this means predicting the flight path of the aircraft, projecting the field of view of the cameras, and determining height above ground. This processed information is then published to websockets for the web UI to display.
Web Socket
The rest api is great for fetching data at a slow rate but the polling model is very impractical when the backend wants to push new data to the front end. For this purpose, websockets will be used where the front end shall listen to events pushed by the backend.
Telemetry socket
Running on port 8080, a websocket server accepts connections and will immediately stream telemetry as well as some
values computed from the telemetry. When the socket connection is established, the server will start to stream the
following json object.
{
"telemetry": {
"lat": <double>,
"lon": <double>,
"alt": <double>,
"yaw": <double>,
"pitch": <double>,
"roll": <double>,
"undertainty": {
"lat": <double>,
"lon": <double>,
"alt": <double>,
"yaw": <double>,
"pitch": <double>,
"roll": <double>
}
},
"range": <double>,
"flight_path_projection": <geojson>,
"fov": [
{
"name": <string>,
"spectrum": <string>,
"fov": <geojson>
}
],
"ground_speed": <double>,
"altitude_above_site": <double>,
"heading": <double>
}
Roll, pitch, yaw, lat, and lon are the raw values received from the INS; range is the value received from the laser range finder.
flight_path_projection is a set of points showing the predicted future position of the airplane based on the current
linear and angular speeds.
fov is a polygon representing the estimated field of view of the cameras. The projection is based on the estimated
attitude of the rig and the given elevation of the site.
heading is determined based on the north and east components of INS velocity in the NED frame.
altitude_above_site is essentially gps_altitude - site_elevation where site_elevation is derived by finding the
closest site to the current position as explained here.