PL SDK - Software Development Kit  5.4.0
API Reference
WPS_Location Struct Reference

#include <wpsapi.h>

Collaboration diagram for WPS_Location:
Collaboration graph

Public Attributes

double latitude
 
double longitude
 
double hpe
 
double score
 
unsigned short nap
 
double speed
 
double bearing
 
WPS_StreetAddressstreet_address
 
unsigned short ncell
 
unsigned short nlac
 
unsigned short nsat
 
unsigned short historicalLocationCount
 
unsigned char withIP
 
unsigned char hasScore
 
unsigned id
 
char * ip
 
unsigned char * hash
 
unsigned hashLength
 
unsigned char * signature
 
unsigned signatureLength
 
unsigned long timestamp
 
double altitude
 
WPS_LocationType type
 
unsigned long age
 

Detailed Description

Geographic location

Member Data Documentation

◆ age

unsigned long WPS_Location::age

Number of milliseconds elapsed since the time the location was calculated

Since
3.5

◆ altitude

double WPS_Location::altitude

A calculated altitude above mean sea level in meters.

Since
3.2

◆ bearing

double WPS_Location::bearing

A calculated estimate of bearing as degree from north clockwise (+90 is East).

A negative value is used to indicate an unknown bearing.

Since
2.4

◆ hash

unsigned char* WPS_Location::hash

Hash of the measurement data used in this certified location or NULL otherwise.

Note
only applies to signed certified locations.
Since
4.9.1

◆ hashLength

unsigned WPS_Location::hashLength

Length of hash.

Note
only applies to signed certified locations.
Since
4.9.1

◆ hasScore

unsigned char WPS_Location::hasScore

Nonzero if the score was calculated and zero otherwise.

Since
4.8

◆ historicalLocationCount

unsigned short WPS_Location::historicalLocationCount

The number of previous locations used to corroborate this location.

Since
4.8

◆ hpe

double WPS_Location::hpe

horizontal positioning error – A calculated error estimate of the location result in meters.

◆ id

unsigned WPS_Location::id

Identifies this location within a list of returned signed certified locations.

Note
only applies to signed certified locations.
Since
4.9.1

◆ ip

char* WPS_Location::ip

IP Address as received by Skyhook's servers or NULL otherwise. The presence of an IP address does not imply that withIP is true.

Note
only applies to certified locations, ie. hasScore is true.
Since
4.9.1

◆ latitude

double WPS_Location::latitude

the calculated physical geographic location.

◆ longitude

double WPS_Location::longitude

◆ nap

unsigned short WPS_Location::nap

The number of access-point used to calculate this location.

Since
2.4

◆ ncell

unsigned short WPS_Location::ncell

The number of cell tower used to calculate this location.

Since
3.2

◆ nlac

unsigned short WPS_Location::nlac

The number of unique location area codes used to calculate this location.

Since
4.7

◆ nsat

unsigned short WPS_Location::nsat

The number of satellite used to calculate this location.

Since
3.2

◆ score

double WPS_Location::score

The location score – a number between 0 (very low score, highly suspect location) and 10 (very high score, highly trusted location).

Note
only applies to certified locations, ie. hasScore is true.
Since
4.8

◆ signature

unsigned char* WPS_Location::signature
   Signature computed by Skyhook's remote servers over the contents
   of this location's fields or \c NULL otherwise.

   Signature of the WPS_Location serialized as follows:

   \code{.c}

void WPS_CertifiedLocationCallback(void* arg, WPS_ReturnCode code, const WPS_Location** locations, unsigned nlocations, const void* reserved) { for (int i = 0; i < nlocations; i++) { char buf[256]; int nBytes = snprintf(buf, sizeof(buf), "%d/%d,%.6f,%.6f,%d,%.1f,%d,%d,%d,%d,%d,%d,%d,%ul,%s", location[i]->id, nlocations, location[i]->latitude, location[i]->longitude, location[i]->hpe, location[i]->score, location[i]->nap, location[i]->ncell, location[i]->nlac, location[i]->nsat, location[i]->historicalLocationCount, location[i]->withIP ? 1 : 0, location[i]->timestamp, location[i]->ip); memcpy(bug + nBytes, location[i]->hash, location[i]->hashLength); memcpy(buf + nBytes + saltLen, salt, saltLen); ... } }

Skyhook public key:
-----BEGIN CERTIFICATE-----
MIIDfDCCAmQCCQDs5/f7i+4vIjANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJV
UzELMAkGA1UECAwCTUExDzANBgNVBAcMBkJvc3RvbjEeMBwGA1UECgwVU2t5aG9v
ayBXaXJlbGVzcyBJbmMuMRAwDgYDVQQLDAdTa3lob29rMSAwHgYDVQQDDBdhcGku
c2t5aG9va3dpcmVsZXNzLmNvbTAgFw0xNDAyMDMxOTA2NDBaGA8zMDEzMDYwNjE5
MDY0MFowfzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk1BMQ8wDQYDVQQHDAZCb3N0
b24xHjAcBgNVBAoMFVNreWhvb2sgV2lyZWxlc3MgSW5jLjEQMA4GA1UECwwHU2t5
aG9vazEgMB4GA1UEAwwXYXBpLnNreWhvb2t3aXJlbGVzcy5jb20wggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/N4Y/JXq5x1T3F5Q1pViI/b6sHPhrU3bd
KNLSMkUb4ZPmwyde5ayPLSCAnS891Cmdn+MFolPNVlnu4/odDlIJNkBZxwqLyJjj
UagIoU6AyRY0gWZh24abMjm8BeKC+8CFFW9DEL/3rZXSLAm+ViVVmEV0+lA2M9+D
6i/L5Y47DkjsuU5B911uNzhOXS5qaW6WQOFBNtIMK8dEbFhfwMApxQOv4Pw998N7
v+ylrDhUbeUOlW/mSXi5UEEVn1Q4cmiyiIlDejljIfCgQecPttEAmotNThwh8nCo
KA6T0hdu6FL2bJmTrVbnz3ftOpuXLhCRTXMrsIICVizVijfxrhsBAgMBAAEwDQYJ
KoZIhvcNAQEFBQADggEBABfwvRIyVm9UrBiT18Xj2WMJwC3hSvoGvxOVAfYFb0gO
ciCwkMhhs+88F3CgQbXIILr7iaHoNZcH9zDmm8rZ2a8BMTVSkaF9b43xILTVwGmu
zi36eWMcvCS1jE9cRhSYhpX6I+scRLC6IRshvuleTX9viE8LwASLvekKEFi8yg07
8cFkJDRHXrqvYsG1hcDoKsW9ocr4ugj0annTUh38OMgAzVO0L2IFqKkb6+CuDPX7
jJh+KwZau/0K6hqr+4aB6zwLinQ32nNJnI1UI3ufFbPU9g4V9nzXyHBDF93zaPWF
R7IQB1FfB8DBgYeQUL9VJKSYUhogQUpSeqmQrwXbrgI=
-----END CERTIFICATE-----
See also
https://api.skyhookwireless.com/wps2/pubkey/skyhook-rsa-x509.cert
Note
only applies to signed certified locations.
Since
4.9.1

◆ signatureLength

unsigned WPS_Location::signatureLength

Length of signature.

Note
only applies to signed certified locations.
Since
4.9.1

◆ speed

double WPS_Location::speed

A calculated estimate of speed in km/hr.

A negative value is used to indicate an unknown speed.

Since
2.4

◆ street_address

WPS_StreetAddress* WPS_Location::street_address

physical street address, only returned in the network-centric model when the street_address_lookup parameter is set to WPS_LIMITED_STREET_ADDRESS_LOOKUP or WPS_FULL_STREET_ADDRESS_LOOKUP.

◆ timestamp

unsigned long WPS_Location::timestamp

Timestamp (number of seconds since unix epoch) of this location. This timestamp is calculated on Skyhook’s servers at the time the request is received, and does not account for the network round-trip or the local time of the device.

Note
only applies to certified locations, ie. hasScore is true
Since
4.9.1

◆ type

WPS_LocationType WPS_Location::type

Type of calculated location.

Since
3.2

◆ withIP

unsigned char WPS_Location::withIP

Nonzero if the IP address of the client making the request was used to confirm the location, or zero otherwise.

Since
4.8

The documentation for this struct was generated from the following file: