element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Joey Thompson's Blog How High, How Fast and How Hard?  Project to find out.
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: screamingtiger
  • Date Created: 10 Sep 2015 2:32 PM Date Created
  • Views 2685 views
  • Likes 2 likes
  • Comments 20 comments
  • microstack_gps
  • how_fast
  • arduino
Related
Recommended

How High, How Fast and How Hard?  Project to find out.

screamingtiger
screamingtiger
10 Sep 2015

Yes I know, I have two other projects in the works.  A wireless trailer harness and my QuadCOP needs completed.  Both of those projects are long term.  This project however should be quick!  As in completed in a weekend.

 

Synopsis

As many who know me, know that I like to fly extreme radio control jets.  These jets have a speed limit imposed on

them via the AMA at 200 MPH.  I've never known how fast my jets go.  A buddy of mine who has the same jet as me,

clocked his jet a 180 MPH.  However I have 50% more power than he does!  So its safe to say I probably break the

speed limit unintentionally.

 

Another concept is G forces felt by the aircraft during flight.  Since no one is on board the aircraft, no body takes too much care about the G forces.  It will be interesting to see the G forces and I will be using a Microstack Accelerometer to keep track of MAX G's during the flight.

 

Details

There are two types of speed with aircraft, ground speed and air speed.  Ground speed of course is how fast the

aircraft is moving relative to the ground.  The AMA sets its limits based on ground speed.

 

Airspeed is how fast the air is moving over the aircraft.

As an example of how these differ, consider the following:
If there is a 30 MPH wind and an aircraft was sitting on the ground not moving, the airspeed of is 30 MPH despite

the fact the aircraft is not moving.

 

This gets tricky in the air.  If an aircraft has an airspeed of 200 MPH, but there is a 30MPH head wind, the ground

speed is only 170 MPH.  If the wind is coming from the tail of the aircraft, the ground speed may be 230 MPH but the

airspeed may only show 200 MPH.

 

Lets take a look at some options available to do this, and the advantages or disadvantages of each.

 

Radar Gun
This is a small unit that times radar pulses to calculate how fast an object is moving towards the gun.

 

Pros

  • No modifications aircraft
  • Can be highly accurate.
  • Not affected by airspeed.

 

Cons

 

  • The person using it must be perpendicular to the aircraft.  This means that it will be heading directly for them at a high rate of speed.
  • A cheap gun is $100USD, which has highly variant results
  • A good gun cost several hundred dollars.

 

Speed Sensor/Pitot Tube
http://www.hobbyking.com/hobbyking/store/__7838__Airspeed_Expander_V3.html

 

Pros

 

  • Can be highly accurate for wind speed.
  • This is how real aircraft measure speed.

 

Cons

 

  • Requires cutting a hole in the jet for the Pitot tube
  • Will still need an Arduino to get the data out
  • Senses Airspeed, not ground speed.  Will be affected by airspeed which can be as much as 30 MPH.
  • Cannot be transferred to other aircraft easily.


Acoustic Doppler Effect
This is a method of recording the sound of the aircraft as it passes by.  A software is then used to calculate the

speed of the aircraft based on the doppler shifts of the sound.

http://rcspeedo.com/

 

Pros

 

  • Cheap
  • No modifications to aircraft
  • Can use a cell phone


Cons

  • Highly variant results
  • Requires very controlled conditions
  • Requires constant throttle settings
  • Requires a low and close pass
  • Realistically this method should use precise sound equipment in a controlled environment.

 

GPS Unit
You put this into your aircraft and fly around.  It will then tell you the top speed you have reached during the

flight.  A good device like this will record all coordinates and let you play back what happened in real time.

http://www.horizonhobby.com/DYN4401?

KPID=DYN4401&CAWELAID=320011980000141493&CAGPSPN=pla&catargetid=320011980000166150&cadevice=c&gclid=CMTFuOq-

58cCFQYvaQodPIkGpg&kpid=DYN4401

 

Pros

 

  • No modifications to aircraft
  • Accurate
  • Can be transferred easily between aircraft.
  • Not Affected by airspeed.

 

Cons

  • Adds some weight to the aircraft
  • Must be secured
  • Care must be taken not to block GPS signal
  • Measures ground speed, does not take into account altitude changes.
  • Expensive at $100+

 

Naturally I choose the GPS unit.  However, as Makers we can all tell that this is something we can make ourselves.

The prefab unit is $100, lets see if we can do better.

 

 


The hardware

I have two options I am considering.  Both use the Microstack GPS.

 

Option 1

 

image

 

I plan to use an Arduino Pro Mini Clone.  I have found a version that at $1.85USD it works perfectly. 
I will also use an monochrome OLED.  This is a 120X96 resolution.
I'll need a few tactile buttons.
I'll need a 3.3V and 5V regulator, and I chose the AMS1117 linear regulator in both voltages.

 


Option 2

 

image

 

I have a clone TFT LCD clone that costs mea few $.  It needs an Arduino UNO to function, as it is in the form of a

shield.  This Screen also has a SD card which is nice for storing GPS data.
I wont need any buttons as it is a touch screen.  I will still need a 3.3V regulator for the GPS unless I decide to

use the one onboard the UNO.


Comparison

 

 

Option 1

Weight is < 1/2 oz.

image

Total cost (rounded):

PartCost (USD)
Arduino Mini (5V)$2
GPS$25
OLED$4
AMS1117 (3.3V)$.10
AMS1117 (5V)$.10
MISC$5
Total$37-$40

 


Option 2
Weight is about 2 oz

image

 

PartCost (USD)
Arduino UNO$10
GPS$25
TFT LCD$5
AMS1117 (3.3V)$.10
AMS1117 (5V)$.10
Misc$5
Total$45-$48

 

The MISC budget is just for items like buttons, connectors etc.  For a case I will just be using blue core foam.


Either option is good, and the price is right which makes it a good project instead of buying a prefab unit.

 

 

 

Considerations

One thing that needs to be accounted for is altitude.  If an rc aircraft is in a straight dive, the GPS will not

detect any changes in the coordinates and therefore the ground speed would appear to be 0.  So any coding that is

done needs to take into climb and dive rates.  The real issue is that most speed runs are going to be going

downhill or at an angle towards the ground.  So the altitude vector (z) must be accounted for in the final speed

calculations.

 

To parse the  NMEA sentences coming out of the GPS, it is a trivial task to use the TinyGPS++ library.  This

library uses the Serial Port to read the GPS.  This is perfect since the Microstack GPS unit uses the serial port

as well to send data.  I feel that a frequency of 2HZ will be suffice for logging speed.  The 16MHZ Arduino should

be able to handle this incoming data at 57600 bps.  Any faster and I fear it may bog the Arduino down.

I do not plan at this time to log any GPS coordinates but simply keep track of the last highest speed and altitude.

 

I will use the EEPROM memory to store last values for viewing after a power cycle.

The user interface via the TFT or the tactile buttons is simple.  I need the ability to reset the values for a new speed

run.  I may add an option to turn the screen off and on as well, no need to have it update while in the aircraft.


A couple of status LEDs will also be used to indicate what is happening so I can see that it is working even with

the screen off.  The Microstack GPS also has an LED to indicate everytime it does a fix.

For a case, I am going to just use 1/2" thick foam.  I will cut rectangle out and embed the components directly

into the foam.  This case will also act as a cushion in case the GPS unit is dropped or ever falls off the aircraft

(which happens!).  You cant get much cheaper than that!

 


For the LCD, you know me, I bought a Chinese knockoff from Ebay.  I got 2 of them.  I used the Adafruit drivers and

of course they didn't work.  I managed to get the demo working by hardcoding the device ID, for some reason it

cannot detect it.  For the Touchscreen, it doesn't get the coordinates right so some fixing there will be required.

 

The 2nd screen I have the touchscreen doesnt even work!

 

The question is which option is better?  Option 1 is lighter so it can be used for smaller aircraft, though I am

not sure I would have a desire to measure speed.  Option 2 just seems more modern with the cell phones and tablets

we have these days.  It certainly would be more snazzy.

 

I am going to do some testing with the LCD I bought, and see if it is going to be easy to get working.  If not I want to go the other route the OLED and tactile buttons.

 

Calculating Velocity

I could use some input here but my thoughts are pretty simple.  The GPS give the coordinates and I have a function called "DistanceBetween" that gives the arc length between two GPS points.  This function ignores altitude and assumes you are on the surface of the earth.  The speed is just the distance travelled over the time lapsed.  The unit will display the moving average of the speed over the last 3 measurements.  This will help smooth out the jumps from the lack of resolution of the GPS for the small distances an RC aircraft travels.

 

A similar calculation is done for altitude.  The change in altitude divided by the times lapsed gives the climb or dive rate.  The absolute value of this is then just added to the ground speed.

 

If we have a calculated ground speed of 100 MPH and we happen to also climb 20 feet in the last second (13.64 MPH) then our total speed is 113.61 MPH.  Does that seem correct?

 

 

I plan to start this project in full force next week and have it working in a few days there after.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 9 years ago +1
    It will be interesting to see if you can keep GPS lock while flying. You might want to setup a ground station and then you differential GPS based upon what the aircraft receives. You can get more accurate…
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to DAB +1
    DAB, maybe it is a stupid idea but why - to keep constant direction - don't use a compass integrated with GPS and inclinometer ? Enrico
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to screamingtiger +1
    hahaha I mean. As previously discussed in another post the GPS we all agree that is not sufficient precise to give a correct and in-time direction and altitude. Or I am misunderstanding the idea of DAB…
  • DAB
    DAB over 9 years ago in reply to screamingtiger

    Good reset.

    For the 2D model you need both X and Y data.  You may think you are just going in the X direction, but you can only verify that if you check your position at point 0 and point 1.  The more points you use along the path, the better you data will be.  With more points you can calculate velocity and acceleration over the path.  You need all of this data to fully understand how well your sensors are at telling you the truth about where you are, where you were and where you might be going next.  These three issues dominate the inertial navigation model in 2D and 3D.  Even the navy uses 3D for ships as the sea is not flat and the world is not truly round.  As the navy discovered, you need a very highly precise time standard.  On one program, we used a Rubidium heat controlled clock running about 80Mhz, which was fast in the 1980's, but then we were trying to account for differences in the six nanosecond time frame.

    What GPS provides you is "trusted" position measurements at specific time intervals.  To navigate you look at where your model thinks it is, how fast it thinks it is moving and what accelerations it has used or will need.  You are essentially looking at where you are, where you were to anticipate what you need to do to get to your next verification position.  In a nutshell, that is what you INS needs to do.  So start thinking in those terms.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 9 years ago in reply to balearicdynamics

    Enrico, for the 2D model I am saying if I am driving a car.  You are correct in that the earth is round, and I must use arclength between the points.

     

    However for short distances a Pythagorean calculation is fine.  I will compute the arclength and straight line distances for up to a mile and put them in a table, they vary by decimeters.  To be more exact you have to use this:

     

    https://en.wikipedia.org/wiki/Great-circle_distance

     

    I agree that for 3D model I need to account for height but I will get the 2d model working first.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to screamingtiger

    Hello Joey.

     

    I am sorry but I think that 2D model does not works with the desired accuracy. The reason is that the ideal surface you are referring is not plane at all. And with the case of the flying there is nother influencing variable that is a potentially variable height. Also on short distances there are other factor that really involves the calculations.

     

    It is true what says DAB

     

    Even with faster GPS you still need to correct the data and establish your local acceleration and velocities.  The GPS gives up accurate point data correction so that you can update the INS to eliminate errors that creep into the INS from inaccurate data or navigation algorithms.

     

    It takes a lot of data and computing power to keep fast aircraft up to date with their real position in time and space.

     

    The model is not 2D but it is 3D and is not a geometric space but it is a curved space. The only aspect that may influence less and probably can be ignored is the non perfectly spherical surface of the ground. I have developed some algorithms to calculate the exact distance based on compass calculations that makes the things simple with some cm precision and less than 1ft accuracy. With some simplifications that may save calculation time and can probably gives reliable results. These algorithms are for terrain surface calculation so should be integrated with the height of the drone. Anyway there is a lot trigonometry in it.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 9 years ago in reply to DAB

    Lets talk about it first in 2D, say in  a car.  Given two GPS locations, and the time it took to travel between them, I get an average velocity between the two points.  Do you agree?  If I take 1 second readings and average the last 3 results, I would get the average velocity over the last 3 seconds, would you agree?

     

    If not could you post some references to what you are saying?    I need to learn how to post math symbols in here so bare with me.

     

    V= deltaX/deltaT in highschool physics.  deltaX comes from the gps coordinates, deltaT comes from the internal clock of the Arduino.

     

    x = at^2+vt+x0

     

    So in the 2D plane all we need is distance traveled and the time it took to travel that distance. As deltaT approaches 0, we get more and more accurate speed readings until we surpass the accuracy of the GPS (deltaX).

     

    The GPS also returns NMEA sentences with the speed information in it, I can always refer to that for comparison, which I think I will add to the interface as well.

     

    I understand that if deltaT were say an hour, I could travel forwards, backwards or sideways and really skew deltaX.   But as deltaT approaches 0, we are using small straight lines to estimate the speed.  At a 1hz rate and 200 mph, this isn't going to be any funky motion to throw the numbers off that much.  I plan to do a 2hz sample I mentioned.

     

    Any information you can show for this 2D model would be highly appreciated.  Ill post a working example.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • saturnv
    saturnv over 9 years ago in reply to screamingtiger

    Vectors!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube