This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hard over time & compass calibration
#1
Hi. I'm trying to optimize the performance of my Tinypilot. I have a few basic questions.

1: Is there a command for testing/measuring the "hard over time" for Pypilot?
2: Is there a command for backup/storing (and optionally reloading) a set of compass calibration data. I have had some occasions with offshore sailing, where the calibration has been corrupted (due to rough seastate), and would like to roll back the calibration. I know there is a "lock calibration" option, but it seems to reset every time the AP is restarted. In fact. Ideally, I would prefer if the calibration was a thing that should be actively initiated, rather than the automated current implementation. A small pull-down menu with a few historic calibrations in addition to "auto calibration", and a button for "save current calibration" would make sense.
 
Best regards, Leif
Reply
#2
As for saving calibration, it all sits in the pypilot.conf file. You can manually make copies of it for emergency situations, where your calibration got messed up and you don't have a calm sea to sail your calibration circle (been there). For myself, I have added a few lines to /opt/bootlocal.sh (see code snipplet) on the tinypilot that restores a known, working copy of pypilot.conf prior to starting up. That has its obvious disadvantages (like: changes to any setting are not persistent, unless you update the backup) but for myself I'm willing to live with it. 

For testing the hard-over time I always count the seconds out loud ;-) or am I misinterpreting your question.

Code:
   date >> $DEBUG
   cp -f /home/tc/.pypilot/pypilot.conf.restore /home/tc/.pypilot/pypilot.conf
   chown tc:staff /home/tc/.pypilot/pypilot.conf
   echo 'running pypilot' >> $DEBUG
   sv u pypilot

note: /opt/bootlocal.sh runs as root, so remember to chown the file to tc : staff otherwise pypilot cannot write its own file.
Reply
#3
(2023-12-18, 11:38 AM)ironman Wrote: For testing the hard-over time I always count the seconds out loud ;-) or am I misinterpreting your question.

Thanks for sharing your experience. 
Actually, I was wondering how to initiate a full hard over command. Is there a command line option for this? Counting the seconds is the easy part :-)
Reply
#4
You might try something like 

Code:
pypilot_client servo.command=2

or -2. I'm not at the boat, so I can't test it.
Reply
#5
(2023-12-18, 05:11 PM)ironman Wrote: You might try something like 

Code:
pypilot_client servo.command=2

or -2. I'm not at the boat, so I can't test it.

Thanks. I tried the suggested commands, but it only rotate my wheel ~5 degrees. Also tried to increase the value to +-100, but wit no real difference. Any other parameter that can influence this. I have of course calibrated the rudder extremities correctly…
Reply
#6
Why do you want a full hard over command? What problem are you trying to solve?

If you command the servo directly like that, it will timeout if you do not continuously send commands. Otherwise you could command in position mode (if rudder feedback) or possibly just initiate a tack if that makes more sense.
Reply
#7
(2023-12-21, 03:45 AM)seandepagnier Wrote: Why do you want a full hard over command?  What problem are you trying to solve?

If you command the servo directly like that, it will timeout if you do not continuously send commands.  Otherwise you could command in position mode (if rudder feedback) or possibly just initiate a tack if that makes more sense.
I was curious to know if my hard over time was within specs. I have an adjustable hydraulic pump, so in case my rudder moves too fast/slowly, I could make some adjustments there.
I do have rudder feedback, so I could try the issue the rudder position command. 
Could you please provide the correct command (something similar to "pypilot_client position.command=-30"?)

I have also made several attempts to build the Tinypilot from the current code. My current setup is an old image (tinypilot_2021_11_16.img.xz), from which I try to pull and build the code. The pulling works fine (using instructions from the wiki (Upgrading tinypilot remotely)), and the build completes without any issues. However there is no working web interface when I try to run/reboot with the updated code. Rolling back to the original build works fine. 
I think i tried with the latest image (23_10_20_beta), but if i remember correctly, I got similar issues with that one.
You were mentioning a new (working?) image should be available soon. Any chance that "soon" is soon?

Thanks again, Sean, for this marvelous product! It is really great!
Reply
#8
You can put it in a loop like this:

Code:
while [ 1==1 ]; do pypilot_client servo.command=2; done

Cancel with ctrl-C.
Reply
#9
I will try to upload the image tomorrow, my speed is limited to 160kbit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)