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

      • Hello,

        We first tried the version that Mission Planner links from directly (Antenna Tracker V0.7.1).  That version kept the vertical angle at 0 degrees angle relative to the ground, regardless of the angle that we tiled the tracker at.  The horizontal angle always pointed at the air vehicle. 

        We then tried the firmware from this post:

        http://diydrones.com/forum/topics/figuring-out-the-antenna-tracker?...

        Which is this file:

        http://diydrones.com/forum/attachment/download?id=705844%3AUploaded...

        With this version we get the constant 45 degrees.  Again, it maintains the 45 degree angle relative to the ground, regardless of the angle we tilt the rest of the unit. We are using classic closed loop servos.  The horizontal servo is a hitec 180 degree rotation servo with a 4:1 gearing.  The horizontal servo is a hitec 180 degree servo directly linked to the tilting/antenna/PixHawk mount.

        • So basically the official firmware stays at 0 degrees all the time and my firmware stays at 45 degrees. Are there any other differences?

          My firmware is forked from official repository, so any problems with official release will affect my firmware unless fixed in my version. 0 degrees vs 45 degrees difference is caused by special initialization procedures in my firmware but it is only a side-effect, not a cause.

          My guess is that some recent changes to MAVLink make the tracker unable to read BARO messages from remote target. This is the only possible explanation, since the algorithm is quite simple:

          1. Set PITCH to 45 degrees (without moving yaw yet)

          2. When 45 degrees is reached wait for "STARTUP_DELAY" (usually set to 5 seconds)

          3. After "STARTUP_DELAY" has passed change mode from INITIALIZING to AUTO and start tracking

          After step 3 is completed YAW will move to certain point (I think it is either 0 degrees or some random value from memory, I'm not sure since it is not relevant) and the tracker will remain in this state (it will drift a little at the begining) until it receives MAVLink data.

          What I'm trying to say, is that controller for PITCH servo (YAW too) uses the last angle that was sent to it - in this case PITCH will stay at 45 degrees until it gets a new value calculated from baro and distance. If your YAW is tracking the target correctly it means, that PITCH controller is not being fed with new, updated angle.

          You can verify it via MP - enable tuning screen and display "nav_pitch" - it will show you the current value that PITCH is asked to reach. You can also switch mode to "SCAN" and see if PITCH is moving correctly.

          I will try to reproduce this behavior in my tracker and hopefully find a solution.

          • OK, we tried the same thing with both your version and the official version of the firmware.  Also, in both cases we monitored "nav_pitch" while testing.  We moved the vehicle up and down by over 3 meters while moving about.

            In both cases the antenna tracker maintained good heading no matter where the air vehicle went.  With the official firmware nav_pitch stayed constant at 0, while for your software it stayed constant at 45 degrees.

            Also in both cases we monitored the altimeter data and it was changing as we changed altitude (starting at about 1000).

            I think you're right.  Something changed in the messaging.

            • I had same problem exactly same as Andrew, I have no choice just go back to v0.4, tried back to v0.5 but can't find it.

              • Is there a way to roll back without compiling from source?  We haven't done that yet and are still on the learning curve.

                • I think you can do it via MP by selecting "Pick previous firmware". You will then see 0.4

                  • Thanks!  We rolled back to 0.4 and it's working.  Now we'll tune the PID values.

            • I am working on a version that uses GPS altitude rather than baro readings. I have a working firmware uploaded into one of my boards but I accidentally deleted sources and I am rewriting the code from memory... When I'm done it should work fine. By the time I do it you may try downgrading to 0.5 - it should work fine for you as you don't use CR servos.

              You may also try downgrading your target - I think I use Copter 3.2.1

        • Correction:  2.5:1 gear ratio on the horizontal axis.

  • At last I have completed mechanical part of my AT.

    Here is spec:

    -yaw servo is CR geared with spur belt

    -pitch is classic 90° servo

    -brain is APM 1.4 with MT GPS and external compass, loaded with AT 0.7.2 build from Jakub Oller

    Servo type set via MissionPlanner to ContinuousRotation, Yaw Range of Movement set to 360°.

    Pitch Range of Movement set to 70°.

    I attached all params too.

     

    All initial actions performed (accels and compass callibrattion)

    Now  when I switch on the tracker, pitch servo moves to 45° possition and after few seconds it moves to around -5° or 0°

    but then nothing else happen except the yaw servo moves veeeeery slowly in one direction, it's almost invisible movement and then it stops completely. 

    I also tried to reverse yaw servo but then after moving pitch servo from 45 to 0 yaw servo start to move in one direction swiftly and after cca 45° it starts move erratic forth and back.

    OK now when in AUTO mode I switch mode to servo_test  yaw servo is reflecting the slider movement in range cca +-110°.

    Tilt servo reflects slider movement very erratic and when going to point stright up it overmoves up and down in divergent loop 

    - perhaps wrong PID params for pitch servo?

    Any idea where I can start to fix it?

    AT.param

    AT.jpg

This reply was deleted.

Activity