stevendaniluk / MotecLogGenerator

For generating MoTeC .ld files from external log sources
Do What The F*ck You Want To Public License
21 stars 7 forks source link

GPS Lat & Lon not showing #2

Closed jLynx closed 1 year ago

jLynx commented 1 year ago

Hey, first off amazing project! I have been testing this out and for the most part its working perfect. I am having one issue though where I am not getting any laptimes showing up, which I am assuming is because of the the GPS location is not accessible inside of i2.

The conversion seems to say its working fine image but when I try and load it up, there are no GPS points showing image

I have uploaded my .csv and my .id (inside of a zip for github) joel3.csv joel3.zip

Are you able to see where I might be going wrong? I am not sure if its a conversion issue, or if its something I have messed up inside of i2.

stevendaniluk commented 1 year ago

I suspect the problem you're encountering may be due to an existing issue: #1. Basically, channels don't get written to the MoTeC log file with the correct decimal places, they get written with zero decimal places. Consequently, i2 doesn't see any valid GNSS data. At least, that's my theory.

When I convert your log and open it in i2 I do see the longitude and latitude channels there, but they show up as having zero decimal places which is effectively useless. If you open the channel editor (Ctrl + E) you can edit those channels to display as degrees and add decimal places (set to 7) then they will display properly.

image

But, it seems these are only display properties, and not for the channels themselves. I tried using the Lap Generator feature to have it detect laps, but it still gives an error about no GNSS data being detected. The feature works fine on another log I have where GNSS data shows as degrees and with 7 decimal places. I also tried creating a math channel to map the data to an appropriately configured channel just in case the Lap Generator feature could use computed channels, but it doesn't.

Sorry to say but it appears this is broken because of the prior issue. Maybe someday I'll dig into the ldparser library to resolve it. Until then, you can manually add beacons in i2 (Data --> Insert Beacon) but it's a bit annoying to do that every time.

jLynx commented 1 year ago

Screenshot_20230829_144301_Messenger You bet me to it! I just worked out that it was the 7dp issue. Also I tried with another file with better gps data and it worked perfectly splitting into laps automatically. I'm keen to give fixing it a go with automatically adding the 7dp to it as I want to make a fork of this to support the Racechrono app, so we can export logs from there and import into i2

jLynx commented 1 year ago

Also it looks like your submodule is also out of date. I haven't tested with the latest version yet, but would that possibly have a fix already?

jLynx commented 1 year ago

I have just tried the latest version and can confirm it still doesnt work. I will close this off now as its related to #1. But I will try and work on a fix for this shortly

stevendaniluk commented 1 year ago

@jLynx Something else to note is that there currently is not any functionality int he CSV parser to populate the units for a field, and I suspect this may be required in order for i2 to automatically detect what channels contain latitude and longitude data.

I think it'd be trivial to add, but I wanted to point out that this is also needed.

jLynx commented 1 year ago

@stevendaniluk the units seem to be working with me. I modified your code to extract it from my other CSV (not the one I uploaded) and it sets the units without any issues in i2

jLynx commented 1 year ago

Oh also, I just updated the name of the CSV to be the same as what is expected and it automatically picks it. So for instance rename "latatude" to "GPS Latatude" and it will automatically select it. But you still have to change dp to 7, otherwise it won't pick up the track or times etc

image