question

johnjaymack avatar image
johnjaymack asked

I have GPS information over TCP in NMEA formats.

I have a Pepwave router that outputs GPS information in NMEA standard sentences of GPRMC GPGGA GPVTG GPGSA GPGSV. In trying to use Node Red I have shown that the data is available over TCP. I have looked at the output and verified that it is correct.

Victron Energy has a GPS node but it reports: "There are no gps services available. Please check that a gps is connected or try a different node."

Since the information from the router appears to be in the correct format for NMEA 0183, is there a Node or technique to take this NMEA information and feed it to the Victron Energy GPS node? Possibly a Node to emulate a NMEA 0183 talker?

gps
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
bathnm avatar image
bathnm answered ·

@JohnJayMack If you have a look at the manual, GPS over TCP is not supported. It supports GPS over NMEA 2000 or via a USB GPS receiver. You might want to take a look at this post, but it uses UDP rather than TCP. Works well as I myself used it for a while. However a USB GPS costs very little and will just work. Anything you modify on the VenusOS to get this working will need to be re-done after any firmware upgrades.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnjaymack avatar image
johnjaymack answered ·

I am aware that I can buy a USB GPS module, connect it to the CERBO GX, which is secured deep within the vehicle, and get a GPS output if the USB GPS module can actually receive the GPS signals. I also realize that the best GPS availability comes from an external antenna with an unobstructed view of the sky.

I have looked at the documentation for the Victron GPS Node Red input module. Documentation states:

"

GPS information can be obtained with this node. For an example usage see the location based scheduling example.

Altitude (m), dbus path: /Altitude, type float
Course (Deg), dbus path: /Course, type float
Fix, dbus path: /Fix, type integer
Number of satellites, dbus path: /NrOfSatellites, type integer
Latitude (LAT), dbus path: /Position/Latitude, type float
Longitude (LNG), dbus path: /Position/Longitude, type float
Speed (m/s), dbus path: /Speed, type float"


I am not an accomplished programmer. That being said, it appears that the NMEA $GP CSV sentences are being parsed to fill in the dbus path variables.

There is a NODE RED parser module called "nmea" that accepts a TCP input such as a $GPRMC and $GPGGA and outputs as follows:

msg.payload : Object

objectsentence: "RMC"type: "nav-info"timestamp: "212705.00"status: "valid"lat: 38.76796805latPole: "N"lon: -120.61720815lonPole: "W"speedKnots: 0trackTrue: 190.3date: "130423"variation: 15.4variationPole: "E"talker_id: "GP"dateTime: "2023-04-13T21:27:05.000Z", &

msg.payload : Object

objectsentence: "GGA"type: "fix"timestamp: "212715.00"lat: 38.76796797latPole: "N"lon: -120.6172085lonPole: "W"fixType: "fix"numSat: 9horDilution: 0.8alt: 1091.3altUnit: "M"geoidalSep: -23geoidalSepUnit: "M"differentialAge: 0differentialRefStn: ""talker_id: "GP"

It appears that ALL of the information required by the Victron GPS module is contained in the two nmea sentences GPRMC and GPGGA. The disconnect is taking the information available in the NMEA sentence and writing it to the dbus path: ?variable name.

Is there a NODE RED Node available to 1) read the data stored in the variable on the dbus, and to 2) write to the same variable data? It appears that the Victron GPS node is looking at the dbus path and variables. What would be required to write information to those same variables?





2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnjaymack avatar image
johnjaymack answered ·

I have been doing some research and I believe I know what might work. Whether I can develop the programming skills is yet to be determined.

I am using Node Red modules and think that this approach might be viable.

First, the router that I have, a Pepwave, outputs a steady stream of nmea sentences at TCP 192.168.50.1:60660. Using the tcp in node, I get the sentences. I need data from two different sentences: GPRMC and GPGGA. I run the output through a switch node to split the two sentences into two paths. Then I run each message through a nema parser node. This gives me the two different message payload objects: (I have put the variable that the Victron GPS module is looking for out to the right Bold Underline.

RMC msg.payload : Object

objectsentence: "RMC"

type: "nav-info"

timestamp: "025109.00"

status: "valid"

lat: 38.7679971 Latitude (LAT)float

atPole: "N"

lon: -120.61722535 Longitude (LNG)float

lonPole: "W"

speedKnots: 0 Speed (m/s)float

trackTrue: 223 Course (Deg)float

date: "140423"

variation: 15.4

variationPole: "E"

talker_id: "GP"

dateTime: "2023-04-14T02:51:09.000Z"

and

msg.payload : Object

objectsentence: "GGA"

type: "fix" Fixinteger

timestamp: "025119.00"

lat: 38.76799702 Latitude (LAT)float

latPole: "N"

lon: -120.6172254 Longitude (LNG)float

lonPole: "W"

fixType: "fix"

numSat: 7 Number of satellitesinteger

horDilution: 1.6

alt: 1095.9 Altitude (m)float

altUnit: "M"

geoidalSep: -23

geoidalSepUnit: "M"

differentialAge: 0

differentialRefStn: ""

talker_id: "GP"

The GPS input node looks for the following:

Altitude (m)float
Dbus path: /Altitude
Course (Deg)float
Dbus path: /Course
Fixinteger
Dbus path: /Fix
Number of satellitesinteger
Dbus path: /NrOfSatellites
Latitude (LAT)float
Dbus path: /Position/Latitude
Longitude (LNG)float
Dbus path: /Position/Longitude
Speed (m/s)float
Dbus path: /Speed


Would it be possible to modify the Victron GPS module to directly accept the information parsed from the tcp nmea sentences? I could not find the Victron GPS source code, so I cannot look at it to see what might be changed. And quite honestly, I know that at this time, I would have to learn the programming language.

So to Victron, how do you go about getting the source programming to take a look at the existing code to see if it could be modified?

Thanks,


Jay


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi! I reread the thread linked to by Mbath above, and there are many good suggestions in there.

I have nothing to add to what is already there. Also perhaps best to keep the discussion there and in one place?

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnjaymack avatar image johnjaymack commented ·
@mvader Many good suggestions for a different set of issues, as far as I can tell. I will print the thread out and see what I have missed that addresses the issues that I am asking about.

The basic issue that I see is that the Victron software is set up to receive the GPS information from a NMEA0183 or NMEA 2000 talker. The NMEA information comes in via a standard sentence and is parsed and sent to certain variables. That is great, but stuck in the past. If the same information is available as a properly formatted NMEA sentence but not from a NMEA 0183 talker or NMEA 2000 talker, a change in the input module should result in accepting the information.

Is it possible to get a look at the Victron Node GPS code? That might help explain why there is resistance to processing NMEA sentences delivered by tcp instead of USB or other NMEA0183 connections. The sentences are standardized. The information is standardized.

As to moving this tread, I am not opposed, but that is not something that I would know how to do. Should I just copy and past my questions to that thread? Please let me know.

Thank you,

0 Likes 0 ·

Related Resources

Additional resources still need to be added for this topic