160 likes | 349 Views
Running Piccolo Log on Flightgear. Young Mo Kang ECE @ UIUC. Piccolo?. A family of autopilot systems from Cloud Cap Technology Loaded on UAVs (Unmanned Aerial Vehicles). http://www.cloudcaptech.com/piccolo.htm. What?. Sensors (accelerometer, gyroscope, … ) GPS
E N D
Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC
Piccolo? • A family of autopilot systems from Cloud Cap Technology • Loaded on UAVs (Unmanned Aerial Vehicles) http://www.cloudcaptech.com/piccolo.htm
What? • Sensors (accelerometer, gyroscope, …) • GPS • Communications link for data transfer UAV Ground station
And… • Piccolo sends real-time telemetry data to the ground station computer • The ground station computer logs the data on a text file Sample log file
What about Flightgear? • An open source flight simulations program • Simulates a flight http://www.flightgear.org
How? • It has to read in data via • File • Socket (TCP or UDP) • Namedpipe • Serial
Setup • A server broadcasting data • A client running Flightgear server Network connection client
Tasks • Convert the Piccolo log file into a replay file • Broadcast the replay file to client
Conversion • From Piccolo log file • To FGNetFDM data structure defined in net_fdm.hxx of Flightgear source file • Simple task if all correlations between Piccolo log file and FGNetFDM data structure are figured out
Correlations • Many can be directly retrieved from the log • Some need to be calculated from other values • And others to be figured out
Once figured out • Data values are assembled into the structure • Little endian to Big endian byte-order swapping • Saved as a replay file
Broadcast • Reads in the replay file just created • Whenever Flightgear receives the packet, it will display on the screen immediately • Data need to be transmitted at the same rate as they were logged • Decide whether to broadcast a packet of data or wait
Time stamps • cur_time stores the UNIX time value • Broadcasting program needs to refer to the value for each time frame data • However, UNIX time is accurate up to 1 sec • MAX 1 frame per sec • Causes abrupt changes in scenery on Flightgear
Solution • Instead of UNIX time, Piccolo’s system clock time is stored in cur_time during conversion process • clock time is accurate up to 1 ms • x1000 more frames per sec possible • Smooth scenery transition (of course, only if data were logged at high enough frequency)
Testing client server
Thoughts • Can replay test flights with/without manipulations of the log file • Can be implemented to any type of log formats NOT RESTRICTED TO Piccolo with slight modifications • Can be used to test and simulate optic flow algorithms by changing to cockpit’s view