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.

Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 2,080
» Latest member: mrm
» Forum threads: 989
» Forum posts: 6,600

Full Statistics

Online Users
There are currently 39 online users.
» 1 Member(s) | 36 Guest(s)
Bing, Google, jacarejack

Latest Threads
Vexilar Sonar
Forum: Feature Requests
Last Post: keithwhite
Yesterday, 12:13 PM
» Replies: 0
» Views: 33
Signalk aisreporter
Forum: General discussion
Last Post: Luckbert
Yesterday, 09:41 AM
» Replies: 3
» Views: 87
Temperature Value not sho...
Forum: How do I...?
Last Post: PaddyB
Yesterday, 07:39 AM
» Replies: 4
» Views: 97
PyPilot doesn't work afte...
Forum: General discussion
Last Post: jim321
Yesterday, 06:24 AM
» Replies: 3
» Views: 62
Suitable ESCs
Forum: General discussion
Last Post: nvelthuijsen
Yesterday, 03:07 AM
» Replies: 5
» Views: 141
Minor bug in OP tab "Seri...
Forum: Bug Reports
Last Post: Didier B
09-19-2018, 12:17 PM
» Replies: 0
» Views: 44
connect a bluetooth speak...
Forum: How do I...?
Last Post: Didier B
09-19-2018, 12:07 PM
» Replies: 6
» Views: 124
openplotter with nasa ais...
Forum: How do I...?
Last Post: rl82
09-19-2018, 11:05 AM
» Replies: 16
» Views: 245
Error when updating openP...
Forum: Bug Reports
Last Post: Sailabout
09-19-2018, 05:50 AM
» Replies: 4
» Views: 77
problem with signalk
Forum: Bug Reports
Last Post: Coltuyn
09-19-2018, 04:36 AM
» Replies: 11
» Views: 305

 
  Vexilar Sonar
Posted by: keithwhite - Yesterday, 12:13 PM - Forum: Feature Requests - No Replies

Hi 

I have a vexilar SP200 Sonar unit installed on my boat (£146) and its very good,  its communicates by WiFi to an its own android App or Navionics app on phone/pad etc. It would be very useful if openplotter could pick up the NMEA messages and output them on the NMEA 2000 network. 

There has been some work done on this by Michael P. Scherer  at https://github.com/scherererer/SonarPhony.  Is this something that could be added ?

Cheers

Keith


  PyPilot doesn't work after upgrade
Posted by: nvelthuijsen - Yesterday, 03:30 AM - Forum: General discussion - Replies (3)

I upgraded to OpenPlotter 1.2.0. Now AutoPilot button in OpenPlotter doesn't work. I did a new install, same problem. Anyone?


  Temperature Value not shown in OpenCpn
Posted by: zugol - 09-19-2018, 06:55 PM - Forum: How do I...? - Replies (4)

Dear all,

I have a Waveshare 10DOF IMU BMP280 connected to my Raspberry Pi 2 running the latest OpenPlotter. 
It shows pitch, roll, temperature but no pressure in Opencpn on my Laptop. The pressure is shown though in the "diagnostic signalk" window, as well as in OpenCpn running directly on the raspberry(!). See screenshot attached. 

It is not shown, when I access the NMEA data from OpenCpn running on my laptop. In the NMEA debug-window, it shows that its getting NMEA Data for the pressure, see picture attached. It just doesnt display the pressure in the OpenCpn dashboard. See other screenshot. 

What could be the problem? 

Regards
Max 


  Minor bug in OP tab "Serie"
Posted by: Didier B - 09-19-2018, 12:17 PM - Forum: Bug Reports - No Replies

In the OP tab "Serie" (in FR language), both buttons "Activer l'UART" and" Désactiver l'UART" display the same mesage : Cette action désactive le Bluetooth et active l'UART !


  Signalk aisreporter
Posted by: Luckbert - 09-19-2018, 08:31 AM - Forum: General discussion - Replies (3)

Hello together,
I have set up the aisreporter in Signalalk. 
I send the data for testing to 127.0.0.1 10115.
But I cannot see any data.  Nothing appears in the diagnosis. 
Who does the reporter work for?

Where could my error be?

Greetings Jürgen


  Tethering iphone on 3+ running Alpha 1.2
Posted by: Sderbyshire - 09-18-2018, 01:04 PM - Forum: How do I...? - Replies (2)

Hi folks

I've been running a Pi3 on my boat as ( amongst other things!) an AP, sharing atethered iphone connection, and its great

just trying to set up my new 3+ and cannot get the Pi to connect to the phone, via usb

i set up my iphone as before with Personal hotspot via Usb Only, but when i plug the iphone usb into the pi nothing happens.
well it tries to look at files on the iphone but even that doesnt work!

on the Pi3 the iphone asks me to 'Trust' the Pi, then it shares the internet connection.

i CAN share the pi3+ eth0 internet connection via the Pi Wifi, just by changing the default network 'shareable' from Wlan to eth0

so... how do i connect the iphone as a personal hotspot via usb to a Pi3+ running 1.2Alpha , and then share the connection by wifi??


  Error when updating openPlotter (from 1.1 to 1.2) and OpenCPN1.2
Posted by: Sailabout - 09-18-2018, 02:20 AM - Forum: Bug Reports - Replies (4)

When updating OpenPlotter from 1.1. to 1.2, I get the following


UPDATING PACKAGE LIST…
 




Fetched 11.7 MB in 24s (467 kB/s)
Reading package list . . . Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status
E: The package lits or status file could not be parsed or opened
 
#### ERROR. ABORTING, PRESS ENTER TO EXIT ####


I get exactly the same error when updating OpenCPN and OpenCPN plugins.


  Adjusting Gains 101
Posted by: Saqqara - 09-17-2018, 04:19 PM - Forum: General discussion - Replies (1)

Perhaps the biggest documentation need for Pypilot will be a description of the various Gain settings, and a description of how to go about dialing in Pypilot in a new installation. 

Sean explained these in another thread:


Quote:D2 -- experimental is the D gain squared. Will make adjustments with very fast boat movement but not much if the boat is turning slower. Is non-linear
FF -- feed forward This gain applies rudder movement with changing heading command. When holding a heading it does nothing, but takes effect following routes, or when you adjust the heading
DD -- rate of rate of change. basically the derivative of the D gain, very useful to reduce overshoot and lag
PR -- experimental Square root of position gain. This makes less movements when the heading is very wrong to avoid overshoot.


What gains should be adjusted and when? How might the on-screen display of the various Gains firing help in finding the right settings? 

A video on this topic might also be helpful. 

Preferably avoiding complex mathematical concepts. Smile


  Suitable ESCs
Posted by: AliceJ21 - 09-17-2018, 03:30 PM - Forum: General discussion - Replies (5)

Given that folks on here have built their own PP Hardware setups, I have created this thread to share what ESCs people have used to save on a guessing game as to what simonk/atmega8 ones to buy?

Over to you all...


  Second MPU for windfane
Posted by: KolonelP - 09-16-2018, 08:04 AM - Forum: How I did it - Replies (6)

Hello there
First, I introduce myself, I am a sailor on a low budget ;-)
Thanks you, developpers of OpenPlotter!! 
What I would like to do is the usage of an second MPU for wind-vane directions.
I bought two MPU9250 very cheap. The first one is on address 0x68. By powering de AD0 pin of the second MPU the address changed to 0x69.
Then I needed to read out the device, a challenge. 

First reference:

Code:
https://kingtidesailing.blogspot.com/2016/02/how-to-setup-mpu-9250-on-raspberry-pi_25.html

 
Very good how-to on setting up the MPU. But there are some changes to be made.


Second reference:
Code:
https://kingtidesailing.blogspot.com/2016/04/make-wireless-nmea-0183-multiplexer.html
In addition to the first reference to automate at startup.

Getting the right sentence for opencpn I used this reference:
Code:
http://home.btconnect.com/Amaya/Example%20NMEA%20Sentences.pdf


After cloning
git clone https://github.com/richards-tech/RTIMULib2.git
(so before make,make install)

edit the follwing:
Code:
nano /home/pi/kts/RTIMULib2/RTIMULib/IMUDrivers/RTIMUDefs.h

edit line 151,152,153
Code:
#define MPU9250_ADDRESS0            0x69     //0x68
#define MPU9250_ADDRESS1            0x68     //0x69
#define MPU9250_ID                  0x73     //0x71


Then follow the how-to by (instead of -j4 I used -j2 for RPI):
Code:
cd RTIMULib2/Linux/RTIMULibCal
make -j2
sudo make install

After running RTEllipsoidFit for the first time edit the RTEIMULib.ini file that just is created.
Edit line 20, 35 make sure it is set to 1 for RP3 & 51
Code:
20: IMUType=7
25: I2CBus=1
51: I2CSlaveAddress=104

After this I run the calibration as stated in the how-to.


My monitor,py

Code:
#!/usr/bin/env python

import serial
import operator
import time
import os
import sys
import socket
import select

# change the working directory to the scripts folder
os.chdir("/home/pi/kts/scripts")

# log and begin instrument scripts
log = open('log', 'w')
log.write("Monitor Initialized\r\n")
log.write("Starting IMU...\r\n")
log.close()
os.system("python imu.py &")
os.system("sudo kplex &")

IMU_IP = "127.0.0.5"
IMU_PORT = 5005
imusock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
imusock.bind((IMU_IP, IMU_PORT))

log = open('log', 'a')
log.write("Starting Loop\r\n------------------------\r\n")
log.close()

imu_hack = time.time()

while True:

   # monitor imu.py
   imuready = select.select([imusock], [], [], .1)
   if imuready [0]:
       data, addr = imusock.recvfrom(1024)
       imu_hack = float(data)
   if time.time() - imu_hack > 10.0:
       log = open('log', 'a')
       log.write("Restarting IMU...\r\n")
       log.close()
       os.system("pkill -9 -f imu.py")
       os.system("python imu.py &")
       imu_hack = time.time()

my imu.py
Code:
import sys, getopt  
 
sys.path.append('.')  
import RTIMU  
import os.path  
import time  
import math  
import operator  
import socket  
 
IMU_IP = "127.0.0.2"  
IMU_PORT = 5005  

SETTINGS_FILE = "RTIMULib"  

s = RTIMU.Settings(SETTINGS_FILE)  
imu = RTIMU.RTIMU(s)  

# timers  
t_print = time.time()  
t_damp = time.time()  
t_fail = time.time()  
t_fail_timer = 0.0  
t_shutdown = 0  
 
if (not imu.IMUInit()):  
    hack = time.time()  
    imu_sentence = "$IIXDR,IMU_FAILED_TO_INITIALIZE*7C"  
    if (hack - t_print) > 1.0:  
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)  
        sock.sendto(imu_sentence, (IMU_IP, IMU_PORT))  
        t_print = hack  
        t_shutdown += 1  
        if t_shutdown > 9:  
            sys.exit(1)  

imu.setSlerpPower(0.02)  
imu.setGyroEnable(True)  
imu.setAccelEnable(True)  
imu.setCompassEnable(True)  

poll_interval = imu.IMUGetPollInterval()  

# data variables  
roll = 0.0  
pitch = 0.0  
yaw = 0.0  
heading = 0.0  
rollrate = 0.0  
pitchrate = 0.0  
yawrate = 0.0  
magnetic_deviation = -13.7  


# dampening variables  
t_one = 0  
t_three = 0  
roll_total = 0.0  
roll_run = [0] * 10  
heading_cos_total = 0.0  
heading_sin_total = 0.0  
heading_cos_run = [0] * 30  
heading_sin_run = [0] * 30  

# sentences produces by the imu  
iihdt0 = "$IIHDT,,T*0C"  
iixdr0 = "$IIXDR,A,,D,ROLL,A,,D,PTCH,A,,D,RLLR,A,,D,PTCR,A,,D,YAWR*51"  
iihdt = iihdt0  
iixdr = iixdr0  
freq = 1  

while True:  
    hack = time.time()  

    # if it's been longer than 5 seconds since last print  
    if (hack - t_damp) > 5.0:  
     
        if (hack - t_fail) > 1.0:  
            t_one = 0  
            t_three = 0  
            roll_total = 0.0  
            roll_run = [0] * 10  
            heading_cos_total = 0.0  
            heading_sin_total = 0.0  
            heading_cos_run = [0] * 30  
            heading_sin_run = [0] * 30  
            t_fail_timer += 1  
            imu_sentence = "IIXDR,IMU_FAIL," + str(round(t_fail_timer / 60, 1))  
            cs = format(reduce(operator.xor,map(ord,imu_sentence),0),'X')  
            if len(cs) == 1:  
                cs = "0" + cs  
            imu_sentence = "$" + imu_sentence + "*" + cs  
            sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)  
            sock.sendto(imu_sentence, (IMU_IP, IMU_PORT))  
            t_fail = hack  
            t_shutdown += 1  
    
    if imu.IMURead():  
        data = imu.getIMUData()  
        fusionPose = data["fusionPose"]  
        Gyro = data["gyro"]  
        t_fail_timer = 0.0  
 
        if (hack - t_damp) > .1:  
            roll = round(math.degrees(fusionPose[0]), 1)  
            pitch = round(math.degrees(fusionPose[1]), 1)  
            yaw = round(math.degrees(fusionPose[2]), 1)  
            rollrate = round(math.degrees(Gyro[0]), 1)  
            pitchrate = round(math.degrees(Gyro[1]), 1)  
            yawrate = round(math.degrees(Gyro[2]), 1)  
            if yaw < 90.1:  
                heading = yaw + 270 - magnetic_deviation  
            else:  
                heading = yaw - 90 - magnetic_deviation  
            if heading > 360.0:  
                heading = heading - 360.0  
       
            # Dampening functions  
            roll_total = roll_total - roll_run[t_one]  
            roll_run[t_one] = roll  
            roll_total = roll_total + roll_run[t_one]  
            roll = roll_total / 10  
            heading_cos_total = heading_cos_total - heading_cos_run[t_three]  
            heading_sin_total = heading_sin_total - heading_sin_run[t_three]  
            heading_cos_run[t_three] = math.cos(math.radians(heading))  
            heading_sin_run[t_three] = math.sin(math.radians(heading))  
            heading_cos_total = heading_cos_total + heading_cos_run[t_three]  
            heading_sin_total = heading_sin_total + heading_sin_run[t_three]  
            heading = round(math.degrees(math.atan2(heading_sin_total/30,heading_cos_total/30)),1)  
            if heading < 0.1:  
                heading = heading + 360.0  
 
            t_damp = hack  
            t_one += 1  
            if t_one == 10:  
                t_one = 0  
            t_three += 1  
            if t_three == 30:  
                t_three = 0  

            if (hack - t_print) > 1:  
                hdt = "IIMWV," + str(round(heading))[:-2] + ",R,,N,A"  
                hdtcs = format(reduce(operator.xor,map(ord,hdt),0),'X')  
                if len(hdtcs) == 1:  
                    hdtcs = "0" + hdtcs  
                iihdt = "$" + hdt + "*" + hdtcs  
     
                xdr = "IIXDR,A," + str(int(round(roll))) + ",D,ROLL,A," + str(int(round(pitch))) + ",D,PTCH,A," + str(int(round(rollrate))) + ",D,RLLR,A," + str(int(round(pitchrate))) + ",D,PTCR,A," + str(int(round(yawrate))) + ",D,YAWR"  
                xdrcs = format(reduce(operator.xor,map(ord,xdr),0),'X')  
                if len(xdrcs) == 1:  
                    xdrcs = "0" + xdrcs  
                iixdr = "$" + xdr + "*" + xdrcs  
 
                imu_sentence = iihdt + '\r\n' + iixdr  
 
                sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)  
                sock.sendto(imu_sentence, (IMU_IP, IMU_PORT))  
 
                t_print = hack  
                print imu_sentence
                
        time.sleep(poll_interval*1.0/1000.0)  

So this is working, now I have apparent wind angle in OpenCPN


[Image: Knipsel.png]


To-do, enhance the code with true wind angle and direction and some code cleaning in imu.py
 
Please share your thoughts about this project ;-)