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
Garmin plotter crashes nmea communication
#3
Hi Sean, thanks for your reply,

I'm afraid the issue is not solved with the latest version on Git, the Nmea.py is still missing the check for empty string.

I see what you mean by the gps/compass mode there is however no way in my garmin that lets me config the APB sentence and it would not solve the fact that i can't have waypoints active while tacking that let's me see where i have to end up en the distance to the waypoint/route.

I might be a bit biased but of course i think my option is more convenient as you can set the modes on Tinypilot and in openCPN. so this only takes a few seconds while you could be tacking for hours or days and keep the autopilot at wind mode instead of removing the waypoint, having no idea where to end up or how far you have to go.

I'm not sure but i thought OpenCPN outputs APAPB instead of GPAPB (i think most standard plotters use GPAPB), would it be an option to make a difference between those two, and get both options for example like (well something like this it might contain errors as i'm not sure of a couple of things and i am not exactly a python programmer):

    if line[1:6] == 'APAPB' and time.time() - self.last_apb_time > 1:
            self.last_apb_time = time.time()
            data = line[7:len(line)-3].split(',')
            if self.last_values['ap.enabled']:
                mode = 'compass' if data[13] == 'M' else 'gps'
                if self.last_values['ap.mode'] != mode:
                    self.client.set('ap.mode', mode)
#try  (some check should be here but didn't wan't to chance much to this piece as you will have a beter vision about this)
            command = float(data[12])
            xte = float(data[2])
            xte = min(xte, 0.15) # maximum 0.15 miles
            if data[3] == 'L':
                xte = -xte
            command += 300*xte; # 30 degrees for 1/10th mile
            if abs(self.last_values['ap.heading_command'] - command) > .1:
                self.client.set('ap.heading_command', command)
#except
            return True
        elif line[1:6] == 'GPAPB' and time.time() - self.last_apb_time > 1:
            self.last_apb_time = time.time()
            data = line[7:len(line)-3].split(',')
            if self.last_values['ap.enabled'] and self.last_values['ap.mode'] == 'gps':
               try: 
                  command = float(data[12])
                  xte = float(data[2])
                  xte = min(xte, 0.15) # maximum 0.15 miles
                  if data[3] == 'L':
                      xte = -xte
                  command += 300*xte; # 30 degrees for 1/10th mile
                  if abs(self.last_values['ap.heading_command'] - command) > .1:
                      self.client.set('ap.heading_command', command)
                  return True
               except: return False 
        return False

Well it's just an idea hope you can do something with this.

Greetings Rob
Reply


Messages In This Thread
RE: Garmin plotter crashes nmea communication - by rmvdmrl - 2019-08-07, 08:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)