@@ -334,9 +334,9 @@ gps.initialize = async function (callback) {
334334 }
335335
336336 function update_ui ( ) {
337- const lat = FC . GPS_DATA . lat / 10000000 ;
338- const lon = FC . GPS_DATA . lon / 10000000 ;
339- const url = `https://maps.google.com/?q=${ lat } ,${ lon } ` ;
337+ const latitude = FC . GPS_DATA . latitude / 10000000 ;
338+ const longitude = FC . GPS_DATA . longitude / 10000000 ;
339+ const url = `https://maps.google.com/?q=${ latitude } ,${ longitude } ` ;
340340 const imuHeadingDegrees = FC . SENSOR_DATA . kinematics [ 2 ] ;
341341 // Convert to radians and add 180 degrees to make icon point in the right direction
342342 const imuHeadingRadians = ( ( imuHeadingDegrees + 180 ) * Math . PI ) / 180 ;
@@ -353,9 +353,12 @@ gps.initialize = async function (callback) {
353353
354354 const gpsUnitText = i18n . getMessage ( "gpsPositionUnit" ) ;
355355 $ ( ".GPS_info td.alt" ) . text ( `${ alt } m` ) ;
356- $ ( ".GPS_info td.latLon a" )
356+ $ ( ".GPS_info td.latitude a" )
357357 . prop ( "href" , url )
358- . text ( `${ lat . toFixed ( 6 ) } / ${ lon . toFixed ( 6 ) } ${ gpsUnitText } ` ) ;
358+ . text ( `${ latitude . toFixed ( 6 ) } ${ gpsUnitText } ` ) ;
359+ $ ( ".GPS_info td.longitude a" )
360+ . prop ( "href" , url )
361+ . text ( `${ longitude . toFixed ( 6 ) } ${ gpsUnitText } ` ) ;
359362 $ ( ".GPS_info td.heading" ) . text ( `${ imuHeadingDegrees . toFixed ( 0 ) } / ${ gpsHeading . toFixed ( 0 ) } ${ gpsUnitText } ` ) ;
360363 $ ( ".GPS_info td.speed" ) . text ( `${ FC . GPS_DATA . speed } cm/s` ) ;
361364 $ ( ".GPS_info td.sats" ) . text ( FC . GPS_DATA . numSat ) ;
@@ -384,12 +387,12 @@ gps.initialize = async function (callback) {
384387 if ( ispConnected ( ) ) {
385388 $ ( "#connect" ) . hide ( ) ;
386389
387- gpsFoundPosition = ! ! ( lon && lat ) ;
390+ gpsFoundPosition = ! ! ( longitude && latitude ) ;
388391
389392 if ( gpsFoundPosition ) {
390393 ( hasMag ? iconStyleMag : iconStyleGPS ) . getImage ( ) . setRotation ( imuHeadingRadians ) ;
391394 iconFeature . setStyle ( hasMag ? iconStyleMag : iconStyleGPS ) ;
392- const center = fromLonLat ( [ lon , lat ] ) ;
395+ const center = fromLonLat ( [ longitude , latitude ] ) ;
393396 mapView . setCenter ( center ) ;
394397 iconGeometry . setCoordinates ( center ) ;
395398 } else {
0 commit comments