HRESULT CGPSController::SetGPSPosition( GPS_POSITION gps_Position ) { Lock(); boolean bNotify = m_knownPosition==false || m_latitude != gps_Position.dblLatitude || m_longitude != gps_Position.dblLongitude; m_knownPosition = true; m_latitude = gps_Position.dblLatitude; m_longitude = gps_Position.dblLongitude; Unlock(); if ( bNotify ) rho_geo_callcallback(); return S_OK; }
HRESULT CGPSController::SetGPSPosition( GPS_POSITION gps_Position ) { Lock(); boolean bNotify = m_knownPosition==false || m_latitude != gps_Position.dblLatitude || m_longitude != gps_Position.dblLongitude || m_altitude != gps_Position.flAltitudeWRTSeaLevel || m_speed != gps_Position.flSpeed || m_satelliteCount != gps_Position.dwSatelliteCount; m_knownPosition = true; m_latitude = gps_Position.dblLatitude; m_longitude = gps_Position.dblLongitude; m_altitude = gps_Position.flAltitudeWRTSeaLevel; m_speed = gps_Position.flSpeed; m_satelliteCount = gps_Position.dwSatelliteCount; Unlock(); if ( bNotify ) rho_geo_callcallback(); return S_OK; }