[ros-users] [Discourse.ros.org] [ROS Projects] Tractobots, my attempts at field robots
ros.discourse at gmail.com
Sun Apr 2 12:36:03 UTC 2017
Once you've converted both antenna lat/lon to UTM to get your heading taking the Ant1 and Ant2 position eastings and northings and subtract them, then take Atan2 to get your heading. Depending on which antenna you choose as the first one either add or subtract pi/2 to get your vehicle direction heading.Take right minus left antennna, you add. This assumes your positive northing is directly north and your angle increases clockwise. I've found not doing things pure Cartesian but rather navigational is much easier.
fixheading = Math.Atan2 (ant1.easting - ant2.easting, ant1.northing - ant2.northing) + PI/2
Your "virtual single antenna position" then is
eastingVirtual = (ant1.easting + ant2.easting)/2
northingVirtual = (ant1.northing + ant2.northing)/2
This now along with the heading can be used for distances to pivot point, hitch pin, implement, loader bucket, whatever. Just make sure to keep the signs consistent depending if ahead or behind virtual antenna.
[Visit Topic](https://discourse.ros.org/t/tractobots-my-attempts-at-field-robots/1486/21) or reply to this email to respond.
More information about the ros-users