-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage uNavINS with another GPS module #20
Comments
Unfortunately, I have limited familiarity with NMEA. Most of my work is with uBlox receivers over the UBX protocol, currently I use the SAM-M8 and ZED-F9P most frequently. |
Ughh what a pity... |
For TOW, that's doing two things:
TOW is millisecond accuracy. More current versions of the EKF use a constant for setting the time period for integration and leave it up to the programmer to appropriately call the measurement update. |
What type of number does this function |
It's a double in units of seconds. |
Thank you very much for your answers. |
Sorry again @flybrianfly.
scares me more. and I found the same one in the Do you think it is possible to replace the values of the velocity vectors obtained from the
have specific data? |
Regarding time, you can just supply your own time source (i.e. from the microcontoller). Really, it just needs to know that the GPS data was updated and what the time interval is for integrating the gyro and accel measurements during the TimeUpdate portion of the EKF. The velocity will be tough if you don't have vertical velocity available. You can try using just the north and east velocity to see how that does, but without sitting down to re-work the EKF implementation, I'm not sure how good the results would be. I suspect probably not good. The current library is located here: There's some helper functions along with the 15 state EKF. The EKF is not well documented, but the basic use is to call: With vectors of accel, gyro, mag, NED velocity, and lat / lon / alt data when you have a good GNSS solution and new data for everything. This initializes the EKF and only should be called once. The time update is called with: void TimeUpdate(const Eigen::Vector3f &accel, const Eigen::Vector3f &gyro, This should be run whenever you have new accel and gyro data. Note that it takes a constant time delta (in seconds) for the integration. The measurement update is called with: void MeasurementUpdate(const Eigen::Vector3f &ned_vel, When you have new GNSS based NED velocity and lat / lon / alt data. |
Thank you @flybrianfly, your answers clarify a lot for me! But when I connect the output from the module Or, even in the serial port, should I see readable But either the But even with a speed of
Based on the time, I realized that I will most likely use the microcontroller time. |
UBX looks like garbage over the serial port, it's binary, not human readable. Try an old version of this library for parsing the packet. At some point uBlox made a breaking change to the UBX-NAV-PVT packet, which this library uses. You could also try SparkFun's ublox library: Their library works pretty well - it just wasn't available when I made this one. |
Unfortunately, the
I played with speed, but all in vain ... probably need to configure the The code works surprisingly quickly, parsing every 100 milliseconds, according to
I'll leave the code here, maybe it will be useful for someone.
Next, I need to start obtaining similar data using the
Once per second or more often? |
Any rate between 1 Hz and 10 Hz should be fine. |
Unfortunately, I still can’t get stable data output from the module.
As a result, I received a similar error that I received when building the
A stalemate, the way out of which would probably be to purchase a new |
elapsedMillis is a Teensy library. It's header only and available from here: I've seen some other ports of that code as well. Should be easy to incorporate. I'm only using it for timing in the Begin method to say whether communication has been established with the GPS receiver. It's not critical and could be removed. SPAARO is full-blown UAS flight controller software. The EKF / INS is in this library: I only cite SPAARO as showing an example of how to call the EKF. Right, I require UBX-NAV-PVT as one of my packets. You might need to use some other library or your own parser to get around that requirement by using other packets available from the receiver. I typically run the GNSS parser in the loop and the INS in an interrupt context tied to the IMU data ready interrupt. You need a large enough buffer for the serial port to handle delays of not being able to continuously parse the GPS data. It works really well, but requires understanding of interrupt context and being able to tune an EKF. I use the EKF in commercial products and happily implement and tune it for paying customers. But it's difficult to make accessible to the masses without a good autotuner that would take into account different sensors, vehicle dynamics, and operating environments. Ultimately, the naive implementation that I used for uNavINS was not adequate at autotuning, was beyond the complexity of most Arduino libraries, and would be hard to support through open-source (i.e. free) methods. It really would require a robust, automated process to tune the EKF to work effectively. |
I have never worked with Added the library to the code and problem disappear.
The latest version of ublox
I don’t think that your works will ever be compiled on |
It seems to me that the most optimal thing would be not to create a full-fledged, structured library and write complete documentation for the code.
Personally, I was happy to support your project with any donations. |
Navigation is an Arduino library, which contains the EKF among other related functions and transformations. I do agree the EKF needs better documentation. uNavINS was a fundamentally flawed approach that didn't take into account the process error. The EKF in the Navigation library is the more correct approach, but it requires manual tuning. SPAARO is not abandoned, it's used by many businesses and Universities to conduct research. It's open-source so they can build on the baseline code. We sell hardware that works with SPAARO out of the box and it may be modified into an Arduino compatible library at some point, currently the build tooling revolves around CMake, and I welcome contributions. |
Good day @flybrianfly
Thank you so much for your work!
I would like to use the
uNavINS
library code, but I see that for it to work you need aNEO
GPS module with theuBlox
protocol.I can get it more accurately, but the TOW -
Gnss.gps_tow_s()
parameter confuses me.https://github.com/FlyTheThings/uNavINS/blob/ed2d0c56a9099f66a5fe93d4d87da317f7f61b0f/uNavINS.h#L89C31-L89C34
I think that I can get other parameters using the NMEA protocol.
As far as I know, this is some specific time format of
uBlox
modules.Could you help with advice for the
NMEA
protocol?I plan to use
GPS
moduleGN02D
.The text was updated successfully, but these errors were encountered: