airlbs - airlbs Location services (fee-based services, you need to contact the sales application)#

Adaptation status unknown

Note

This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!

Example

--Note: due to the use of sys.wait() all apis need to be used in the coroutine
--Note: Synchronize time before use
-- Usage Examples
local airlbs = require "airlbs"

sys.taskInit(function()
    sys.waitUntil("IP_READY")

    socket.sntp()
    sys.waitUntil("NTP_UPDATE", 1000)

    while 1 do
        local result , data = airlbs.request({project_id = "xxx",project_key = 'xxx',timeout = 1000})
        if result then
            print("airlbs", json.encode(data))
        end
        sys.wait(20000)
    end

end)

airlbs.request(param)#

Obtain positioning data

Parameters

Incoming Value Type

Explanation

param

table Parameters (contact sales to obtain id and key) project_id: project ID project_key: project key timeout: timeout time, default in milliseconds 15000

Return Value

return value type

explanation

bool

Returns true on success, returns true on failure false

table

Positioning takes effect successfully, positioning data returned successfully

Examples

local result , data = airlbs.request({project_id = airlbs_project_id,project_key = airlbs_project_key})
if result then
    print("airlbs", json.encode(data))
end