Developer

figuring out the Antenna Tracker

3691139590?profile=originalNot many people know but we have an piece of open source software for controlling an Antenna Tracker.  It's been built by Tridge (Arduplane lead developer) for use in the outback challenge.

Sadly we have no documentation and, as far as I know, nobody except Tridge has used it.  Still given Tridge's track record on building great software I suspect it works well and if it doesn't, I'm sure we can fix it.  So to not let this piece of code go to waste, I'd like some help from people who are interested to give it a try and help me figure out how it works.

Here's the little that I know:

  • It runs on any of our supported board (APM1, APM2, PX4, Pixhawk, Flymaple and perhaps VRBrain)
  • For APM1/APM2 users building the code is as easy as opening our hacked ArduinoIDE and selecting File > SketchBook > Tools > AntennaTracker and then building in the normal way.  For PX4/Pixhawk, our autobuilder doesn't automatically build a binary but I can provide one if people are interested.
  • It can control a Pan and Tilt gimbal like this or this found on servocity.com.
  • It may or may not require a GPS
  • It must somehow receive vehicle position updates from the ground station which has the telemetry radio that is connected to the vehicle. Maybe through a USB cable.  Tridge probably uses the python ground station, MAVProxy, to passthrough the vehicle position data to the AT but perhaps we can get MichaelO to build out a similar feature in Mission Planner.
  • I imagine this antenna tracker could also be used to keep a camera focused on the vehicle which might be good for easing the burden on creating videos of our vehicles.

So if you want to give it a try please do and stick any findings, questions or issues below. Alternatively Issues can go into the issues list.

I'll start sticking things into the wiki as they become clear.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

      • I loaded up v0.7.7 without issue and set ALT_SOURCE to 1 for GPS. I should be able to test it this weekend.

        3702745921?profile=original

        • I changed the 3s Lipo connection that powers up my AT so that it freed up the charging port to plug in a low battery alarm. Hobby King sells a variety of these alarms that monitor each cell voltage. Mine has both LED and Buzzer alarms.

          3702815415?profile=original

  • Over the last several months I been working on a forked version of ardupilot/AntennaTracker which I was able to get to work pretty good.  I had to shelf it for a while and when i came back I noticed that when I came back a number of the libraries have changed over time.  I wanted to get back into working with latest changes.  One specific change was the Mavlink libraries and the file "GCS_Mavlink.cpp" was updated to work with them.  If you try to compile the ardupilot/AntennaTracker/master and run it, then through Mission Planner you are no longer able to discover other vehicles.  Just the Antenna Tracker shows up. I also noticed a weird issue with 2 Parameter Full lists are being displayed in Mission Planner.  I don't know what would have changed but can anyone else confirm that this is the case with the latest changes in master and what might be causing it?  The latest release of antenna tracker does seem to work fine in this regard. 

    • Developer

      Hi Tim,

      I noticed on Saturday as well that master is not properly forwarding packets from the vehicle to the GCS.  I'm not sure what's happened exactly in master to cause the problem but I think it's related to making some changes to support the solo gimbal (and filtering required to ensure that not too many messages from the gimbal get through to the GCS).  I'm planning to look at it soon and/or talk with Tridge about it.

      By the way, you'll see a couple of changes in the tracker code in master to allow using the vehicle's GPS as the altitude source (a work around for the baro data sometimes not getting through).  Also the ability to select the servo types separately for yaw and pitch.

      • Thanks Randy.  Through my efforts over the last year I did end up implementing both the features you listed.  I did just update my implementation to match the ardupilot/AntennaTracker/master implementation.  There is one thing I did notice over the last year using the calculation implemented from Jakub for GPS alt source.  It seemed to me that the tracker was always high.  Someone can correct me if I'm wrong but I believe the GPS alt is expressed in millimeters which required a division of 1000.0f instead of 100.0f.  Once I implemented this changed pitch does seem to be more accurate.  Can you confirm?

        I didn't know the best time to submit my work but I guess now is as good a time as ever before I get too far behind again.  I will try to explain some of the features I have implemented in hopes that with some work they can be included in the main project. 

        1. One of the biggest struggles I had was to figure out what Servo type would best fit what I was trying to accomplish.  As some others have probably discovered, position implementation did work but does have huge limitations, especially for trying to implement a manual mode that worked the way I was hoping listed below.  This is the main reason I originally added the parameters for defining different servo types for both yaw and pitch.  Long story short I ended up using CR for both.  It just seemed easier to work with in many respects.  I did end up adding some more logic using the AHRS pitch to help control and prevent pitch lock (cr_pitch_max, and cr_pitch_min).  This allowed max pitch to be greater than the lower pitch on my implementation and not just use the pitch range parameter.  This is another example of why someone taking on the task of making hardware consistent is needed.  Trying to make this work with all the different varieties of diy implementations is going to be very challenging. 
        2. I also added some logic to use the stop mode as a position hold mode.  Because of the way my tracker is built and the weight offset, just disabling the pitch servo did not work and the pitch servo would allow the tracker to fall once disabled.  I had to implement logic to hold the angle once stopped. 
        3. One of the biggest features I added and am hoping to add to the project was added to the manual mode, also implementing full radio control for both pitch, yaw and then tracker mode.  This gave the ability to change the mode via the PPM, SBUS interface.  I basically implemented the logic from copter to get this done.  You can see in the pictures that I also built a manual mode box that uses an Arduino Pro Mini to generate the PPM signal required from the box through the slip ring to control Yaw, Pitch, and Tracker modes.  This makes independent stand alone control much easier.  This also works fine with a TX, RX over PPM, or SBUS.  Note:  One major issue I did run into with the manual mode was that I could not find a good way to take direct PWM for pitch and limit the angle to the CR pitch angle limits.  I did end up implementing the manual mode pitch logic to use AHRS to monitor the angle and then update with the PWM inputs from radio pitch control.  I know there is probably a better way to do this but no matter what I tried I could not get anything else to work reliably.
        4. I also added a feature to auto switch between scan and auto.  I totally removed the scan mode control from my manual box because both modes are combined.  Once the mavlink is lost it goes directly into scan and once re-established it switches to auto.  I had to also implement some of the copter logic for GCS failsafe to make this happen reliably because the vehicle.location_valid did not seem to work for this.  This feature has made a huge improvement for me in using it in the field. 
        5. Once I was able to get PIDs tuned and calibrated (which was a challenge at first) everything seems to work great, with the exception of the newly introduced GCS_Mavlink issue. 

        I do believe this project has great potential and I am hoping there is more interest over time to make it flourish.  Thanks to everyone for all the work that has gone into it so far. 

        Here is a link to my fork.  All the updates are directly in the forked master and not a branch.  Take a look if your interested and see if there is anything in there worth considering.  I also know that some of this logic can be done better with some more professional help. 

        https://github.com/TimothyGold/ardupilot/tree/master/AntennaTracker

        Attached is the firmware and the working parameters if anyone would like to try.

        Below are some pics:

        3702745597?profile=original

        3702745664?profile=original

        3702745765?profile=original

        TGAntennaTracker-v2.px4

        ANT-TRACK-PX4-PARAMS.param

        TimothyGold/ardupilot
        ArduPlane, ArduCopter, ArduRover source. Contribute to TimothyGold/ardupilot development by creating an account on GitHub.
        • Developer

          Tim,

          Nice setup!  Love the joystick control and display.

          Ok, I'll give the GPS a more thorough test with a real copter.  I compared the results with the baro based numbers and it looked correct but I see what you're saying, GLOBAL_POSITION_INT altitudes are in millimeters.

          I very much agree that some standardization of hardware would make things a lot easier.  I've just ordered the ServoCity PT785-S but it's not too late for me to change to something else (I plan to sell a few in my JapanDrones store eventually).

          Re your code changes, I've had a quick look and I think we'd at least like the ability to set the control mode through the RC (similar to what we have in Copter, Plane, Rover).  Also I think the Pitch Min/Max would be good to have as well.   I was a little surprised to find we don't have it already but I guess for the default position servos it's the pwm-min/max that limit the range of movement.

          • I have that Servo City gimbal and it’s excellent. I have a fairly heavy 1.3 GHz antenna and it handles it with ease even though it’s not balanced.

            Do you know what servo would fit if I wanted to convert Yaw to continuous rotation?

             

            .

            • Mike, I think the simplest thing for you to do would be to modify your existing servo to make it CR. There are some pretty informative videos for doing this. The key will be to get the resistor values exactly equal. No matter what you do you will have to adjust the trim center to make it work.

  • I have a tracker that is working well but it has standard servos. I would like to put a continuous rotation on the yaw and keep my standard servo for pitch. Are there parameter settings that will allow this combo?

    Also what’s the latest on firmware development? I have been using the custom firmware because the pitch never moves with the latest firmware.

    .

     

This reply was deleted.

Activity