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

Username/Email:
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 1,141
» Latest member: eryjinu
» Forum threads: 590
» Forum posts: 3,567

Full Statistics

Online Users
There are currently 48 online users.
» 1 Member(s) | 47 Guest(s)
dirkw

Latest Threads
spaceX
Forum: General discussion
Last Post: jim321
12-16-2017, 11:32 AM
» Replies: 2
» Views: 75
oeSENC and OpenPlotter up...
Forum: General discussion
Last Post: monos
12-15-2017, 07:06 AM
» Replies: 6
» Views: 208
security cam
Forum: General discussion
Last Post: tocan
12-15-2017, 06:12 AM
» Replies: 2
» Views: 174
Introducing OpenPlotter h...
Forum: General discussion
Last Post: uriguri
12-13-2017, 04:26 PM
» Replies: 25
» Views: 3,002
How do I adjust screen lu...
Forum: How do I...?
Last Post: Littlechay
12-13-2017, 03:02 PM
» Replies: 4
» Views: 175
Still issues, with GPIO, ...
Forum: Bug Reports
Last Post: e-sailing
12-12-2017, 05:24 PM
» Replies: 4
» Views: 155
default connections in op...
Forum: Bug Reports
Last Post: PaddyB
12-10-2017, 05:19 AM
» Replies: 1
» Views: 92
AIS Antenna?
Forum: How do I...?
Last Post: Littlechay
12-09-2017, 05:53 PM
» Replies: 8
» Views: 292
A beginner can manage it!...
Forum: Brag Board
Last Post: Leigh
12-08-2017, 05:17 AM
» Replies: 10
» Views: 687
Ikommunicate kindle app o...
Forum: How do I...?
Last Post: SkipperEarly
12-07-2017, 05:16 PM
» Replies: 4
» Views: 179

 
  Text in mail
Posted by: Luckbert - 12-02-2017, 09:35 AM - Forum: How do I...? - No Replies

Hello, everyone,
I have received an e-mail from Openplotter. An action triggers the mail. 
My problem is the content of the mail. The mail contains all sensor data. The mail should only contain the text I write. 

Here the content of my first mail.

"
navigation.headingMagnetic: 4.51746539402
Quelle: OPsensors.I2C.MPU-9150
Zeitstempel: 2017-12-01T20:16:31.581Z

navigation.attitude.roll: -0.0109318293441
Quelle: OPsensors.I2C.MPU-9150
Zeitstempel: 2017-12-01T20:16:31.581Z

navigation.attitude.pitch: 0.0279937652846
Quelle: OPsensors.I2C.MPU-9150
Zeitstempel: 2017-12-01T20:16:31.581Z

environment.outside.pressure: 101361.999512
Quelle: OPsensors.I2C.BMP180
Zeitstempel: 2017-12-01T20:16:31.625Z

environment.outside.temperature: 302.449999237
Quelle: OPsensors.I2C.BMP180
Zeitstempel: 2017-12-01T20:16:31.625Z
"

How can I edit the text beforehand?

Greetings Jürgen


Photo Solved - Tides and current display
Posted by: Didier B - 12-02-2017, 06:43 AM - Forum: Bug Reports - Replies (2)

I first suspected an OCPN issue, but it seems the issue could rather be in OP: Here is the thread in CF :
http://www.cruisersforum.com/forums/show...ost2528222

Since I use the updated 0.16.0 beta of OP, which inclute the version 4.8.0 of OpenCPN, the 'Show Tides' and 'Show Current' buttons (in the tool bar) doesn't work correctly. The map Symbols are HUGE, and the graph doesn't pop up when right-clicking the symbol - see attached photo

Andreas from CruisersForum tells he solved exactly the same problem with apt-get update and upgrade, so I did the same, but without result.

I've asked him which Linux he was using ...

Any clue ?



Attached Files Thumbnail(s)
   

  Output GPS to DSC VHF
Posted by: Leigh - 12-01-2017, 03:19 PM - Forum: How do I...? - Replies (3)

Hi,

I have a RPi3-Sensehat setup with a USB GPS (see bragboard)

I'd now like to export GPS to my VHF radio (NAVMAN 7100EU)

Page 36 in the manual in the link above says the Navman has GPS/NMEA input (I know this since at the moment I have the VHF wired up to an old Garmin Etrex)

It also says Comm. Port: 4800 baud NMEA on page 36.

How could I do this, physically and in terms of software setup

Please  Smile

Leigh


Question AIS Antenna?
Posted by: Leigh - 12-01-2017, 03:03 PM - Forum: How do I...? - Replies (8)

Hi,

I now have the  RTL-SDR.COM USB SDR AIS receiver for my RPi3-Sensehat setup (see bragboard)

It came with both a mini and larger (maybe each arm nearly 1m long) version of a 'V' telescopic antenna.
I have read in another thread that the mini one is for FM radio, will the larger one work for AIS?

Or should I get another VHF antenna to mount on the pullpit?


Or can I use a splitter (for example this one) with my existing VHF antenna at the mast top?


Thanks

Leigh


  How do I keep OP going strong
Posted by: Didier B - 12-01-2017, 11:32 AM - Forum: How do I...? - Replies (2)

How would you rate : running update and upgrade in a terminal :

- Recommended .
- May be useful ...
- Wow ! Are you laughing at danger !
- OH NO ! DON'T DO THAT !!!!!!!!

Answers welcomed !



Attached Files Thumbnail(s)
   

  NMEA Stream stop when internet connection gets lost
Posted by: ElbeTaxi - 12-01-2017, 05:46 AM - Forum: Bug Reports - No Replies

Hi, I just drove my boat into winter stock. It took 4 days, up the river Elbe and Moldau, from Germany to Czech Republic. On the voyage, there are areas with bad or without internet coverage.

I use a huawei Stick, which is recognized as eth1, so eth1 is the device for internet sharing in the wifi ap tab.

The stick has a LED, that shows light blue, if there is 3G Connection, dark blue if EDGE, and green if only GSM available.

Everey time the LED went green, the NMEA stream dropped, and did not came back even when the LED was blue again.

The Node Red Dashboard worked and showed temeperatures without any interruption. But the NMEA stream with the Position / AIS was empty.

KPLEX restart did not restore the funktionality in most cases. Only a hard reset of the Raspberry brought it back to work.

What can that be?

Greetings from Dresden! Smile


  IMU Orientation
Posted by: DyslexicDancer - 11-30-2017, 09:48 AM - Forum: How do I...? - Replies (1)

I purchased a MPU9255 IMU for Openplotter it should arrive today. 

Once I get it installed and working on the Pi3 how is the IMU supposed to be oriented once installed in the boat?

I assume it has to be level with the Z axis pointing up, but I'm not sure if the Y or X axis should point towards the bow

Thanks,
Tim


  Ikommunicate kindle app on openplotter
Posted by: cepicscepics - 11-30-2017, 08:19 AM - Forum: How do I...? - Replies (4)

Hi, I wrote to Ikommunicate forum to knows if their kindle app can work with openplotter too, and this is the answer:

Hi, yes you can. We have released the Javascript source code of the Kindle App as open source, which you can get from here…
https://github.com/digitalyacht/ikommunicate/blob/master/Kindle_App_Example.zip
If you create a sub-folder in the Signalk folder on your Openplotter system and then unzip the files in to this sub-folder, renaming the iKommunicate-API-Kindle.html file to index.html, then when you go to 10.10.10.1:3000/signalk/kindle it should run the Kindle app. You might have to fiddle around with the URL the App tries to use to get the Signal K data, but it should be doable even by a non-developer (which also describes me).
I am sure there are developers on the OpenPlotter project that could help.


first issue:

where is the signalk folder he talk about? 
the only one I find is: 
pi@openplotter:/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/signalk


this is the iKommunicate-API-Kindle.html

Code:
<!DOCTYPE HTML>
<HTML>
<HEAD>
 <Title>.</Title>
 <Script src="jquery.min.js"></Script>
 <Link rel="stylesheet" type="text/css" media="all" href="iKommunicate-Kindle.css">

 <Script>
   //217.137.78.199:3000
   var fontSize;
   $(document).ready(function(){
     zoomX = 1;
     zoomY = 1;
     screenWidth = screen.width;
     if(screenWidth>1280)
       zoomX = screen.width / 1280;
     screenHeight = screen.height;
     if(screenHeight>768)
       zoomY = screen.height / 768;

     fontSize = parseInt($('body').css('font-size'),10);
     if(zoomX>1) {
       if(zoomX>zoomY)
          fontSize *= zoomX;
       else if(zoomY>1)
          fontSize *= zoomY;
     }
     $('body').css('font-size',fontSize+'px');
   })
   var NUMBER_VARIABLES=4;
   var LABEL_VARIABLES=[["Depth (K)","Depth (T)","Depth (S)"],
                    ["Speed","SOG"],
                    ["Heading (M)","Heading (T)","COG"],
                    ["Wind (App)","Wind (True)"]
                   ]
   var LABEL_UNITS=[["Meters","Meters","Meters",   "Feet","Feet","Feet"],
                    ["Knots","Knots"],
                    ["Degrees","Degrees","Degrees"],
                    ["Knots","Knots",   "M/S","M/S"]
                   ]
   var KEYS_4BOXES=[["belowKeel","belowTransducer","belowSurface"],
                    ["speedThroughWater","speedOverGround"],
                    ["headingMagnetic","headingTrue","courseOverGround"],
                    ["angleApparent","angleTrue"],
                    ["speedApparent","speedTrue"]
                   ]

   var positionPriority=[-1,-1,-1,-1,-1];

   var ipServer;
   var flagStreamClosed=false;
   var displayMode=0,speedUnitsMode=0,depthUnitsMode=0;
   var currentBoxes=0;
   var guiDrawed=false;
   var currentPath,currentPath2,currentPath3;
   var variableNumber=0;
   var interval=1000;
   var flagFirstBox=true,flagWindAngle=true;
   var i;

   // Start the request of data to the server
   function startRequestDataServer() {
     var urlServer;
     var jsonParsed;
     var value,value2,value3,value4;
     if(ipServer.length==0||ipServer=="192.168.1.64"||ipServer=="192.168.30.221"||ipServer=="192.168.30.219")
       urlServer = "http://demo.signalk.org/signalk/v1/api/vessels/self/";
       // urlServer = "http://217.137.78.199:3000/signalk/v1/api/vessels/self/";
     else
       urlServer = "http://"+ipServer+"/signalk/v1/api/vessels/self/";

     setInterval(function() {
       // If the user close the stream (flagStreamClosed==true), do anything
       if(flagStreamClosed)
         return;
       if(!guiDrawed)
         drawGUI();

       var xhttp = new XMLHttpRequest();
       if(positionPriority[0]==-1) {
         xhttp.open("GET", urlServer, true);
       }
       else {
         switch(currentBoxes) {
           case 0:                                                            // Depth
           case 1:                                                            // Speed
           case 2:                                                            // Course (Heading)
           case 3:                                                            // Wind
             xhttp.open("GET", urlServer+currentPath+"/", true);
             break;
           case 4:                                                            // Depth and Speed
           case 5:                                                            // Course (Heading) and Wind
           case 6:                                                            // All
             xhttp.open("GET", urlServer, true);
             break;
         }
       }
       xhttp.send();
       // The next function is executed when the data arrives from the server
       xhttp.onreadystatechange = function() {
         if (xhttp.readyState == 4 && xhttp.status == 200) {
           if(positionPriority[0]==-1) {
             getPriorities(JSON.parse(xhttp.responseText.replace(/,"value":{}/g,"")));
             getPath(currentBoxes);
             return;
           }
           if(positionPriority[currentBoxes]!=9) {
             switch(currentBoxes) {
               case 0:                                                        // Depth
               case 1:                                                        // Speed
               case 2:                                                        // Course (Heading)
                 value = JSON.parse(xhttp.responseText.replace(/,"value":{}/g,"")).value;
                 if(depthUnitsMode==1&&currentBoxes==0)
                   value *= 3.2808;
                 else if(currentBoxes==1)
                   value *= 1.94384;
                 else if(currentBoxes==2)
                   value *= 57.296;
                 if(currentBoxes!=2)
                   value = value.toFixed(1);
                 else {
                   value = Math.round(value);
                   value = format3Digits(1,value);
                 }
                 displayValue(value,null,null,null,null);
                 break;
               case 3:
                 if(flagWindAngle) {
                   value = JSON.parse(xhttp.responseText.replace(/,"value":{}/g,"")).value;
                   value *= 57.296;
                   value = Math.round(value);
                   value = format3Digits(2,value);
                   xhttp.open("GET", urlServer+currentPath2+"/", true);
                   xhttp.send();
                   flagWindAngle = false;
                 }
                 else {
                   value2 = JSON.parse(xhttp.responseText.replace(/,"value":{}/g,"")).value;
                   if(speedUnitsMode==0)
                     value2 *= 1.94384;
                   value2 = Math.round(value2);
                   displayValue(value,value2,null,null,null);
                   flagWindAngle = true;
                 }
                 break;
               case 4:                                                        // Depth and Speed
                 jsonParsed = JSON.parse(xhttp.responseText.replace(/,"value":{}/g,""));
                 value  = jsonParsed["environment"]["depth"][KEYS_4BOXES[0][positionPriority[0]]].value;
                 if(depthUnitsMode==1)
                   value *= 3.2808;
                 value = value.toFixed(1);
                 value2 = jsonParsed["navigation"][KEYS_4BOXES[1][positionPriority[1]]].value;
                 value2 *= 1.94384;
                 value2 = value2.toFixed(1);
                 displayValue(value,value2,null,null,null);
                 break;
               case 5:                                                        // Course (Heading) and Wind
                 jsonParsed = JSON.parse(xhttp.responseText.replace(/,"value":{}/g,""));
                 value1 = jsonParsed["navigation"][KEYS_4BOXES[2][positionPriority[2]]].value;
                 value1 *= 57.296;
                 value1 = Math.round(value1);
                 value1 = format3Digits(1,value1);
                 value2 = jsonParsed["environment"]["wind"][KEYS_4BOXES[3][positionPriority[3]]].value;
                 value2 *= 57.296;
                 value2 = Math.round(value2);
                 value2 = format3Digits(2,value2);
                 value3 = jsonParsed["environment"]["wind"][KEYS_4BOXES[4][positionPriority[4]]].value;
                 if(speedUnitsMode==0)
                   value3 *= 1.94384;
                 value3 = Math.round(value3);
                 displayValue(value,value2,value3,null,null);
                 break;
               case 6:                                                        // All
                   jsonParsed = JSON.parse(xhttp.responseText.replace(/,"value":{}/g,""));
                   value  = jsonParsed["environment"]["depth"][KEYS_4BOXES[0][positionPriority[0]]].value;
                   if(depthUnitsMode==1)
                     value *= 3.2808;
                   value = value.toFixed(1);
                   value2 = jsonParsed["navigation"][KEYS_4BOXES[1][positionPriority[1]]].value;
                   value2 *= 1.94384;
                   value2 = value2.toFixed(1);
                   value3 = jsonParsed["navigation"][KEYS_4BOXES[2][positionPriority[2]]].value;
                   value3 *= 57.296;
                   value3 = Math.round(value3);
                   value3 = format3Digits(1,value3);
                   value4 = jsonParsed["environment"]["wind"][KEYS_4BOXES[3][positionPriority[3]]].value;
                   value4 *= 57.296;
                   value4 = Math.round(value4);
                   value4 = format3Digits(2,value4);
                   value5 = jsonParsed["environment"]["wind"][KEYS_4BOXES[4][positionPriority[4]]].value;
                   if(speedUnitsMode==0)
                     value5 *= 1.94384;
                   value5 = Math.round(value5);
                   displayValue(value,value2,value3,value4,value5);
                 break;
             }
           }
           else {
             document.getElementById('display11').innerHTML =
                   "<Font Style='Font-Size:500%;'><B>"+LABEL_VARIABLES[currentBoxes][0]+"</B><BR><BR></Font>"+
                   "<span Style='Font-Size:700%;'><B>Unavailable</span></B><BR><BR><BR><BR><BR><BR>"+
                   "<Font Style='Font-Size:500%;'><B>"+LABEL_UNITS[currentBoxes][0]+"</B></Font>";
           }
         }
         else {
         }
       };
     }, interval);
   }

   function drawGUI() {
     switch(Number(displayMode)) {
       case 0:
         currentBoxes = 0;
         break;
       case 1:
         document.getElementById("row1").style.height = "48%";
         document.getElementById("row2").style.display = "table-row";
         currentBoxes = 4;
         break;
       case 2:
         document.getElementById("row1").style.height = "48%";
         document.getElementById("row1").style.width = "50%";
         document.getElementById("row2").style.display = "table-row";
         document.getElementById("row2").style.width = "50%";
         document.getElementById("col12").style.display = "table-cell";
         document.getElementById("col22").style.display = "table-cell";
         currentBoxes = 6;
         break;
     }
     guiDrawed = true;
   }

   function getPath(answerHTTP) {
     switch(currentBoxes) {
       case 0:                                                                // Depth
         switch(positionPriority[0]) {
           case 0:
             currentPath = "environment/depth/belowKeel";
             break;
           case 1:
             currentPath = "environment/depth/belowTransducer";
             break;
           case 2:
             currentPath = "environment/depth/belowSurface";
             break;
         }
         break;
       case 1:                                                                // Speed
         switch(positionPriority[1]) {
           case 0:
             currentPath = "navigation/speedThroughWater";
             break;
           case 1:
             currentPath = "navigation/speedOverGround";
             break;
         }
         break;
       case 2:                                                                // Course (Heading)
         switch(positionPriority[2]) {
           case 0:
             currentPath = "navigation/headingMagnetic";
             break;
           case 1:
             currentPath = "navigation/headingTrue";
             break;
           case 2:
             currentPath = "navigation/courseOverGround";
             break;
         }
         break;
       case 3:                                                                // Wind
         switch(positionPriority[3]) {
           case 0:
             currentPath = "environment/wind/angleApparent";
             break;
           case 1:
             currentPath = "environment/wind/angleTrue";
             break;
         }
         switch(positionPriority[4]) {
           case 0:
             currentPath2 = "environment/wind/speedApparent";
             break;
           case 1:
             currentPath2 = "environment/wind/speedTrue";
             break;
         }
         break;
       case 4:                                                                // Depth and Speed
         switch(positionPriority[0]) {
           case 0:
             currentPath = "environment/depth/belowKeel";
             break;
           case 1:
             currentPath = "environment/depth/belowTransducer";
             break;
           case 2:
             currentPath = "environment/depth/belowSurface";
             break;
         }
         switch(positionPriority[1]) {
           case 0:
             currentPath2 = "navigation/speedThroughWater";
             break;
           case 1:
             currentPath2 = "navigation/speedOverGround";
             break;
         }
         break;
       case 5:                                                                // Course (Heading) and Wind
         switch(positionPriority[2]) {
           case 0:
             currentPath = "navigation/headingMagnetic";
             break;
           case 1:
             currentPath = "navigation/headingTrue";
             break;
           case 2:
             currentPath = "navigation/courseOverGround";
             break;
         }
         switch(positionPriority[3]) {
           case 0:
             currentPath2 = "environment/wind/angleApparent";
             break;
           case 1:
             currentPath2 = "environment/wind/angleTrue";
             break;
         }
         switch(positionPriority[4]) {
           case 0:
             currentPath3 = "environment/wind/speedApparent";
             break;
           case 1:
             currentPath3 = "environment/wind/speedTrue";
             break;
         }
         break;
       case 6:                                                                // All
         break;
     }
   }

   function getPriorities(answerHTTP) {
     if(typeof answerHTTP.environment.depth.belowKeel!="undefined")             // Depth
       if(typeof answerHTTP.environment.depth.belowKeel.value!="undefined")
         positionPriority[0] = 0;
     if(positionPriority[0]==-1&&typeof answerHTTP.environment.depth.belowTransducer!="undefined")
       if(positionPriority[0]==-1&&typeof answerHTTP.environment.depth.belowTransducer.value!="undefined")
         positionPriority[0] = 1;
     if(positionPriority[0]==-1&&typeof answerHTTP.environment.depth.belowSurface!="undefined")
       if(positionPriority[0]==-1&&typeof answerHTTP.environment.depth.belowSurface.value!="undefined")
         positionPriority[0] = 2;
     if(positionPriority[0]==-1)
       positionPriority[0] = 9;

     if(typeof answerHTTP.navigation.speedThroughWater!="undefined")            // Speed
       if(typeof answerHTTP.navigation.speedThroughWater.value!="undefined")
         positionPriority[1] = 0;
     if(positionPriority[1]==-1&&typeof answerHTTP.navigation.speedOverGround!="undefined")
       if(positionPriority[1]==-1&&typeof answerHTTP.navigation.speedOverGround.value!="undefined")
         positionPriority[1] = 1;
     if(positionPriority[1]==-1)
       positionPriority[1] = 9;

     if(typeof answerHTTP.navigation.headingMagnetic!="undefined")              // Course (Heading)
       if(typeof answerHTTP.navigation.headingMagnetic.value!="undefined")
         positionPriority[2] = 0;
     if(positionPriority[2]==-1&&typeof answerHTTP.navigation.headingTrue!="undefined")
       if(positionPriority[2]==-1&&typeof answerHTTP.navigation.headingTrue.value!="undefined")
         positionPriority[2] = 1;
     if(positionPriority[2]==-1&&typeof answerHTTP.navigation.courseOverGround!="undefined")
       if(positionPriority[2]==-1&&typeof answerHTTP.navigation.courseOverGround.value!="undefined")
       positionPriority[2] = 2;
     if(positionPriority[2]==-1)
       positionPriority[2] = 9;

     if(typeof answerHTTP.environment.wind.angleApparent!="undefined")  // Wind
       if(typeof answerHTTP.environment.wind.angleApparent.value!="undefined")  // Wind
         positionPriority[3] = 0;
     if(positionPriority[3]==-1&&typeof answerHTTP.environment.wind.angleTrue!="undefined")
       if(positionPriority[3]==-1&&typeof answerHTTP.environment.wind.angleTrue.value!="undefined")
         positionPriority[3] = 1;
     if(positionPriority[3]==-1)
       positionPriority[3] = 9;
     if(typeof answerHTTP.environment.wind.speedApparent!="undefined")          // Wind
       if(typeof answerHTTP.environment.wind.speedApparent.value!="undefined")
         positionPriority[4] = 0;
     if(positionPriority[4]==-1&&typeof answerHTTP.environment.wind.speedTrue!="undefined")
       if(positionPriority[4]==-1&&typeof answerHTTP.environment.wind.speedTrue.value!="undefined")
         positionPriority[4] = 1;
     if(positionPriority[4]==-1)
       positionPriority[4] = 9;
   }

   function displayValue(value,value2,value3,value4,value5) {
     var offset=0;
     switch(currentBoxes) {
       case 0:
       case 1:
       case 2:
         if(depthUnitsMode==1&&currentBoxes==0)
           offset = 2;
         document.getElementById('display11').innerHTML =
               "<Font Style='Font-Size:600%;'><B>"+LABEL_VARIABLES[currentBoxes][positionPriority[currentBoxes]]+
                     "</B><BR><BR></Font>"+
               "<span Style='Font-Size:1750%;'><B>"+value+"</span></B><BR><BR><BR><BR><BR><BR>"+
               "<Font Style='Font-Size:600%;'><B>"+LABEL_UNITS[currentBoxes][positionPriority[currentBoxes]+offset]+
                     "</B></Font>";
         break;
       case 3:
         if(speedUnitsMode==1)
           offset = 2;
         document.getElementById('display11').innerHTML =
               "<Font Style='Font-Size:600%;'><B>"+LABEL_VARIABLES[currentBoxes][positionPriority[currentBoxes]]+
                     "</B></Font><BR><BR><BR><BR>"+
               "<span Style='Font-Size:1500%; Display:Block; Line-Height:0.9;'><B>"+value+"<BR>"+value2+
                     "</span Style='line-height: 1;'></B><BR><BR><BR>"+
               "<Font Style='Font-Size:600%;'><B>"+LABEL_UNITS[currentBoxes][positionPriority[currentBoxes]+offset]+
                     "</B><BR></Font>";
         break;
       case 4:
         if(depthUnitsMode==1)
           offset = 2;
         document.getElementById('display11').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[0][positionPriority[0]]+"</B></Font><BR><BR><BR>"+
               "<span Style='Font-Size:1000%;'><B>"+value+"</span></B><BR><BR><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[0][positionPriority[0]+offset]+"</B></Font>";
         document.getElementById('display21').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[1][positionPriority[1]]+"</B></Font><BR><BR><BR>"+
               "<span Style='Font-Size:1000%;'><B>"+value2+"</span></B><BR><BR><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[1][positionPriority[1]]+"</B></Font>";
         break;
       case 5:
         document.getElementById('display11').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[2][positionPriority[2]]+"</B></Font><BR><BR><BR>"+
               "<span Style='Font-Size:1000%;'><B>"+value+"</span></B><BR><BR><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[2][positionPriority[2]+offset]+"</B></Font>";
         if(speedUnitsMode==1)
           offset = 2;
         document.getElementById('display21').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[3][positionPriority[3]]+"</B></Font><BR><BR>"+
               "<span Style='Font-Size:900%; Display:Block; Line-Height:0.9;'><B>"+value2+"<BR>"+value3+
                     "</span></B><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[3][positionPriority[3]+offset]+"</B></Font>";
         break;
       case 6:
         if(depthUnitsMode==1)
           offset = 2;
         document.getElementById('display11').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[0][positionPriority[0]]+"</B></Font><BR><BR><BR>"+
               "<span Style='Font-Size:900%;'><B>"+value+"</span></B><BR><BR><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[0][positionPriority[0]+offset]+"</B></Font>";
         document.getElementById('display12').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[1][positionPriority[1]]+"</B></Font><BR><BR><BR>"+
               "<span Style='Font-Size:900%;'><B>"+value2+"</span></B><BR><BR><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[1][positionPriority[1]]+"</B></Font>";
         document.getElementById('display21').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[2][positionPriority[2]]+"</B></Font><BR><BR><BR>"+
               "<span Style='Font-Size:900%;'><B>"+value3+"</span></B><BR><BR><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[2][positionPriority[2]+offset]+"</B></Font>";
         offset = 0;
         if(speedUnitsMode==1)
           offset = 2;
         document.getElementById('display22').innerHTML =
               "<Font Style='Font-Size:300%;'><B>"+LABEL_VARIABLES[3][positionPriority[3]]+"</B></Font><BR><BR>"+
               "<span Style='Font-Size:800%; Display:Block; Line-Height:0.9;'><B>"+value4+"<BR>"+value5+
                     "</span></B><BR>"+
               "<Font Style='Font-Size:300%;'><B>"+LABEL_UNITS[3][positionPriority[3]+offset]+"</B></Font>";
         break;
     }
   }

   // This function is executed when the user press the button "Close/Open the stream", activating or deactivating
   // the flag "flagStreamClosed". This flag is checked in the function "getVariablesAvailable". If false, the program
   // request data from the server. If it is true, doesnt ask for data
   function openCloseStream() {
     if (document.getElementById("buttonOpenCloseStream").innerHTML.trim()=="Close Stream") {
       document.getElementById("buttonOpenCloseStream").innerHTML = "Open Stream";
       flagStreamClosed = true;
     }
     else {
       document.getElementById("buttonOpenCloseStream").innerHTML = "Close Stream";
       flagStreamClosed = false;
     }
     return false;
   }

   document.onclick = function(event) {
     if(event.offsetX>document.body.offsetWidth/2) {
       switch(currentBoxes) {
         case 0:
         case 1:
         case 2:
           currentBoxes++;
           break;
         case 3:
           break;
         case 4:                                                               // 12
           currentBoxes++;
           break;
          case 5:                                                              // 34
           break;
         case 6:                                                               // 1234
           break;
       }
     }
     else {
       switch(currentBoxes) {
         case 0:
           break;
         case 1:
         case 2:
         case 3:
            currentBoxes--;
           break;
         case 4:
           break;
         case 5:
            currentBoxes--;
            break;
         case 6:
           break;
       }
     }
     getPath(1,null);
   }

   // This function save, in the local space area, the value of the IP the user wrote in the field "IP" of the
   // WEB page, so he/she doesnt need to write again it every time the page is accessed
   function saveNewIP(event) {
     // The new IP is saved when the user press Enter (code key 13)
     if(event.keyCode===13) {
       if($('#ipServerInput').val().length!=0)
         localStorage.setItem('ipServer',$('#ipServerInput').val());
       else
         localStorage.removeItem("ipServer");
     }

     return false;
   }

   // This function save, in the local space area, the value of the IP the user wrote in the field "IP" of the
   // WEB page, so he/she doesnt need to write again it every time the page is accessed
   function getSettings() {
     if(localStorage.getItem("speedUnitsModeSetting"))
       speedUnitsMode = localStorage.getItem("speedUnitsModeSetting");
     if(localStorage.getItem("depthUnitsModeSetting"))
       depthUnitsMode = localStorage.getItem("depthUnitsModeSetting");
     if(localStorage.getItem("displayModeSetting"))
       displayMode = localStorage.getItem("displayModeSetting");
     if(localStorage.getItem("nightViewMode")) {
       if(localStorage.getItem("nightViewMode")==1) {
         document.body.classList.add("bodyNightView");
         document.getElementById("buttonSettings").style.backgroundImage = "url('OptionsImageWhite.png')";
       }
       else {
         document.body.classList.remove("bodyNightView");
         document.getElementById("buttonSettings").style.backgroundImage = "url('OptionsImage.png')";
       }

     }

     guiDrawed = false;
   }

   function format3Digits(typeCall,value) {
     switch(typeCall) {
       case 1:
         var valueString = value+"";
         if((value>0&&valueString.length>=3)||(value<0&&valueString.length>3))
           return valueString;
         if(value>=0) {
           while(valueString.length<3)
             valueString = "0"+valueString;
           value = valueString;
         }
         else {
           value = -value;
           valueString = value+"";
           while(valueString.length<3)
             valueString = "0"+valueString;
           valueString = "-"+valueString;
         }
         return valueString;
       case 2:
         if(value>180)
           value = value - 360;
         var valueString = value+"";
         if((value>0&&valueString.length>=3)||(value<0&&valueString.length>3)) {
           if(value>=100&&value<180)
             valueString = value+"-";
           return valueString;
         }
         if(value>=0&&value<100) {
           while(valueString.length<3)
             valueString = "0"+valueString;
           if(value!=0)
             valueString += "-";
         }
         else if(value>=-99&&value<=-1){
           value = -value;
           valueString = value+"";
           while(valueString.length<3)
             valueString = "0"+valueString;
           valueString = "-"+valueString;
         }
         return valueString;
     }
   }
 </Script>
</HEAD>

<BODY class=nightView onresize='document.getElementsByTagName("body")[0].style[ "font-size" ] = document.body.clientWidth*(12/600) + "px";'>
 <Table id="table" Style="Width:100%; Height:100%; Margin-Top:3px; Margin:0px; Padding:0" Border="0" CellPadding="0"
       CellSpacing="0">
   <TR Id="row1" Height=93%>
     <TD Width=50% Align="Center" VAlign="Center" Style="Border:1px solid;">
        <Div id="display11"></Div>
     </TD>
     <TD Id="col12" Width=50% Align="Center" VAlign="Center" Style="Border:1px solid; Border-Left-Style:Hidden; Display:None;">
        <Div id="display12"></Div>
     </TD>
   </TR>
   <TR Id="row2" Height=45% Style="Border:1px solid; Display:None;">
     <TD Width=50% Align="Center" VAlign="Center" Style="Border:1px solid; Border-Top-Style:Hidden;">
        <Div id="display21"></Div>
     </TD>
     <TD Id="col22" Width=50% Align="Center" VAlign="Center" Style="Border:1px solid;  Border-Left-Style:Hidden;
           Border-Top-Style:Hidden; Display:None;">
        <Div id="display22"></Div>
     </TD>
   </TR>
   <TR Height=7%>
     <TD Width=100% Align="Center" VAlign="Center" Style="Border:1px solid; Border-Top-Style:Hidden;" ColSpan=2>
       <Form>
         <div>
           <span id="ipServerInputLabel" Style="Display:None;"><B>URL or IP Address:</B></span>
           <Input Type="Text" id="ipServerInput" Size="15%"
                 PlaceHolder="demo.signalk.org" Style="Padding-top:3px; Padding-Bottom:3px; Display:None;"
                 onKeyPress="saveNewIP(event)">
           <Button id="buttonOpenCloseStream" Type="Button" Style="Color:White; Background-Color:Black; Border-Radius:4px;
                 Padding-top:3px; Padding-Bottom:3px; Display:None;" onClick="openCloseStream()">Close Stream</Button>
           <Button id="buttonSettings" Type="Button" Style="Border-Style:none; Background-Color:Transparent;
                 background-image: url('OptionsImage.png');
                 background-repeat: no-repeat; background-size:contain; Border-Radius:4px;
                 Padding-top:3px; Padding-Bottom:3px;" onclick="window.location.href='Settings.html'">
                 &nbsp&nbsp&nbsp&nbsp</Button>
         </div>
       </Form>
     </TD>
   </TR>
 </Table>
 <Script>
   ipServer = window.location.host;
   if(ipServer.length==0||ipServer=="192.168.1.64"||ipServer=="192.168.30.221"||ipServer=="192.168.30.219")
     document.getElementById("buttonSettings").style.opacity = 0.5;
   else
     document.getElementById("buttonSettings").style.opacity = 1;
console.log(ipServer);
   getSettings();
   startRequestDataServer();
//console.log(JSON.stringify(jsonParsed));
//console.log(positionPriority[0]+"   "+positionPriority[1]+"   "+positionPriority[2]+"   "+positionPriority[3]);
 </Script>
</BODY>
</HTML>


and I think this is the function where modify the IP:

Code:
// Start the request of data to the server
   function startRequestDataServer() {
     var urlServer;
     var jsonParsed;
     var value,value2,value3,value4;
     if(ipServer.length==0||ipServer=="192.168.1.64"||ipServer=="192.168.30.221"||ipServer=="192.168.30.219")
       urlServer = "http://demo.signalk.org/signalk/v1/api/vessels/self/";
       // urlServer = "http://217.137.78.199:3000/signalk/v1/api/vessels/self/";
     else
       urlServer = "http://"+ipServer+"/signalk/v1/api/vessels/self/";



thanks a lot


  Ok, I give up
Posted by: vapochilled - 11-30-2017, 01:21 AM - Forum: General discussion - Replies (17)

For several months I've worked and spent money on this, yet I still can not get the rpi3 to be smooth enough to use as a nav device.
Loading and using maps is painfully slow (tried both enc and rnc).
The rpi touchscreen was a complete waste of money, unusable(never could get right click to work with opencpn).
I have however learned a lot, thanks to the people on this forum and to the openplotter project, which really does make complex things appear easy.
So, I'm changing direction, I don't believe the rpi3 is capable of working well enough to use as a nav device, I trully envy you people smart enough to get it to work for you, but it is awful from where I sit!
So my plan now is use a laptop and tablet that actually has enough horsepower to move a map left one click without taking 15 seconds!
I'll still run opencpn on those devices but I want to use openplotter to "send" all my gps/ais/ sensor data magically out to those devices. Which I know it can do...
I just need someone to point me to a "for idiots" guide to doing it please.
As an example of why I'm frustrated, I just ran opencpn on my desktop, granted it has power, and uses power! but...90fps vs the rpi which is turning in 2fps, I can't move a map without it taking an eternity, I've watched videos where people scroll around with abandon...bastards,lol
So frustrating because I really think OP is a great project, I just can not make it work for me,


  dAISy Hat setup Help
Posted by: DyslexicDancer - 11-28-2017, 08:59 PM - Forum: How do I...? - Replies (2)

I'm trying to get openplotter set-up with a dAISy Hat Dual Channel AIS receiver, I have it connected to a Raspberry Pi 3

I've run the Ilker Temir script in the email they sent me, and I think it worked because now I do not have bluetooth anymore, so i think the serial port is available now

But for the life of me I do not understand how I'm suppose to get the dAISy hat to communicate with Openplotter

I think the dAISy Hat is working fine because every 5 or so seconds I get the green LED light flash, but when i look in openplotter I do not see that it has a connection

I've tried setting up a new connection under the NMEA 0183 tab, (Type:Serial Name:ais, Port:ttyS0 Baud:38400 in/ot:in) but no dice

I'm a total noob when it comes to the Raspberry Pi and Linux

Any help would be greatly appreciated

TIA
Tim