jugglingcats / tachograph-reader

Read driver and vehicle card data and convert to a more usable XML format
81 stars 62 forks source link

Decoding GeoCoordinates #50

Closed patientzerouk closed 4 years ago

patientzerouk commented 5 years ago

I'm in the process of implementing GEN2 support, and so far so good - I can read everything correct with one issue. I'm struggling to work out how the GeoCoordinates actually work - I'm testing my implementation against a known good source and can't get close to their values at all.

The required part is below,

image

I know I'm reading in the correct bytes, and I can even calculate the Latitude but the longitude is completely throwing me.

I'm sure I'm missing something simple, and wondered if anyone could provide some guidance on where to look / what to do.

What throwing me is that it appears we only need to read 3 bytes for the latitude and longitude. For the latitude this makes sense, but the same logic fails completely for longitude. I'd love to share my data - but since it gives my position, I'd rather do that by email.

Thanks

jugglingcats commented 5 years ago

I'd like to help ... feel free to send to redacted

patientzerouk commented 5 years ago

@jugglingcats message sent - I think I have a working solution at the moment but have sent my info anyway to see if you agree with my assumptions.

patientzerouk commented 4 years ago

I have a working solution, will be finishing up gen2 support soon.

andreasringdal commented 4 years ago

Does the solution include certificate verification?

jugglingcats commented 4 years ago

@andreasringdal yes, see the readme on how to enable it

patientzerouk commented 4 years ago

Does the solution include certificate verification?

For GEN2, no because i dont need or use it. For GEN1 yes it does.

andreasringdal commented 4 years ago

I was replying to the wrong issue.. Had trouble figuring out this one myself. the 3 extra bytes are the odometer at the current time

Ended up finding the result on an google image search. The Eu documentation is useless with most of the relevant info for developers hidden in tables as images. https://www.google.com/search?sxsrf=ACYBGNSQrlMPJwR6rGlZ4fuiljIiJm6MvA:1573565984345&q=GNSSPlaceRecord+geocoordinates&tbm=isch&source=univ&sxsrf=ACYBGNSQrlMPJwR6rGlZ4fuiljIiJm6MvA:1573565984345&sa=X&ved=2ahUKEwix6JuM5uTlAhXRxIsKHRN3AHIQsAR6BAgJEAE&biw=1024&bih=977#imgrc=q28xqcnIIbhztM:

davispuh commented 4 years ago

I have a working solution, will be finishing up gen2 support soon.

I hope you'll send a PR, because many people including me will be interested in it.

patientzerouk commented 4 years ago

I have a working solution, will be finishing up gen2 support soon.

I hope you'll send a PR, because many people including me will be interested in it.

That is the plan, but need to finish it and i'm fairly busy this week. Will get it done as soon as I can and submit a PR. I've added some helper regions, and made a few modifications to other stuff but need to clean it up to support gen1 and gen2 in the same library.

patientzerouk commented 4 years ago

I was replying to the wrong issue.. Had trouble figuring out this one myself. the 3 extra bytes are the odometer at the current time

Ended up finding the result on an google image search. The Eu documentation is useless with most of the relevant info for developers hidden in tables as images.

I have the reference docs, and agree they are absolutely useless. Its taken quite some time to decode some of their changes. The issue above is that co-ordinates are stored in two values, each signed integers stored as 3 bytes.

Took me a while to wrap my head around the utterly useless documentation.

ghost commented 4 years ago

I have a working solution, will be finishing up gen2 support soon.

I hope you'll send a PR, because many people including me will be interested in it.

That is the plan, but need to finish it and i'm fairly busy this week. Will get it done as soon as I can and submit a PR. I've added some helper regions, and made a few modifications to other stuff but need to clean it up to support gen1 and gen2 in the same library.

Any news for the PR ? I am very interested in GEN2 support.

patientzerouk commented 4 years ago

Work has been hectic, but will get a chance to finish up in the next week.