libgnss-codes

libgnss-codes-swift

CI

A modern, type-safe Swift 6.0 library for generating GNSS ranging codes across multiple constellations.

This project is a high-performance port of the Oriental AI C library.

Features

Quick Start

Installation

Add the package to your Package.swift dependencies:

dependencies: [
    .package(url: "https://github.com/shuwang1/libgnss-codes-swift.git", from: "1.0.0")
]

Basic Usage

import GNSSCodes

// Generate GPS L1 C/A chips for PRN 1
if let code = GNSSCodes.generate(prn: 1, type: .L1CA) {
    print("Signal: GPS L1 C/A")
    print("Length: \(code.length) chips")
    print("Rate: \(code.chipRate / 1e6) MHz")
    print("First 5 chips: \(code.chips.prefix(5))")
}

// Generate Galileo E1B chips for PRN 10
if let galileo = GNSSCodes.generate(prn: 10, type: .E1B) {
    // Process Galileo chips...
}

Documentation & Testing

Known Issues & Future Work

License

2016 All Rights Reserved by Shu Wang shuwang1@outlook.com This project is licensed under the same terms as the original libgnss-codes library. See the LICENSE file (if available) or contact Shu Wang shuwang1@outlook.com.

Credits

Original C implementation by Shu Wang. Swift port and optimization developed as part of Orientable AI internel C project.