RMC Latitude / Longitude won't work

Hello everyone,

I am using Grafana 9 with Influxdb2 and would like to use the Geomap panel. The problem is it won’t work…

I took Latitude / Longitude direct from an InfluxDB where I save Latitude / Longitude direct from a nmea rmc string. No problems till now…

So… I take the geomap plugin using the data layer change setting to markers and location to coords assigning the database values to the lat / long fields… and noting…

Through an error, i assigned the Longitude field also to the Latitude field of my database and now points a on the map… I am ending up somewhere in Kazakhstan with 48.5019191…

If i change the Longitude field back to my Longitude data 11.96294873 the markers disappears …

So where is my error ?

Welcome :laughing: world traveler!

Please post sample data as csv

Location, long, lat
Kazu,46.7, 32.3

Etc

Hm? Sorry don’t get your point. Example data are in my first post as CSV it would just look like this…

48.5019191,11.96294873

Database Query is fine I get all data for example as Time series graph

I dont see any csv in your first post. but found some here no worries
https://orolia.com/manuals/VSP/Content/NC_and_SS/Com/Topics/APPENDIX/NMEA_RMCmess.htm

rmc,fix,status,lon,long_direction,lat,lat_direction,trackangle,date,nfn1,nfn2,mode,checksum
$GPRMC,123519,A,4807.038,N,01131.000,E,0.022,269.131,230394,,,A,C*6A

ok fine but that didn’t solve my problem. I am not saving the full nmea string to my db.

So the original question is still the same, why are my Coordinates not working as marker?

If I put the exact same data in the Mapview the map is correct centered to these coordinates

that wasn’t a solution I was providing. that was FYI that when you ask question since we do not have access to your influxdb, it is good to provide something to work with that we can emulate your data in our influxdb

Just hold your pants as I test locally

Ok sorry this shouldn’t be offense

thanks

no offense taken. when you provide accurate useable data it is easier to solve it

from(bucket: "rmea")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "rmea")
  |> filter(fn: (r) => r["_field"] == "lat" or r["_field"] == "lon")
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
  |> group()  
  |> drop(columns: ["_start", "_stop", "_time","_measurement"])

genaue verwertbare Daten = einfach zu lösen (google translate :joy: )

Ok, it’s Official I am to stupid for it…

This is the time serie graph i get with the follwoing Query

from(bucket: "smart")
  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)
  |> filter(fn: (r) =>
    r._measurement == "test" and
    r._field == "gpslon" or
    r._field == "gpslat"
  )

I adjusted your Query

from(bucket: "smart")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "test")
  |> filter(fn: (r) => r["_field"] == "gpslat" or r["_field"] == "gpslon")
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
  |> group()  
  |> drop(columns: ["_start", "_stop", "_time","_measurement"])

In the “table” are other information’s as well, for example 111 which is the identifier of the gps device or the unix timestamp when the data was collected for example 1657321295 columns name is gpstime. I not even have a clue why the 111 is suddenly appearing ?

I am aware of that the uic field has to be change to gpstime but how?

So your original post was about geomap right?

Has it now changed to time series? I am confused

No no you are right … my problem is with geomap. It was just to demonstrate my problem, and I am thinking if the Query works with time series the same query has to work with geomap as well? Just by telling geomap gpslon / gpslat are the coordinate fields ?! But look like grafana / influx db has a diffrent logic?

It could work woth both. But we still do not know exactly what your data looks like.

My telepathic skills have deteriorated during the lockdown

Ok here a 1 min export with some anonymsations :smiley:

1 Like

So in your timeseries, what data point do you want to plot?

there are all these other data points

image