Accurate parallel swathing algorithm for (GPS) guidance needed
Asked Answered
R

2

2

I wrote a delphi program generating a gpx file as input for a "poor man's guidance system" for aerial spray by means of ultralight plane.

By and large, it produces route (parallel swaths) using gpx file as output.

The route's engine is based on the "Vincenty" algorithm which works fine for any wgs84 computation but I can't get the accuracy of grid generated by ExpertGPS of Topografix (requirement).

I assume a 2D computation on the ellipsoïd :

  • 1) From the start rtept (route point), compute the next rtept given a bearing and an arbitrary distance (swath length).

  • 2) Compute the next rtept respective respective to previous bearing (90° turn) and another arbitrary distance (swath distance).

  • 3) Redo 1) with the last rtept as starting point but in the opposite direction, and so on.

What's wrong with it ?

Rosena answered 11/11, 2011 at 13:18 Comment(10)
A javascript implementation of the Vincenty's algorithm. And a calculator to check different inputs.Baldwin
And here is a Delphi implementation delphiforfunBaldwin
I use a delphi implementation slightly modified I found in the internet, written by Charles Seitz (May 2006) and based on a Javascript code by Chris Veness. I had thoroughly tested it and seems to work well.Rosena
I'm afraid ExpertGps uses other assumptions I can't fancy (spheroïd vs ellipsoïd ...).Rosena
@Rosena ExpertGPS may not use wgs84. It probably does not use a spherical solution but it might, spherical solutions are inherently inaccurate. Seitz' solution, modified by you (?) may not be as precise as you think. You tested Vincenty's, but against what? There is another mapping solution possibility- if not spheroid vs ellipsoid; ExpertGPS could use a geoid. A geoid is a very mplicated 'exact' solution and unlikely in their software.Baugher
@Rosena You do not present any example of the 'differences' you note, the magnitude of the differences, etc. What does "can't get the accuracy of grid" mean? If the waypoints are identical, the grid should be too. Are you sure you used radians in the Vincity calculations (not degrees)? Are you using consistant units? ..that is fractional degrees (DD.DDD) versus degrees/minutes seconds (DD MM SS)? Additional 'guidance' may be impossible without providing an example of 'your' results versus what you see in ExpertGPS.Baugher
I just introduce minor changes in the interface with no further impact on accurracy.Rosena
May be these snippets give you some guidance :Rosena
Sorry, not enough room for them and i still don't master editing.Rosena
Just put the code there and indent with 4 spaces for each row. The ? mark in the upper right corner may guide you, or read this editing-helpBaldwin
B
2

You do not describe your Pascal implementation of Vincenty's earth ellipsoid model so the following is speculation:

  1. The model makes use of numerous geometrical trig functions-- ATAN2, COS, SIN etc. Depending whether you use internal Delphi functions or your own versions, there is the possibility of lack of precision in calculations. The precision in the value of pi used in your calculations could affect the precision you require.
  2. Floating point arithmetic can cause decimal place errors. It will make a difference whether you use single, double or real. I believe some of the internal Delphi functions have changed with different versions so possibly the version of Delphi you are using will affect how the internal function is implemented.
  3. If implemented accurately, Vincenty’s formula is supposed to be accurate to within 0.5mm. Amazing accuracy. If there are rounding errors or lack of precision in your Delphi implemention, the positional errors can be significantly larger.
  4. Consider the accuracy of your GPS information. Depending on how many satellites are being used by the GPS receiver at any one time, the accuracy of the positional information changes. Errors on the order of 50 feet or more is possible. Additionally, the refresh of positional information on the GPS receiver is not necessarily instantaneous; therefore if the swath 'turns' occur rapidly, you will have to ensure the GPS has updated at the turning point.
  5. Your procedure to calculate the pattern seems reasonable so look at your implementation of Vincenty's algorithm in your Delphi code.
  6. This list is not exhaustive, I imagine others can improve it dramatically. What I mention is based on my experience with GPS and various versions of Delphi and what I could recall off the top of my head.
  7. Something you might try is compare your calculations of distance/bearing using your implementation of the algorithm with examples provided on the Internet. There are several online calculators. If you have not been there, the Aviation Formulary is an excellent place to find examples of other navigational tricks. http://williams.best.vwh.net/avform.htm . A comparison will allow you to gain confidence in the precision of the Delphi implementation of Vincenty's algorithm with data calculated by mathematicians. Simply, your implementation of Vincenty may not be precise. Then again, the error may be elsewhere.
Baugher answered 11/11, 2011 at 22:49 Comment(1)
The pascal implementation of the Vincenty algorithm can be found here for scrutinity.Rosena
F
1
I am doing farm GPS guidance  similar  for ground rig just with Android. Great for second tractor to help follow previous A B tracks especially  when they disappear  for a bit .

GPS accuracy repeat ability from one day to next will give larger distance. Expensive system's use dGPS2cm-10cm.5-30metres different without dGPS. Simple solution is recalibrate at known location. Cheaper light bars use this method.

Drift As above except relates to movement during job. Mostly unnoticeable <20cm 3hrs. Can jump 1-2metres rarely. I think when satellite connect or disconnect. Again recalibrate regularly at known coordinates ,i.e. spray fill point

GPS accuracy. Most phone update speed 1hz. 3? seconds between fixes at say 50km/hr , 41.66m between fixes. On ground rig 18km hrs but will be tracks after first run. Try a Bluetooth GPS 10hz check update speed and as mentioned fast turns a problem.

Accuracy of inputs and whether your guidance uses dGPS will make huge difference.

Once you are off your line say 5 metres at 100metres till next point, then at 50 metres your still 2.5 metres off unless your guidance takes you back to the route not the next coordinates.

I am not using Vincenty as I can 'bump'back onto line manually and over 1km across difference <30cm according to only reference I saw however I am taking 2 points and create parrallel points across.

Hope these ideas help your situation.

Flaccid answered 22/5, 2013 at 23:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.