I am in search of advice on usage of GPS Yaw for a non drone application
I am contemplating the usage of CUAV RTK 2HP heading module for an application other than drones.
I am currently developing a product which needs to measure accurate heading ( w.r.t true north and not magnetic north) of objects which are 2km - 2.5 km away from me. The device i am developing measures latitude and longitude of features i point it at. A monocular scope is provided on the device which is aligned with the compass axis.
Since one degree of heading error translates into a horizontal error of almost 43 meters at a distance of 2.5 km, I require very high accuracy and repeatability for heading readings in my application. I am illustrating my use case by the following example
Example:- From my terrace, if i see a building at a distance of 1 km ( distance is measured with a separate laser rangefinder) i point my device at the building ( by locating the building through the monocular scope) to measure the accurate heading to it ( lets say 240 deg bearing from true north). Once i get this bearing , It is passed to my single board computer which calculates the latitude and longitude of the building using the distance reading from my range finder and a mathematical formula similar to Haversine’s formula . This latitude and longitude would be grossly incorrect if my heading reading was inaccurate. Even 1 deg error in the heading measurement will cause the lat long to be far away from the building I was pointing at. I made this device and got it working too but i realized that the compass errors are too much for it to work with any usable accuracy. as of now the latitude and longitude calculated by my device is almost 80 to 100 m away from the actual feature / building i pointed at.
That is why i need a robust heading measurement device
The CUAV C-RTK 2HP unit will be mounted with antennas perfectly aligned with a monocular scope (y off-set zero) so that whatever is captured by the cross hairs of the monocular scope would be what the compass is pointing at. With a standard digital compass such as IST8310, i was getting inconsistent errors . Even while looking at the readings of the magnetic compass I am using, I can see that the range of fluctuation of the values is 1 deg and sometimes even 2 deg( consistent errors are also acceptable since the code can have a fixed correction )
I believe that there are many expert in this forum who have tested and tried GPS for yaw or may even have tested the CUAV dual antenna unit I am referring to.
Can anyone tell me if the accuracy of moving baseline yaw would be good for an application like this?
Does the yaw measurements output by the device fluctuate a lot like the output of magnetic compasses ( like more than 1 deg)?
Can it be used with any flight controller which supports DroneCAN? I am using a Pixhawk 2.4.8 with AC version 4.5.4
My product can accommodate placement of the two antennas at a distance of 30 to 40 cm and not more than that.
Any guidance in this regard would be very helpful to me as I am stuck in a tight spot in my product development
The C-RTK 2HP is based on the UM982. The specs for the receiver says it has a 0.1 degree heading accuracy for a 1 m baseline (1 m between both antennas).
I couldn’t find a graph showing the heading accuracy as a function of the baseline, but the u-blox F9P has such a graph. The accuracy is inversely proportional to the baseline. For the F9P, at 1m, it has an accuracy of 0.4 degrees, and at 0.4m it’s around 0.6 degrees. Maybe that can give you an idea of the expected accuracy for the UM982.
I don’t have that receiver model, so I couldn’t confirm it’s behaviour.
Thanks for the inputs. Is it safe to assume that the inverse proportionality is linear. I definitely won’t be able to place the antennas at 1M distance. May be .5 m . That would probably make the accuracy of heading to 0.2 deg.
My real worry is would the readings be stable or would they be fluctuating randomly. The issue with random fluctuations is that every alternate reading would be different.
I can’t give you an answer for the IM982, but when I used two F9P for yaw, with a 0.6m baseline, here are the fluctuations over 10 minutes (without moving the antennas):
.
So maybe you can expect something similar. Mind you, this log was taken outdoors under a clear sky, with a full 360 view of the sky (so under ideal conditions). If you plan to setup under a tree or near a building, results may vary.
However, the flight controller will use its gyro to help estimate yaw. It will eliminate the high frequency noise, but unfortunately can’t do much about the low frequency fluctuations (the EKF yaw estimation is in blue):
In this case, no magnetometers were contributing to the yaw estimation. The EKF was only using the GPS and the gyros.
However, the sensors in the Pixhawk 2.4.8 are outdated, you can find good cheap flight controllers with better sensors (ICM42688), like the F4, F7 and H7 flight controllers from Mateksys.
You might also like to look into using an RM3100 magnetometer. Mateksys also has this sensor. The following figure shows magnetometer values logged by a different drone, over 3ish minutes while stationary on the ground. In blue/green, those are the outputs for the RM3100, and orange/yellow are from the internal compass of a CubeOrange+ (ICM20948):
But no matter the choice you make, if you want to avoid high frequency twitching of your scope, due to high frequency noise is your yaw estimation, then a better gyro is necessary. If you want to avoid slow fluctuations, I don’t know if you’ll manage that with a dual antenna GPS.
That was a very very very useful input. Infact those graphs are really awesome and was exactly what I wanted to see.
I see that a good compass like RM3100 also gives pretty stable ( and reasonably low noise) data . Yes the gyros on my pixhawk 2.4.8 may be poor quality ( even worse since I’m using a clone ) . So my approach would be like this to solve my compass inaccuracies problem
First set up a good compass ( such as RM3100 ) along with a good flight controller such as a cube orange ( something which has a reliable gyro ) and use the ekf estimate for yaw. I will disable the internal compasses of the FC in this case.
I believe the ‘hdng’ provided by Globa_position_int_message is the EKF output. Check if this set up improves my compass accuracy
If that doesn’t work out
I get a dual antenna CUAV unit (or in case I am unable to ascertain if the chipset is having comparable performance to that of a Zed F9P I may even find a good zf9p RTK module from holybro and use two of them for moving base ) the fluctuations are much less than half a degree in the graphs which is much much better than what I am seeing now . In this case too I would use a better FC for better gyro inputs . I would definitely disable use of compass in yaw calculation in this case . My application would be deployed with perfect visibility of the sky and also it does not move . It is placed at one location to measure geo coordinate of distant buildings and features. So it may have a comparable performance as was in your graph. Or atleast I can hope so.
The above order of choice is due to budget considerations, else I would have chosen the moving base ahead of the better compass config since the moving base would also take out magnetic interferes/ EMI out of the equation
I can’t thank you enough for the pointers.
Absolutely grateful
Hi i have a quick doubt about something you mentioned in this reply. It says that the EKF was only using the gyros and the gps and not magnetometers. Is there a choice to choose what sensors the ekf would use ? After our discussions i went ahead and bought an RM3100 . The readings were pretty stable but the effect of large ferrous structures were little more than i would want. Even my presence with a cell phone close to the compass was creating a lot of undesirable fluctuations.
So i went ahead and bought two ardusimple rtk2b boards and set up moving baseline. With good rtk fix the yaw reading is not affected by any external factors like magnetic fields or ferrous structures ( as expected ) . I disabled the internal compasses of my clobe pixhawk2.4.8 ( yes im still stuck with that one, didnt buy a new one) . I am using ekf3 . And i find more than one degree fluctuations in the readings. Its more like a low frequency drift in values . I see fast fluctuations when i select gps2 yaw valves on the mission planner flight data quick view . ( i have a 76 cm baseline)
Would this be because of the shitty gyros and magnetometers in the pixhawk ? Or would it be any other attribute. ( im seeing almost 32 sats and rtk fix on gps2)
I was expecting much lesser fluctuations. Kind of stuck in figuring out what to try next ? Inwanted to see the raw gps yaw values without sensor fusion but no clear idea how to visualise that
Can you post a link to your AP parameters? I want to check if you properly set the EKF to use the GPS yaw and not the compass yaw.
Which yaw readings fluctuate?
We had bad experience with open-air F9P modules like the Sparkfun boards. Turns out GPS receivers are affected by EM interference, but also by airflow flowing across the receiver (u-blox Portal). Which is why F9P modules like the Holybro F9P or CUAV 9Ps worked better for us. You should ideally 3D print a housing for your rtk2b boards, and maybe line the inside or outside with aluminium or EM tape. It might improve the boards positioning, and therefore yaw estimate.
Okay. I’ll post a link in a couple of days. Stepped out for a vacation with family.
I’ll definitely consider printing a box. That was anyways the plan but I got a bit lazy to design and print one and a bit eager to see if the whole set up works
Yes it’s prone to EMI more than I thought. The telemetry radio signals could significantly reduce sat count and not allow RTK fix when the antenna wires were too close.
The Patch antenna I bought from the ardusimple guys has a pretty long cable ( 5M) and I have coiled it in a big loop . Probably that could also be an issue ?
The Gps2_yaw is not affected by the gyros. By looking at the yaw outputted by the EKF (in the XKF log structure), you would have a better idea if the gyro helps the yaw estimation or not.
I don’t know if 5 m long antenna cables in coils can affect your reading, I’ve only used 10 - 80 cm cables.
I’ve found an old log where I used 2 F9P GPS to estimate yaw.
Both figures show 9-10 minute moments where the GPS were stationary. As you can see, the GPS yaw jitters a lot, but the gyro can smooth the data. However, there is a very low frequency wandering.
I was using a 65 cm baseline and the compass was deactivated due to ferrous materials nearby. I was using CUAV 9Ps modules.