running piccolo log on flightgear young mo kang ece @ uiuc

16
Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

Upload: annabel-hodge

Post on 13-Dec-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

Running Piccolo Log on Flightgear

Young Mo KangECE @ UIUC

Page 2: 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

Page 3: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

What?

• Sensors (accelerometer, gyroscope, …)

• GPS• Communications link for data

transfer

UAV

Ground station

Page 4: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

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

Page 5: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

What about Flightgear?

• An open source flight simulations program

• Simulates a flight

http://www.flightgear.org

Page 6: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

How?

• It has to read in data via1. File

2. Socket (TCP or UDP)3. Namedpipe4. Serial

Page 7: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

Setup

• A server broadcasting data• A client running Flightgear

server clientNetwork connection

Page 8: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

Tasks

• Convert the Piccolo log file into a replay file

• Broadcast the replay file to client

Page 9: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

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

Page 10: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

Correlations

• Many can be directly retrieved from the log

• Some need to be calculated from other values

• And others to be figured out

Page 11: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

Once figured out

• Data values are assembled into the structure

• Little endian to Big endian byte-order swapping

• Saved as a replay file

Page 12: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

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

Page 13: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

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 se

c• MAX 1 frame per sec• Causes abrupt changes in scenery on Fligh

tgear

Page 14: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

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)

Page 15: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

Testing

server

client

Page 16: Running Piccolo Log on Flightgear Young Mo Kang ECE @ UIUC

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