Hi @ all,

First: I got my ardustation running, and it works as it should.

BUT: I want tu use it with a Standard (180 degree) servo. I don't need to fly around me. I just want to fly in the front of my starting point.

Is there a easy posibillity to change the code or add an parameter for configuration?

I'm sure i can adapt it myself, but it'll be a quick and dirty (very dirty) code. Maybe there is a need for this cause.

Kind Regards,

Michael 

Views: 438

Reply to This

Replies to This Discussion

Hi Michael,

It is definitely possible, but a little tricky. The current code computes a range bearing to the destination A/C and the bearing is always in 0 to 359 degrees. The default configuration is a standard 180 degree servo geared to an antenna in a 2:1 ratio so the antenna would rotate a full 360 degrees for the commanded servo position of 0 to 180 degrees. Are you assuming that there will be no gearing in your 180 degree servo to antenna connection? If this is the case, then the command servo position would have to bet set to the computed bearing, but there is the issue of what direction the 90 degree position (in the middle of the 0 to 180 degree range) of the servo is pointed to.  You will always get back from the range bearing routine a bearing of 0 to 359, so you have to decide where the middle of the servo range would be set with respect to a received bearing. The other question is as follows:

if you point to antenna so that (say as an example) your full range of rotation would be equivalent to 45 degrees to 225 degrees with the center of rotation pointed to 135 degrees, what would you want to happen when the actual postion calculated is outside of the range - for example, the A/C is actually 0 degrees (North) with a range of 1 meter. This happens in reality because the GPS drifts with an error corresponding to the accuracy of the GPS position. With bad satellite constellations, and with the A/C near the antenna (on the ground), you can get all of the possible bearing values.  Should the antenna stop at 45 or 225 depending on which side? Also you would have to some enter what the actual center point of the antenna would be (in my example 135 degrees).  

All this is possible - but the UI would have to be modified to set the actual position of the antenna  and what to do at the endpoints. The code can be changed, but the main problem is that the code is currently near the capacity of actual RAM and adding more parameters or more UI might cause the software to be unstable and to require removing other features. 

It would be much easier to just accept its default configuration use a geared antenna. I'm currently not planning any new releases unless major problems are found and I don't have any antenna hardware in a non geared configuration to test against. You're definitely welcome to modify the code and I'm glad to give you further assistance if you like.

Heino

Hi Heino,

thank you for your helpful reply!

 Are you assuming that there will be no gearing in your 180 degree servo to antenna connection?

Yes, that is the point. I want to mount the Pan-Tilt (using a very small one) directly on the servo. Only the 5,8ghz helical-antenna is moving, the whole Groundstation is static. I want to keep the whole setup as simple as possible and also with a minimum possible source of defects. 

I forgot to mention: I use a Plane, so the problems with GPS glitching 1 or 2m  is not so a  problem (because the distances are bigger)

My Idea:

  • maximal use of the existing calculations/code with minimum code-changes:
    Internally it should calculate the whole 0-359° bearing but limit the bearing to 90-270° (I found a good solution)
  • Remap the Output: so i have to map 90° to the low PWM value and 270° to the high PWM value (did'nt find a good solution,yet)
    An Idea is to map the calculated 90° Bearing to an Servo-Output of 0° and the 270° Bearing to 180° ServoOutput.

I'm aware of the RAM Problems. I'll solve it like that:
Type of servo is an essential thing, normally you know what type of servo (360 or 180) you'll use while compiling/uploading. So i'll use a #if Servotype =xxx Logic , and a parameter settable only in the arduino-software. I want to keep the complete GUI and logic as it is!

You're definitely welcome to modify the code and I'm glad to give you further assistance if you like.

I'll start coding (with commenting) and upload my results. Maybe you want to correct/clean it for a possible (i don't give up) next version.

In my brain the task is not that complicated, but at some point you gave up commenting your code ;-) I'll ask you in case of complete confusion.

Thank you, Michael

Sounds like you have it under control. I'm not the sole author of the code so it is a collection of various writing styles (including the original 3DR code). No need to pass your code by me if your happy with it. Since I wouldn't be able to test it I think you'd be able to release it to the community as you see fit. Several others have modified the code and re-released so you're welcome to change/remove anything. I'm not planning any new functionality and I'm reducing my involvement in the project. 

Heino

Now that different styles of coding "make sense".

Ok i add the functionality. Test it next weekend and publish the result.

I personally only use the tracking functionality (with 3dr Radio). So in a additional step i'll add a additional Parameter to "disable" all sending funktionality and its menues. So the Arduinostation has only to process the really needed part of the code. At this point i'm sure i'll ask you for some detail.

Michael

Can you share the code for 180 servo?

Hi Adrian,

yes i'll publish it.

I 'll just recieved my new 3dr radio (burned the old one with 12V :-) )

Additionally i my fpv plane had an crash.

So until now i changed the code blind.

Should be done and tested on Saturday.

Kind Regards, Michael

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service