What is 'State of the Art' for IMU + GPS on teensy 3.x 4.x

ninja2

Well-known member
Circa 2017 I was deep in playing with the MPU9250 using a beta version of Brian Taylor's library (and Kris Winer's) and Adafruit GPS module using NeoGPS by SlashDevin . I was running these on T3.5, Mega 2560 (I could even squeeze a fully functional datalogger onto a R3 UNO using NeoGPS).

I am keen to revisit and updating to the most suitable current hardware + libraries. The recent thread New Madgewick Fusion Filter provides a lot of tempting clues but the more I look and read it's seems I've uncovered just the tip of a massive iceberg.

I'm hoping to get pointers to good/best IMU + GPS + library combinations on T3.x or T4.x, all with highest precision possible (e.g. RTK cm accuracy) given a generous budget :)

Thanks in Advance ...
 
Define a generous budget?

I spend a lot of time playing with IMUs and GPS but not in teensy/Arduino environments so I can't comment on specific libraries.

From a GPS/GNSS the ublox F9 is generally the best price/performance compromise, you can get some cheaper systems from China but in my testing the performance isn't quite there.
But this is where the definition of "generous budget" matters, you can get some far better GNSS systems. Septentrio have some very nice modules that will get you better accuracies, more systems, higher output rates than the ublox. Plus things like built in NTRIP. But you're looking at 10-20 times the price.

One thing I would say on GNSS is if you are aiming for good accuracies then you want a module specific library. You will probably want to use some of the module specific configuration commands and standard NMEA outputs don't give good enough resolution. Well they can but that's non-standard so whether the library will parse it correctly matters. Plus if you are looking to use any sort of kalman filtering then output in ECEF makes more sense than latitude/longitude.

Other considerations to keep in mind - Good accuracies need a good antenna and clear view of the sky. And you will need some form of RTK correction source, either RTCM over serial or NTRIP over a network. And not all RTCM is equal, you need to ensure it includes the formats and messages your receiver can use. e.g. using a ublox base station to a different brand receiver will often result in the other system losing RTK at random times.

In terms of inertial analog devices have some nice modules for a few hundred dollars. But again budget matters a lot. For good inertial you can easily pay multiple thousands of dollars.
 
Thanks AndyA, much good info.
However I'm really looking for input on the best combinations of libraries with IMU and GPS that have proven to work well on teensy
After reading more on RTK overnight it's dependence on a fixed base station probably rules it out for my mobile platform.
Hopefully there are solutions using SBAS or DGPS.
As for my 'generous budget' ... ot unlimited = 100's not 1000's:)
 
Last edited:
After reading more on RTK overnight it's dependence on a fixed base station probably rules it out for my mobile platform.
Hopefully there are solutions using SBAS or DGPS.

Any modern GNSS will include SBAS however that is only for GPS so you often have the choice of GPS+SBAS or GPS+GLONASS+Galileo+Beidou.
If you have a good clear view of the sky GPS+SBAS will be best, if your view of the sky will be partly obscured (trees, tall buildings, non-ideal antenna placement) then the extra satellites may be better, the best case position isn't quite as good but the solution will be more robust.

If you have a network connection then there are NTRIP services available which can give you national or global RTK coverage. You send them your location (normally NMEA GGA once every 1-10 seconds) and they either send you the data for the closest base station or calculate the values for a virtual base at your exact location. These network RTK solutions are available just about everywhere, most RTK GNSS providers have a service to supply this for a subscription and in some areas the national/state government makes them available for free.
Google is your friend here, throw network RTK or RTK corrections service and your location in and you'll get lots of options.

If you do use an RTK service rather than your own base then be aware of which datum is used. e.g. in europe most network RTK systems will use ETRF (European terrestrial reference frame) , stand alone GPS defaults to WGS84. The two are about 50cm different due to a few decades of continental drift. This isn't normally an issue, it's in the measurement error of non-RTK GNSS, but can cause lots of confusion if you notice the change in location and don't know why you're now getting a different location for the same point.
 
A good IMU+GPS integration could be found on the Ardupilot project. It is mainly based on STM32 hardware.

In the Plane sub-project, centripetal forces are taken in account. Depending on your application, you should use it.

Angelo
 
Unfortunately I've learnt SBAS rollout won't be completed here in Australia until 2026 !
 
Unfortunately I've learnt SBAS rollout won't be completed here in Australia until 2026 !
LOL! I worked on a military guidance and control application some years ago where our results with UBlox systems were very good at our test site in Arizona. I kept telling the management to adjust their expectations if the system was used outside the continental USA. The answer was usually something like "We'll worry about that if we get next-stage funding." That translated to "the unit cost and key distribution issues for military-grade GPS units won't fit in our budget."
 
Going by this site
https://www.ga.gov.au/scientific-to...ational-positioning-infrastructure-capability you should be able to get RTK corrections over NTRIP for free. That will however require an internet connection of some sort. The bandwidth requirements are tiny so if you're paying for data used then it won't be much but it does need a connection.
That looks quite promising ... 3cm accuracy would do nicely. Thanks AndyA.
Now I just nedd to work out best way to get mobile internet ..
 
OK, I've found a good mobile internet solution. Now I'm looking at the Sparkfun GPS-RTK-Kit (with u-blox's ZED-F9P) and pondering the details for setting up RTCM over NTRIP.

According to Google Gemini (yes, it's AI :)) NTRIP uses a client-server model where the client is a phone or a computer.
My design concept has the mobile internet connected to my phone by WiFi, and Bluetooth (or another WFi?) to my T4.1, hardwired to the Sparkfun GPS-RTK device.

Is this viable?
TIA
 
Last edited:
OK, I've found a good mobile internet solution. Now I'm looking at the Sparkfun GPS-RTK-Kit (with u-blox's ZED-F9P) and pondering the details for setting up RTCM over NTRIP.

According to Google Gemini (yes, it's AI :)) NTRIP uses a client-server model where the client is a phone or a computer.
My design concept has the mobile internet connected to my phone by WiFi, and Bluetooth (or another WFi?) to my T4.1, hardwired to the Sparkfun GPS-RTK device.

Is this viable?
TIA
I would say yes. You can take a look at Sparkfun library examples for the f9p: https://github.com/sparkfun/SparkFun_u-blox_GNSS_v3/tree/main/examples/ZED-F9P which should give you an idea.

Or take a look at this: https://community.gpswebshop.com/20...ss-receiver-for-android-a-step-by-step-guide/
 
After further reading, and experimenting with my new NTRIP provider account / service, I've realised I can probably do without separate mobile internet hardware, instead just run the NTRIP client on my phone which has internet via 4G (still waiting for 5G in some areas around here) (as AndyA said "The bandwidth requirements are tiny" so this should be fine)

I'm looking at the Sparkfun Micromod ZED-F9P module fitted with the SparkFun MicroMod Teensy Processor . I haven't looked closely but I'm (maybe naively) assuming Sparkfun's teensy is (almost) equivalent to PJRC's T4.1? (it uses the MIMXRT1062 chip, with same bootloader and flash chips)
to add BT
... and I really hope PJRC get's a cut for the Sparkfun teensy clone! (I have purchased two PJRC T4.1 already)

hmmm ... just dawned on me: I've still got to add bluetooth somehow? Back to the drawing board ....
 
... and I really hope PJRC get's a cut for the Sparkfun teensy clone! (I have purchased two PJRC T4.1 already)
The other chip on the board next to the IMXRT is PJRC's T4.x "bootloader" (which isn't strictly a bootloader at all). It's only available from PJRC so they do earn something from the micromods.
 
I had no luck with bluetooth in the USBHost_t36 library because even though it checks for supported features, it always issues LE commands regardless during initialization which fail on hosts that don't support it.
 
Back
Top