CarletonURocketry / fetcher

A QNX process for fetching data from sensors over I2C.
https://carletonurocketry.github.io/fetcher/
GNU General Public License v3.0
1 stars 0 forks source link

Sensor interface for GPS #8

Closed linguini1 closed 3 weeks ago

linguini1 commented 7 months ago

The following I2C GPS sensor needs to have a sensor interface implemented for it: https://content.u-blox.com/sites/default/files/u-blox-M10-SPG-5.10_InterfaceDescription_UBX-21035062.pdf

You can find more details about how the avionics hardware team implemented it here (including address).

AngusJull commented 3 months ago

Found this integration manual in case it's useful for working on this: https://content.u-blox.com/sites/default/files/MAX-M10S_IntegrationManual_UBX-20053088.pdf

AngusJull commented 3 months ago

Datasheet can be found here: https://content.u-blox.com/sites/default/files/MAX-M10S_DataSheet_UBX-20035208.pdf

AngusJull commented 3 months ago

Made a list of everything (besides the I2C section) in the integration manual I posted that might be important for us to take into consideration. I'll put that in the wiki soon, but for now I'll join the cause of trying to get this thing to read properly

AngusJull commented 3 months ago

From what I said on DC: "I think what we should be able to do is first address and read the first two registers in one send/recv operation, then do a recv operation to read all the data in the buffer Then from there getting that data into the UBX format and decoding it should be simple"

I believe that we can use the random access mode to get the size of the data buffer and then we can use the continuous access mode to read the data buffer (or random access it as well). I think in their example, they are making an implicit use of the continuous mode in their random access example, which overcomplicates things.

In case that helps a lil with what we're writing right now

linguini1 commented 3 months ago

Sample code: https://github.com/cturvey/RandomNinjaChef/blob/main/STM32_uBlox_I2C.c

AngusJull commented 3 weeks ago

The GPS interface needs to be improved (is currently limited to only 100kHz on the I2C bus), but does seem to work