Clarification about GNSS location hint fields

Hello, 

We are trying to use the nrf91 GNSS with the `nrf_modem_gnss` library. I'm looking for clarification on these fields that are listed in `struct nrf_modem_gnss_agps_data_location`, as the comments about the "coded number K" are a little unclear:

 773     /** Uncertainty, semi-major. Range 0...127 or 255 for missing latitude and longitude.                                                                                                                                     
   774      *  The uncertainty (in meters) is mapped from the coded number K with following formula:                                                                                                                                 
   775      *  r = C * ((1 + x)^K - 1), where C = 10 and x = 0,1. Range of r (in kilometers) 0...1800.                                                                                                                               
   776      *                                                                                                                                                                                                                        
   777      * @note Value 255 is only supported by modem firmware v1.3.0 or later.                                                                                                                                                   
   778      */                                                                                                                                                                                                                       
   779     uint8_t unc_semimajor;                                                                                                                                                                                                    
   780                                                                                                                                                                                                                               
   781     /** Uncertainty, semi-minor. Range 0...127 or 255 for missing latitude and longitude.                                                                                                                                     
   782      *  The uncertainty (in meters) is mapped from the coded number K with following formula:                                                                                                                                 
   783      *  r = C * ((1 + x)^K - 1), where C = 10 and x = 0,1. Range of r (in kilometers) 0...1800.                                                                                                                               
   784      *                                                                                                                                                                                                                        
   785      * @note Value 255 is only supported by modem firmware v1.3.0 or later.                                                                                                                                                   
   786      */                                                                                                                                                                                                                       
   787     uint8_t unc_semiminor;                                                                                                                                                                                                    
   788                                                                                                                                                                                                                                                                                                                                                                                                                            
   799                                                                                                                                                                                                                               
   800     /** The confidence level (expressed as a percentage) with which                                                                                                                                                           
   801      *  the position of a target entity is included within the uncertainty ellipsoid.                                                                                                                                         
   802      *  Range 0...128. '0' indicates 'no information'.                                                                                                                                                                        
   803      *  Values 101..128  should be treated as '0'.                                                                                                                                                                            
   804      */                                                                                                                                                                                                                       
   805     uint8_t confidence;  

Right now, we only are able to obtain the latitude, longitude, and accuracy value as a hint that is acquired from a google location API. Is there a way to translate those into unc_semimajor, unc_semiminor, and confidence to pass to the GNSS module as a location hint? 

Thank you! 

Related