Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 18-06-2018, 13:09   #886
Registered User

Join Date: Nov 2014
Location: Netherlands
Posts: 219
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by Schnapsy View Post
Hello Peter,

I installed the new version 1.3005 and I am testing it at the office.
For now, it does not work.

If I understand the principle correctly, the number transmitted by the NMEA sentence is fitting in the "FUEL column" and is therefore subtracted from the "FUELTOTAL column" ...

I tried with and without the comma behind the name of the transducer (FUEL), ie $IIXDR,V,xx.xx,L,FUEL,* and $IIXDR,V,xx.xx,L,FUEL* but nothing fits in the column FUEL (and therefore FUELTOTAL).

Am I wrong somewhere ?

There should be no comma after the FUEL field. Of course after the * there should be the proper checksum.
I tested it with string "$IIXDR,V,10.01,L,FUEL*60" and it worked on all platforms.
Could you check on the connections page and NMEA debug window if the message is accepted correctly.


Peter
ptulp is offline   Reply With Quote
Old 19-06-2018, 04:23   #887
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 243
Images: 3
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by ptulp View Post
There should be no comma after the FUEL field. Of course after the * there should be the proper checksum.
I tested it with string "$IIXDR,V,10.01,L,FUEL*60" and it worked on all platforms.
Could you check on the connections page and NMEA debug window if the message is accepted correctly.

Peter
Hello Peter,

Before posting my comment, I checked in the debug window that the sentence was accepted. For the checksum, I usually check the box that specifies not to check the checksum.

Nevertheless, I wrote the program again with a good checksum calculation and now, the data are read and displayed in the logbook.

But...

The nmea sentence that is sent and read in the debug window sends the fuel consumption to a given RPM for a given moment.
As the trip progresses, this consumption increases.

For example, for a constant RPM of 2000, my consumption will increase to about +/- 5.5 liters per hour ...
So, at the beginning, the nmea data that will be sent will be 0.01 liter, then after a while, it will be 2.35 liters (for example) and after one hour, it will be 5.5 liters, after 3 hours of travel , this consumption will be 16.5 liters, and so on ...

In the logbook, I found that consumption increased exponentially with the nmea sentences that I send.
As long as the nmea sentences are correct (checked in the debug window), the number displayed in the logbook does not correspond to anything.

With this post, I attach a TXT file that only displays RPM and XDR / Fuel data.
The RPM has been set at 2000 constant revolutions and only the fuel consumption is increasing.

N.B .: For the RPM, it is necessary to add the prefix to opencpn so that it accepts it.

This TXT file was built with the VDR plugin, so I think it is possible to simulate a trip with this file on the logbook ...

P.S. the file is a TXT file, you have to remove the PDF extension, thanks.
Attached Files
File Type: pdf FUEL1.txt.pdf (255.9 KB, 35 views)
Schnapsy is offline   Reply With Quote
Old 19-06-2018, 04:44   #888
Registered User

Join Date: Nov 2014
Location: Netherlands
Posts: 219
Re: Logbook Konni for OpenCPN

Schnapsy,


At this moment the program expects the amount of fuel used between the XDR messages. You are expecting as I see it, a combination of flowrate and consumption. I think you should just send a XDR message with the amount of fuel used within a certain time eg. 1 minute or 5 minutes.
I don't see the reason to send the XDR message in sequence with the RPM message for logbook.
I can imagine a dashboard display for the flowrate, but that is a different approach.


Regards,
Peter
ptulp is offline   Reply With Quote
Old 19-06-2018, 07:23   #889
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 243
Images: 3
Re: Logbook Konni for OpenCPN

Peter,

When - with VDR - I "play" the NMEA sentence that you transmitted above, I also get nonconforming results when a line is added in the logbook by the timer.

Quote:
Originally Posted by ptulp View Post

You are expecting as I see it, a combination of flowrate and consumption.

Peter
In fact, what I expect is that the logbook reads the digit of the column FUEL (and automatically - as is already done - this data is deduced from FUELTOTAL).

The data I transmit is the fuel flow calculated every second and adds up. As soon as the engine is on, the calculation is done.

If I open the logbook after 2 hours of navigation, the nmea data that will be transmitted, will be the addition of the 2 hours of fuel consumption.


Quote:
Originally Posted by ptulp View Post

I think you should just send a XDR message with the amount of fuel used within a certain time eg. 1 minute or 5 minutes.

Peter
That's what I do.
The arduino program sends a sentence every second.
After, with the logbook, I can determine the timer that I want: 15 or 30 minutes, or 1 hour ..., this has no consequence since the digit transmitted increases according to consumption.
At 15:05, the data transmitted is 3.26 liter;
at 15:35, the data transmitted is 5.75 liters
at 16:05 it will be 11.25 liters, etc.

What I thought I was getting, is that the logbook simply reads the number transmitted by the nmea sentence. Whether this data changes, increases or decreases, does not matter, the logbook reads the nmea sentence.

It seems to me impossible to send the calculation of fuel consumption just for 1 minute or 5 minutes. This means adding a line in the logbook every minute or five minutes with the same number, whether the engine is idling or full power.
The consumption of an engine depends on many parameters and therefore changes according to the RPM (also in relation to the state of the sea, the cleanliness of the hull, etc.).
So a static number is not useful in the logbook.


Quote:
Originally Posted by ptulp View Post
I don't see the reason to send the XDR message in sequence with the RPM message for logbook.

Peter
In the absolute, it is not necessary to send the RPM but since the logbook can display it, I add it in the sentences nmea.

On the other hand, my program that calculates the fuel consumption is based on the RPM (from the engine power curve, and adding correction parameters).
Thus, at most the RPM increases, at most - which is logical - fuel consumption increases.
This is simply an estimate that complements the information given by the gauge.

Quote:
Originally Posted by ptulp View Post
I can imagine a dashboard display for the flowrate, but that is a different approach.

Peter
Exactly.
That's what I dream of doing, but I can not do it.
A screen with the tachometer and inside the hourly consumption and below, the fuel remaining in the tank.
The advantage of the logbook is that it can then be studied at home, and before leaving again, check the estimate of the fuel remaining in the tank.

Thank you for your patience and the work you do
Schnapsy is offline   Reply With Quote
Old 19-06-2018, 08:34   #890
Registered User

Join Date: Nov 2014
Location: Netherlands
Posts: 219
Re: Logbook Konni for OpenCPN

Schnapsy,


The code reads the fuel value from the XDR message and waits for the next message, reads the fuel value and adds it up to the previous message.
This repeats until there is an addline command, either manually or auto.
Then it subtracts the total added value in the previous steps from the totalfuel and resets the fuelvalue to zero and waits for the next XDR message.


With your stream of messages when an addline is received I can subtract it from the totalfuel but I cannot reset it to zero as the next message from your stream will contain the total fuel consumed. So when there is another addline the amount of fuel subtracted from the totalfuel will be way to much.
I don't see a way how to keep the totalfuel column correct in this way.

I think it would best if you could calculate the fuel used between the XDR messages.
So the XDR fuelvalue would be the fuel used between the previous XDR and this one.


Peter
ptulp is offline   Reply With Quote
Old 19-06-2018, 14:58   #891
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 243
Images: 3
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by ptulp View Post
The code reads the fuel value from the XDR message and waits for the next message, reads the fuel value and adds it up to the previous message.
This repeats until there is an addline command, either manually or auto.
Then it subtracts the total added value in the previous steps from the totalfuel and resets the fuelvalue to zero and waits for the next XDR message.

Peter,

Sorry to bother you again.

Taking into account the explanations given above, I modified my program.

Two tests, with two different timing.

1. I calculate the instantaneous consumption per second, and every second a nmea sentence is sent.
The debug window clearly indicates the received sentence, and the data in liters (0.00152 L) corresponds to the calculations.

By setting the timer to 5, 15 or 30 minutes, the display of the data in the FUEL column is an integer; there are no decimals.
Ex: over 15 minutes, the addition of the data gives 1,368 liters; the column FUEL indicates 2 liters.

2. I modified the program to calculate the instantaneous consumption in one minute. The NMEA sentence is sent every minute.
Same result: setting the timer to 5, 15 or 30 minutes, the display of the data in the FUEL column is an integer; there are no decimals.

I think my calculations are not responsible, but there is a problem in the data display in the FUEL column. The data are in integer numbers.

N.B. I have noticed that when I manually write a decimal digit (either with a point /13.25/ or with a comma /13.25/ ) in the FUEL column, the result that appears is with a comma. This is not the case when the data is sent by the NMEA sentence, there is in this case a point followed by two zeros (2.00)
Schnapsy is offline   Reply With Quote
Old 20-06-2018, 00:15   #892
Registered User

Join Date: Nov 2014
Location: Netherlands
Posts: 219
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by Schnapsy View Post

2. I modified the program to calculate the instantaneous consumption in one minute. The NMEA sentence is sent every minute.
Same result: setting the timer to 5, 15 or 30 minutes, the display of the data in the FUEL column is an integer; there are no decimals.

Could you add a few lines of the NMEA messages you created with this step 2 ?


Thanks,
Peter
ptulp is offline   Reply With Quote
Old 20-06-2018, 01:29   #893
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 243
Images: 3
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by ptulp View Post
Could you add a few lines of the NMEA messages you created with this step 2 ?
Here is the file of the sentences nmea created every minute by the arduino program.
This is the instantaneous consumption during one minute (for 2000 RPM)
I draw your attention to the fact that the program only sends this phrase every minute.
Attached Files
File Type: pdf FUEL_MINUT.txt.pdf (9.6 KB, 42 views)
Schnapsy is offline   Reply With Quote
Old 20-06-2018, 03:28   #894
Registered User

Join Date: Nov 2014
Location: Netherlands
Posts: 219
Re: Logbook Konni for OpenCPN

Schnapsy,


Which version of OpenCPN are you running and on which OS??


Peter
ptulp is offline   Reply With Quote
Old 20-06-2018, 03:54   #895
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 243
Images: 3
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by ptulp View Post
Which version of OpenCPN are you running and on which OS??
Peter
O 4.8.4 on a portable Lenovo, Win10.

I have with me (at the office) the barebone of the boat.
I will try on it, too...
Schnapsy is offline   Reply With Quote
Old 20-06-2018, 04:31   #896
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Logbook Konni for OpenCPN

On a win10 laptop running
logbookkonni_pi-1.3005-win32.exe I get 2 decimal places and the logbook seems to behave as described with some random new lines entered manually. This is from the NMEA messages posted by Schnapsy being sent once per second from node red. Should the RPM be logged?(Edit, Yes, found it in the set up)


conachair is offline   Reply With Quote
Old 20-06-2018, 05:17   #897
Registered User

Join Date: Nov 2014
Location: Netherlands
Posts: 219
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by conachair View Post
On a win10 laptop running
logbookkonni_pi-1.3005-win32.exe I get 2 decimal places and the logbook seems to behave as described with some random new lines entered manually. This is from the NMEA messages posted by Schnapsy being sent once per second from node red. Should the RPM be logged?(Edit, Yes, found it in the set up)

Is the computer that is giving problems running with locale setting to french or something like that. Or are both computers setup the same?


Peter
ptulp is offline   Reply With Quote
Old 20-06-2018, 05:47   #898
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 243
Images: 3
Re: Logbook Konni for OpenCPN

@conachair
If I understood correctly....
With nod red, you sent every second the file I had previously given. And this automatic sending to Opencpn allows to display in the logbook the data with two decimal places, is that it?
Or, were these data entered manually?

@Peter
My Lenovo laptop and the barebone are running under Win10, and yes, with french local settings. I have this problem on both.
Schnapsy is offline   Reply With Quote
Old 20-06-2018, 06:16   #899
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Logbook Konni for OpenCPN

Quote:
Originally Posted by Schnapsy View Post
@conachair
If I understood correctly....
With nod red, you sent every second the file I had previously given. And this automatic sending to Opencpn allows to display in the logbook the data with two decimal places, is that it?
Or, were these data entered manually?
In node red I sent these 2 messages once a second from a raspberry pi-
$IIXDR,V,0.09147,L,FUEL*6B $ERRPM,E,1,2000,,,,*2

Then the data in the screen shot was entered automatically plus an engine off / engine on entry when I started / stopped sending the messages. No manual data entry.
conachair is offline   Reply With Quote
Old 20-06-2018, 06:17   #900
Registered User
 
Schnapsy's Avatar

Join Date: Jan 2018
Location: Dunkirk, France
Boat: ETAP 30i
Posts: 243
Images: 3
Re: Logbook Konni for OpenCPN

After sending my previous message, I change the settings in O from the French language to the English language and ....

IT WORKS !

You have seen right, Peter, the problem is the settings (french vs uk).
However, the rounding is done to the second decimal (0.28 => 0.30) but it is a simulation of consumption, so it is not too important.

But how to solve this configuration problem ?
Schnapsy is offline   Reply With Quote
Reply

Tags
opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logbook Plug-in SethDart OpenCPN 113 04-06-2022 11:21
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


All times are GMT -7. The time now is 15:06.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.