PL SDK - Software Development Kit
5.4.0
API Reference
|
#include <wpsapi.h>
Public Attributes | |
double | latitude |
double | longitude |
double | hpe |
double | score |
unsigned short | nap |
double | speed |
double | bearing |
WPS_StreetAddress * | street_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 |
Geographic location
unsigned long WPS_Location::age |
Number of milliseconds elapsed since the time the location was calculated
double WPS_Location::altitude |
A calculated altitude above mean sea level in meters.
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.
unsigned char* WPS_Location::hash |
Hash of the measurement data used in this certified location or NULL otherwise.
unsigned WPS_Location::hashLength |
Length of hash
.
unsigned char WPS_Location::hasScore |
Nonzero if the score was calculated and zero otherwise.
unsigned short WPS_Location::historicalLocationCount |
The number of previous locations used to corroborate this location.
double WPS_Location::hpe |
horizontal positioning error – A calculated error estimate of the location result in meters.
unsigned WPS_Location::id |
Identifies this location within a list of returned signed certified locations.
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
.
hasScore
is true.double WPS_Location::latitude |
the calculated physical geographic location.
double WPS_Location::longitude |
unsigned short WPS_Location::nap |
The number of access-point used to calculate this location.
unsigned short WPS_Location::ncell |
The number of cell tower used to calculate this location.
unsigned short WPS_Location::nlac |
The number of unique location area codes used to calculate this location.
unsigned short WPS_Location::nsat |
The number of satellite used to calculate this location.
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).
hasScore
is true
.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); ... } }
unsigned WPS_Location::signatureLength |
Length of signature
.
double WPS_Location::speed |
A calculated estimate of speed in km/hr.
A negative value is used to indicate an unknown speed.
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
.
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.
hasScore
is trueWPS_LocationType WPS_Location::type |
Type of calculated location.
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.