AgOpenGPS - Page 193 - The Combine Forum
 2152Likes
 
LinkBack Thread Tools
post #1921 of 4126 (permalink) Old 05-10-2018, 10:12 AM
Senior Member
 
Join Date: Sep 2009
Location: S. AB
Posts: 3,563
Mentioned: 6 Post(s)
Quoted: 874 Post(s)
Brian I think when we reduce the trailing implement calculation code to its present, simplified form, we introduced a bug. I spent all evening yesterday on paper trying to prove what the code was doing and I just couldn't get it to work out on paper at all! In fact I'm surprised the code works as well as it does right now. The problem comes down to the calculation of the "t" factor in Position.cs. Right now t is something like this:
Code:
double t = (vehicle.toolTrailingHitchLength) / distanceCurrentStepFix;
But distanceCurrentStepFix is the distance the tractor moved, but really we want the distance between the new fix position and the old implement position. In the case of multiple trailing implements, such as the air drill tank, this becomes even more important as every trailer moves a little bit less than the trailer in front of it.

Anyway, the code should be this for the tank:
Code:
double t = (vehicle.tankTrailingHitchLength) / glm.Distance(hitchPos, tankPos);
and for the tool:
Code:
double t = (vehicle.toolTrailingHitchLength) / glm.Distance(tankPos, toolPos);
The reason for this is explained in the diagram on my post in the other thread: https://www.thecombineforum.com/forum...ml#post3241626

apm likes this.
torriem is offline  
Sponsored Links
Advertisement
 
post #1922 of 4126 (permalink) Old 05-10-2018, 10:31 AM
Member
 
Join Date: Aug 2017
Location: Scotland UK
Posts: 74
Mentioned: 0 Post(s)
Quoted: 33 Post(s)
Brian, so I'll consign BNO055 to the parts bin then! Where did you have it mounted, as still convinced it needs mounting on roof to avoid electro interference?


Last edited by Peter Brothers; 05-10-2018 at 10:33 AM.
Peter Brothers is offline  
post #1923 of 4126 (permalink) Old 05-10-2018, 10:43 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,729
Mentioned: 19 Post(s)
Quoted: 2497 Post(s)
Quote:
Originally Posted by Peter Brothers View Post
Brian, so I'll consign BNO055 to the parts bin then! Where did you have it mounted, as still convinced it needs mounting on roof to avoid electro interference?
Its a speed thing. It works great under 1 mph. no drift etc - or standing still. But that's not very useful for guidance lol.

I encourage others to try to get it to work long term, I can't seem to.

Mine is mounted beside the seat of tractor right on pivot point of rear wheels.
BrianTee is offline  
Sponsored Links
Advertisement
 
post #1924 of 4126 (permalink) Old 05-10-2018, 10:48 AM
Member
 
Join Date: Sep 2015
Location: Mayerthorpe, AB
Posts: 38
Mentioned: 0 Post(s)
Quoted: 22 Post(s)
Well, did my first field with AOG last night, even with the terrible GPS module I'm running (still waiting on my M8T from CSGShop, sigh), it did as well as our old GPS ever did. I'm steering by lightbar manually because the steering motor just wants to veer hard right and I can't get it to adjust to center.

It did start to act like the tool was offset about 12" left, trying to force me right, especially on downhill returns. I just started to drive by eye on the downhill return and used the lightbar uphill to keep a straight line. Not sure if that's a DOGS mounting issue, but I figured I had it in the correct tilt plane (side to side) accurately. Probably more an issue with the GPS itself.

But still very impressive. Can't wait to get the steering working, I really want to have it doing the turns, that will be exciting.

Are there any mounting considerations with the BNO055? I haven't seen anything about where to put that and my testing seemed to show it getting data no matter which way it was put in. I have seen calibration functions with IMUs on drones that involve starting a calibration, running it around in several 3D figure eights, and then it saves some data. But the BNO calibration sketch I saw seemed related to the section control sketch and I haven't done anything that involved calibration.
ikidd is offline  
post #1925 of 4126 (permalink) Old 05-10-2018, 10:51 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,729
Mentioned: 19 Post(s)
Quoted: 2497 Post(s)
Quote:
Originally Posted by torriem View Post
Brian I think when we reduce the trailing implement calculation code to its present, simplified form, we introduced a bug. I spent all evening yesterday on paper trying to prove what the code was doing and I just couldn't get it to work out on paper at all! In fact I'm surprised the code works as well as it does right now. The problem comes down to the calculation of the "t" factor in Position.cs. Right now t is something like this:
Code:
double t = (vehicle.toolTrailingHitchLength) / distanceCurrentStepFix;
But distanceCurrentStepFix is the distance the tractor moved, but really we want the distance between the new fix position and the old implement position. In the case of multiple trailing implements, such as the air drill tank, this becomes even more important as every trailer moves a little bit less than the trailer in front of it.

Anyway, the code should be this for the tank:
Code:
double t = (vehicle.tankTrailingHitchLength) / glm.Distance(hitchPos, tankPos);
and for the tool:
Code:
double t = (vehicle.toolTrailingHitchLength) / glm.Distance(tankPos, toolPos);
The reason for this is explained in the diagram on my post in the other thread: https://www.thecombineforum.com/forum...ml#post3241626
I can't believe any of the code works as well as it does!

Last year with the air seeder tank, it seemed to follow real world much better the way it is, and I vaguely remember changing it because there were slow moving edge cases which caused some problems - I think. When you drive around in AOG, it honestly does seem to follow really well, just tried it again with 2 10m hitches, just like the real world.

Could this be one of those cases where coding wrong is right?

Waiting for a silly cable for our new tractor to extract NEMA, so I can't try it on the tow between till we get that. Be sure I will try!

Edit: so i tried with the 2 lines edited, and honestly can't see any differences. Can you? The advantage with using step, its its precalculated and no square roots required.

Last edited by BrianTee; 05-10-2018 at 11:04 AM.
BrianTee is offline  
post #1926 of 4126 (permalink) Old 05-10-2018, 10:53 AM
Senior Member
 
Join Date: Sep 2009
Location: S. AB
Posts: 3,563
Mentioned: 6 Post(s)
Quoted: 874 Post(s)
Yeah could be! If it works, leave it as is.
torriem is offline  
post #1927 of 4126 (permalink) Old 05-10-2018, 11:09 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,729
Mentioned: 19 Post(s)
Quoted: 2497 Post(s)
Quote:
Originally Posted by torriem View Post
Yeah could be! If it works, leave it as is.
Of all the 18,000 lines, those 2 are by far the most mysterious, to me anyway.
torriem likes this.
BrianTee is offline  
post #1928 of 4126 (permalink) Old 05-10-2018, 11:33 AM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,729
Mentioned: 19 Post(s)
Quoted: 2497 Post(s)
Quick pic of rolling
Attached Images
File Type: jpg IMG_0001.JPG (2.91 MB, 15 views)
torriem and apm like this.
BrianTee is offline  
post #1929 of 4126 (permalink) Old 05-10-2018, 11:55 AM
Senior Member
 
Join Date: Sep 2009
Location: S. AB
Posts: 3,563
Mentioned: 6 Post(s)
Quoted: 874 Post(s)
I know the intent of those two lines (it's for translating the trailer to it's new position relative to the tractor), but as to why the present calculation of t works at all is a mystery to me too! I suspect when the movement or change in heading isn't too great, which is almost all of the time, the calculation will be close enough. For very small movements and rapid heading changes, such as when the machine is moving from a dead stop, you might see the virtual implement spin around, but that's mitigated by the code that just springs the trailer to straight back when thing change too rapidly.

As it was, my t factor would error on pulling the trailer too much to the inside of the turn, but I figured that would probably be okay since most implements tend to draft to the inside of the turn anyway, especially when you have multiple trailers. I suspect there's a method using calculus to work out the curve of the turn, rather than using a straight line, but I also suspect it wouldn't really matter to the ultimate accuracy of the thing!

I think I enjoy the technical aspects of minutia like this than the bigger issues of graphical user interfaces or even actually using AOG for real work! haha.

Glad to see you've got good weather and things have dried out! Got about 3 or 4 tenths of rain in the last 12 hours and it's actually quite welcome. After the flood waters receded, things got dry quickly!
BrianTee likes this.

Last edited by torriem; 05-10-2018 at 12:03 PM.
torriem is offline  
post #1930 of 4126 (permalink) Old 05-10-2018, 12:12 PM Thread Starter
Senior Member
 
Join Date: Aug 2012
Location: Vermilion Alberta Canada
Posts: 5,729
Mentioned: 19 Post(s)
Quoted: 2497 Post(s)
Finally get to do real field work with it. Rolling peas in hilly ground was a good test, and worked very well. Anything can steer on the level! Hill and draft compensation worked excellent!

Peas seeded with a Pillar Laser into tall oats stubble. Hills are around 10 degrees of slope and twist back and forth. Still using the BNO at this point. The DOGS2 is absolutely flawless. 20 year old Outback S2 doing the GPS duties, not RTK just WAAS. RMC at 5 hz. Baud 19,200.



Rammy, Peter Brothers, apm and 1 others like this.
BrianTee is offline  
Sponsored Links
Advertisement
 
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Combine Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome