le_pos_Get2DLocation returns LE_OUT_OF_RANGE


#1

I’m trying to make a little testprogram that will write location in the log. When started it only returns result = -3, which is LE_OUT_OF_RANGE. A thing to notice is when running AT!GPSSATINFO? if that is the right syntax, it returns 0 satellites.
I’m using the mangOH Red starter kit with the WP8548. I’ve heard some problems with the antenna that follows, is this the case?

The code looks like this:

le_result_t result;
int32_t latitude;
int32_t longitude;
int32_t horizontalAccuracy;

le_posCtrl_ActivationRef_t posCtrlRef = le_posCtrl_Request();
if (!posCtrlRef)
{
    LE_ERROR("Can't activate the Positioning service");
    exit(1);
}

LE_INFO("CHECKING 2D POSITION");
while(true){
    result = le_pos_Get2DLocation(&latitude, &longitude, &horizontalAccuracy);
    if (result == LE_OK){
        LE_INFO("OK");
        break;
    }
    else{
        LE_INFO("Somthing went wrong... Result = %d", result);
        sleep(3);
    }
}
LE_INFO("Lat = %d \tLong = %d \t HorizontalAccuracy = %d",latitude, longitude, horizontalAccuracy);

`


#2

#3

item closed as it is repeated.