Skip to content

XGPS150 & XGPS160 Software Development Kit

Notifications You must be signed in to change notification settings

Mh-ghadamyari/XGPS-SDK-iOS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XGPS-SDK-iOS

Platform

This project provides the source code and example code that XGPS150/XGPS160 exchanges data with iPhone device via Bluetooth connection.

Usage

The name of core SDK is Puck. You can use the puck.m and puck.h file.

Please reference the sample code how to use the Puck.

Implement the XGPSManager

add the XGPSManager() into your appDelegate

var xGpsManager: XGPSManager = XGPSManager()

Get GPS Information

add the XGPSDelegate in your viewcontroller

public protocol XGPSDelegate: class {
    func didUpdate(connected: Bool) -> Void
    @objc optional func didUpdateGpsInfo(modelNumber:String, isCharging:Bool, betteryLevel:Float) -> Void
    @objc optional func didUpdateSettings() -> Void
    @objc optional func didUpdatePositionData(fixType: Int, latitude:Float, longitude: Float, altitude: Float,
                                              speedAndCourseIsValid:Bool, speed: Float, heading: Float,
                                              utcTime: String, waas: Bool,
                                              satellitesInView:Int, satellitesInUse: Int,
                                              glonassInView: Int, glonassInUse: Int) -> Void
}

Get Satelletes Information

add the observer for NotificationCenter name "SatelliteDataUpdated" for more detail option see the puck code.

Request Trip log list

let xGpsManager = AppDelegate.getDelegate().xGpsManager
if xGpsManager.isConnected() {
    xGpsManager.commandGetLogList(delegate: self)
}

add logListComplete() delegate function

Delete Trip log

func deleteFromXGPS(logData: LogData) {
    xGpsManager.commandLogDelete(logData: logData)
}

see the 'TripsViewController.swift

Set the Logging rate

xGpsManager.commandLoggingUpdateRate(UInt8(settingValue))

see the SettingsViewController.swift it allows only XGPS160

Product

http://gps.dualav.com/

About

XGPS150 & XGPS160 Software Development Kit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 40.9%
  • C 33.1%
  • Swift 26.0%