Download presentation
Presentation is loading. Please wait.
1
FlySpy Software Design Narrative
Team 12 - Jeremy Tillman FlySpy Software Design Narrative
2
Overview Software workflow Input/Output Format Costly Calculations
Timing
3
Software Design – Control Algorithm
4
Rx/Tx Coordinate Info to SD
File System Input Regular txt file format Line by line command instructions [Latitude_Coord] [Longitude_Coord] [Altitude] [Pic?] File System Output XML File format Log with timestamps Position Orientation Controls I read reports of people getting up to 100Kb/second using the SPI interface to a file. Depending on the clock we use will determine our speed but I am sure we can achieve the require rate to output the XML format.
5
Costly Calculations The more accurate, the more expensive
Calculating coordinate distance Calculating change needed in heading Orientation Algorithms Accelerometer – Lookup Tables vs. Trig functions The full equations for calculating distances and needed heading with GPS coordinates are costly with trig function. We have found other scaled downed equations that are only accurate within a certain range. Based on the microcontroller clock, will let us know if we may fit all of these calculations within a specific amount of time. The official accelerometer equations for pitch and roll need trig functions to retrieve a correct reading. We may be able to minimize the workload by making lookup tables for specific readings. An example of the GPS functions are here ( ).
6
Timing GPS works Accelerometer and Gyro Uses a timer at 5hz
Read GPS from receiver Calculate needed heading and distance Accelerometer and Gyro Uses a timer at 50 hz Sums Gyro change for pitch and roll Check Accelerometer readings for Gyro correction Gyros depend on the change in voltage over time and not just the instantaneous reading. So we will poll the gyro 50 times a second and sum the change in voltage over that time because we know that 2 millivolts is equal to 1 degree change.
7
Timing Fasted Clock (fosc)– 32Mhz
Fasted Instruction Clock ( fosc/2) – 16Mhz Instructions costs Atan – 696 cycles Sqrt – 493 cycles Cos – 3249 cycles Sin – 2238 cycles We have not decided which algorithms will be too costly for us to implement. The fastest clock we can have is 32 Mhz using the x4 phase-lock loop that our microchip offers on its 8Mhz clock. These are the most common instructions that I readily see in the equations that we must use with trig functions are they are costly. We would want to update the control surfaces using a 10 – 20 hz algorithm. This is just somewhere in between the 5 hz GPS update and 50 hz orientation calculations.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.