PDA

View Full Version : Discussion Gps Nmea


David_Naseef
May 05, 2008, 08:42 AM
Hi
Does anybody know if I can extract rate of climb or vertical velocity from the NMEA sentences?

Dave

Peter Seddon
May 05, 2008, 10:14 AM
You can extract position and altitude so can derive climb rate by calculation.

regards Peter
ps Altitude is not always very accurate and the rate of update of all data is typically 1sec so that may or may not limit what you can do

David_Naseef
May 05, 2008, 11:03 AM
So it is not calculated internally.

I think that garmin spits it out in one of its sentences?

dmgoedde
May 05, 2008, 11:44 AM
I've seen GPS altitude lag reality by up to 10 seconds, being 40 or 50 meters low until it catches up. For rapid changes in altitude I think GPS will be useless, but in a steady climb over 10+ seconds you may be in luck.

What is the intended use for the data? Are you hoping to control the elevator of a small R/C aircraft this way? If the answer is yes, then I can tell you it won't work. A barometer would be better suited, but even then for a small RC plane the barometer is too slow to be used in a stabilization routine.

David_Naseef
May 05, 2008, 12:47 PM
I just want to calculate my rate of climb. Do you think that simple averaging of altitude will give me a good measure?

Unterhausen
May 05, 2008, 02:30 PM
I just want to calculate my rate of climb. Do you think that simple averaging of altitude will give me a good measure?
at one point I posted a link to a paper where the only sensors on a uav were two gps, one on a wingtip. I think my post got deleted though. The authors seemed to think that their method worked. If they can tell bank angle, you should be able to tell altitude, but I'm making some broad assumptions.

AntonK
May 05, 2008, 02:51 PM
Paparazzi only uses GPS for altitude, and we havent had a problem with Altitude holds, climbs, descents. We also havent seen this lag the dmgoedde speaks of. Of course for comparison paparazzi uses a Ublox receiver in aircraft mode with UBX protocol, not NMEA.

Anton

David_Naseef
May 05, 2008, 03:19 PM
Antonk,

Is there any vertical speed data you can extract from ublox gps?

AntonK
May 05, 2008, 09:04 PM
yes, as calculated by the receiver itself.

dmgoedde
May 05, 2008, 10:43 PM
Paparazzi only uses GPS for altitude, and we havent had a problem with Altitude holds, climbs, descents. We also havent seen this lag the dmgoedde speaks of. Of course for comparison paparazzi uses a Ublox receiver in aircraft mode with UBX protocol, not NMEA.

Anton
Thanks for the info, I learn something everyday.

David_Naseef
May 05, 2008, 10:55 PM
Antonk,

Which GPxxx sentence contains vertical speed in it?

Dave

DrDon
May 06, 2008, 08:14 AM
If you are using UBLOX GPSs, according to their spec there is no direct output of vertical velocity in the ASCII NMEA messages. The closest thing to use would be the MSL altitude and calculate the time rate of change.

With a little programming, the UBX protocols provide much more information and are easier to parse than the ASCII strings. They provide northing, easting, and downward velocity in (m/s) all in a 36 byte NAV-VELNED binary message.

I have a few GPS modules I have constructed for our testing and some sample code if anyone would be interested.

DrDon
http://www.iat-llc.com

AntonK
May 06, 2008, 10:31 AM
ya, what DrDon said :)

dmgoedde
May 06, 2008, 12:44 PM
Paparazzi only uses GPS for altitude, and we havent had a problem with Altitude holds, climbs, descents. We also havent seen this lag the dmgoedde speaks of. Of course for comparison paparazzi uses a Ublox receiver in aircraft mode with UBX protocol, not NMEA.

Anton
Well, without a barometer then you have no reference to know if there is lag or not. The lag is small, and I didn't realize there was a lag until I integrated a very sensitive barometer into the AttoPilot. I might have exaggerated the lag previously, but it is there, and I can't imagine how the UBLOX 4Hz GPS with a specific data protocol is somehow immune to lag in the altitude solution. For reference, Atto uses a 5Hz GPS at data rate of 38,400 buad so I also can't imagine a lag due to time it takes to report data.

See attachment for the lag I am talking about. Not huge always, but very real.

Dean

AntonK
May 06, 2008, 02:49 PM
My personal opinion is that the lag is due to the Kalman Filter inside the GPS. The filters make certain assumptions based on the configuration. This is why on the Ublox you have the ability to set Foot,Car,Aircraft modes. The receiver will tune its filter accordingly. In Car mode it doesnt expect a lot of change in altitude, therefore it takes this as an assumption for the filter. Not all receivers are the same, and they dont simply spit out data. There is a lot of complex math going on in the background to make the solution accurately.

Anton

DrDon
May 06, 2008, 03:19 PM
I agree with AntonK. We have observed major differences in altitude accuracy/lag depending on which navigation model you use (Automotive vs 4G Aircraft). This can be set using the uCenter software if using UBLOX GPSs.

DrDon

dmgoedde
May 06, 2008, 05:31 PM
Thanks Anton.

AntonK
May 06, 2008, 07:48 PM
No problem. I think its why a couple of well known AP companies use the Ublox receiver. *cough* Piccolo *cough*

Jack Crossfire
May 06, 2008, 08:40 PM
Climb rate from code phase GPS has always been a matter of luck. Sometimes the waypoints, satellites & weather line up. Sometimes they don't. A 20Hz $1000 carrier phase GPS is what U need for climb rate. Carrier phase GPS has millions more samples to average than the code phase GPS. By 2015, they'll be $50 & small enough to put in a cell phone.

dmgoedde
May 06, 2008, 11:53 PM
I agree with AntonK. We have observed major differences in altitude accuracy/lag depending on which navigation model you use (Automotive vs 4G Aircraft). This can be set using the uCenter software if using UBLOX GPSs.

DrDon
Actually, I'm not so worried about reliability of the altitude data from GPS, because I have been using a solution like Zik mentioned recently, in which barometric altitude is the king, but it is continually cross-calibrated against GPS altitude as an absolute reference, as a Kalman filter.

Instead, I am more worried about being stuck with a GPS receiver that thinks it is in a car or on a hiker, and no way to set the mode to aircraft, like the UBX protocol allows.

AntonK
May 07, 2008, 11:23 AM
dmgoedde,
I think the aircraft mode is seperated from using the UBX protocol. Meaning if you used a Ublox receiver, you could both set it to send out NMEA sentences(if thats what you use) and be in aircraft mode. An option if you are thinking your receiver is lacking, but based on your flight results you seem to be getting good data.

Anton