# Location, SV and Jammer reports

This sample app demonstrates how to get location, satellite vehicle and jammer info reports.

1. Implement a command response method

void CmdResponse(ErrorCode error) {
        if (error == ErrorCode::SUCCESS) {
            std::cout << " Command executed successfully" << std::endl;
        }
        else {
            std::cout << " Command failed\n errorCode: " << static_cast<int>(error) << std::endl;
        }
    }
    Copy to clipboard

2. Implement ILocationListener interface

class MyLocationListener : public ILocationListener {
        public:
            void onBasicLocationUpdate(const std::shared_ptr<ILocationInfoBase> &locationInfo)
              override;
            void onDetailedLocationUpdate(const std::shared_ptr<ILocationInfoEx> &locationInfo)
               override;
            void onGnssSVInfo(const std::shared_ptr<IGnssSVInfo> &gnssSVInfo) override;
            void onGnssSignalInfo(const std::shared_ptr<IGnssSignalInfo> &gnssDatainfo) override;
    };
    Copy to clipboard

3. Get the LocationFactory instance

auto &locationFactory = LocationFactory::getInstance();
    Copy to clipboard

4. Get LocationManager instance

std::promise<ServiceStatus> prom = std::promise<ServiceStatus>();
    auto locationManager_ = locationFactory.getLocationManager([&](ServiceStatus status) {
         prom.set_value(status);
    });
    Copy to clipboard

5. Wait for the location subsystem initialization

ServiceStatus managerStatus = locationManager_->getServiceStatus();
    if (managerStatus != ServiceStatus::SERVICE_AVAILABLE) {
        std::cout << "Location subsystem is not ready, Please wait!!!... "<< std::endl;
        managerStatus = prom.get_future().get();
    }
    Copy to clipboard

6. Exit the application, if SDK is unable to initialize location subsystems

if (managerStatus == ServiceStatus::SERVICE_AVAILABLE) {
         std::cout<< "Subsystem is ready" << std::endl;
    } else {
         std::cout << " *** ERROR - Unable to initialize Location subsystem"<< std::endl;
         return -1;
    }
    Copy to clipboard

7. Instantiate MyLocationListener

auto myLocationListener = std::make_shared<MyLocationListener>();
    Copy to clipboard

8. Register for location, SV and jammer info updates

locationManager_->registerListenerEx(myLocationListener);
    Copy to clipboard

9. Start location reports with detailed information

uint32_t minIntervalInput = 2000; // Default is 1000 milli seconds.
    
    // CmdResponse callback is invoked with error code indicating
    // SUCCESS/FAILURE of the operation
    locationManager_->startDetailedReports(minIntervalInput, CmdResponse);
    Copy to clipboard

10. Wait for location fix, SV and Jammer info

void MyLocationListener::onDetailedLocationUpdate(
       const std::shared_ptr<telux::loc::ILocationInfoEx> &locationInfo) {
         std::cout << "New detailed Location info received" << std::endl;
    }
    
    void MyLocationListener::onGnssSVInfo(
       const std::shared_ptr<telux::loc::IGnssSVInfo> &gnssSVInfo) {
         std::cout << "Gnss Satellite Vehicle info received" << std::endl;
    }
    
    void MyLocationListener::onGnssSignalInfo(
       const std::shared_ptr<telux::loc::IGnssSignalInfo> &gnssDatainfo) {
         std::cout << "Gnss Signal info received" << std::endl;
    }
    Copy to clipboard

Now observe that changes in the configuration parameters have corresponding effect on how the location, satellite vehicle (SV) and jammer reports are received. The configuration will be same across all the location client applications and the least value of the parameter from all client applications will take effect finally.

Last Published: Apr 14, 2026

[Previous Topic
Location](https://docs.qualcomm.com/bundle/publicresource/80-PF458-1/topics/location.md) [Next Topic
Using location configurator APIs](https://docs.qualcomm.com/bundle/publicresource/80-PF458-1/topics/location_services_configurator.md)