How to calculate gps accuracy in meters from nmea sentence information

If you provide the HDOP as an accuracy in meters as you stated in your comments, you are providing a completely false fantasy value.

As an alternative answer that is related to the actual question, I just wanted to provide a relevant link to the GIS Stackexchange site where this question has also been asked: https://gis.stackexchange.com/questions/97774/how-can-i-convert-horizontal-dilution-of-position-to-a-radius-of-68-confidence

In short: it is not trivial, and the HDOP alone is not sufficient for a reliable accuracy. As user30184 commented, some simply use e.g. 3-5 m as the accuracy of the device and then multiply it with HDOP to get an accuracy.

But in general, let me quote claudegps from this also provided link:

You can't. DOP is not an indicator of "error" or "accuracy". Bad DOP does not always mean bad accuracy for example. Moreover the "accuracy" should not consider only DOP: Imagine to be indoor (very low signal, a lot of multipath ecc) but with a good DOP: you may have a very bad accuracy even with a good DOP... So your indication DOP-based will be wrong. Unfortunately, if you have only NMEA sentences, you usually don't have enough data to estimate the accuracy (that can be done internally to the receiver as it have much more informations inside).

You may also have a look at this link: https://www.gps-forums.com/threads/estimating-accuracy-from-raw-nmea-data.46273/ And last but not least, from this link:

6 sources of error (and additional factors) affect the accuracy of GPS positions


may this can help: https://gis.stackexchange.com/questions/3414/how-correct-is-the-accuracy-value-given-by-gps-devices

and based on http://www.gpsinformation.org/dale/nmea.htm GPGGA contain Horizontal Dilution of Precision (HDOP) and more sattelite locked you will get better accuracy