Lost the option to select GPS mode - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17) +--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18) +--- Thread: Lost the option to select GPS mode (/showthread.php?tid=4166) |
Lost the option to select GPS mode - tax - 2022-08-04 Hi! Been having some fun with this awesome little project the last couple of weeks, ups and downs. Took me some time to figure out one of my main problems, the IMU. (Now using a MPU-6050 with HMC5883). After that was sorted out I did some trials with PID tuning and everything was working great. I could create routes with opencpn on my laptop that was connected via the pypilot plugin and pypilot followed with great accuracy! What a time to be alive! Both GPS mode and Compass mode was working without any issues. A couple of days later while doing further tuning at sea, I noticed that I can no longer activate GPS mode. Everywhere I try, web-ui, pypilot plugin/client from opencpn, I can only select Compass mode. The Pypilot plugin in opencpn doesn't even list anything else except Compass. I've ran out of ideas to try and wonder if anyone can help me get the GPS mode working. Tried the oldest and the newest tinypilot images, clean setup. And just to try rule it out, I replaced the Rasberry Pi Zero. (As it wasn't the same now as when everything was working) My setup is a custom one (used parts from my early autopilot attempts + drones and other projects) * XY-160D motor controller (vnh2sp30 in motor.ino on arduino nano). * custom IMU with a MPU-6050 and a connected HMC5883 * linear actuator (no potentiometer/feedback) * PI Zero W Logs from console (running pypilot interactively) Code: autopilot start 1418.13315 RE: Lost the option to select GPS mode - seandepagnier - 2022-08-04 How is the gps connected? pypilot likely does not get gps data. For example, try executing: pypilot_client gps.source or check the gps source in the statistics of the plugin If opencpn has gps, it is a matter of forwarding it to pypilot usually. another thing... the hmc5883 is magneto resistive. This is much more sensitive than the hall sensors most people are using, but less repeatable. The extra precision is not actually useful for an autopilot either (perhaps useful to detect magnetic objects etc) So the compass may vary more than a typical setup, I dont have a lot of feedback of users with hmc5883 so would be interesting to hear more. RE: Lost the option to select GPS mode - tax - 2022-08-04 Thanks!! The answer to that question was: The GPS wasn't connected! I had forgotten to check the "Forward NMEA" option in opencpn, doh! (Didn't think of my reinstall of the PC due to some other software/hardware related issues) Before I checked that option it was listed as none in the statistics page and now it's set to tcp. And now I can select GPS mode in the ui's again. About the HMC5883, initially I was running an LSM9DS1 but for some reason or the other, while doing my early trial and errors, things didn't work at all. Back then I thought it was the PID values that was out of order, but then noticed on the desk at home that I didn't get repeatable results with that one. Noting down it's value, then shifting it 90 degrees and back again it never added up. Might have been calibration issues. My second attempts was with the duo MPU-6050 and a connected HMC5883 (had some issues with orienting the modules), but this time I had also moved away from the trial and error approach and read everything I could find (like the excellent workbook). On the water I did multiple 360 turns and after a adjustment (-87 degrees) it matched the boats compass perfectly. It's mounted (taped) with a 50cm cable away from anything metal. Had quite successful runs over longer distances keeping the heading I had picked. Will test the LSM9DS1 sometime again now that I have the basic setup working and just doing one change, the IMU. Have had a hard time finding any reasonable priced IMU. The LSM9DS1 wasn't cheap from a local dealer in Sweden. Best regards! |