DEKI/ENGINE ドキュメント
deki-gps 0.19.0
Deki パッケージリファレンス
deki-gps

GPS 周辺機器。どのトーカーの NMEA でも UART 経由で読み取り、受信機の通信速度を自分で見つけ、衛星数と高度を報告します。

リポジトリ: github.com/dekiengine/deki-gps · 最新リリース: 0.19.0 · エンジン 0.19.0 以降が必要 · 依存: deki-http, deki-uart

DekiEditor --packages-add deki-gps <project> か、パッケージマネージャーからインストールします。エンジン自身のコンポーネントと C++ API は Deki のドキュメントにあります。

エディターでは GPS (NMEA over UART) と表示されます。

コンポーネント

コンポーネント カテゴリ 説明
DesktopGPSComponent システム デスクトップで GPS 受信機の代わりになり、ハードウェアなしで位置情報を使えるようにします。
NEO6MGPSComponent センサー u-blox NEO-6M GPS から UART で位置情報を読み取ります。

機能フラグ

ビルドから外せる部分です。define を持つ機能はその define で切り替わり、それ以外はコンポーネントと一緒に取り除かれます。

機能 define デフォルト
NMEA UART DEKI_FEATURE_GPS_NMEA オン

コンポーネントリファレンス

DesktopGPSComponent

デスクトップで GPS 受信機の代わりになり、ハードウェアなしで位置情報を使えるようにします。

インスペクターでの名前: デスクトップ GPS · カテゴリ: システム · 型: DekiGps::DesktopGPSComponent

リフレクションされたプロパティはありません。

NEO6MGPSComponent

u-blox NEO-6M GPS から UART で位置情報を読み取ります。

インスペクターでの名前: NEO-6M GPS · カテゴリ: センサー · 型: DekiGps::NEO6MGPSComponent

プロパティ 型 デフォルト 制約 説明
txPin int32 17 0 から 48 ボードが送信に使う GPIO で、モジュールの RX につなぎます。たすき掛けに配線し、このピンが送信してモジュールが受信します。
rxPin int32 16 0 から 48 ボードが受信に使う GPIO で、モジュールの TX につなぎます。位置データはこのピンで届くので、測位がいつまでも得られないときはたいていこのピンが原因です。
baudRate int32 9600 0 から 921600 シリアルの速度で、モジュールの設定と一致させる必要があります。NEO-6M の出荷時は 9600 です。モジュールを 38400 に設定し直してここを 9600 のままにすると、何も届かないのではなく、意味のないデータが届きます。0 にすると自動で見つけます。有効な NMEA が届くまで 9600、38400、115200、57600、4800 を順に試すので、複数の種類のモジュールが載るボードにも使えます。
uartPort int32 1 0 から 2 チップのどのシリアルコントローラーを使うかです。ポート 0 は通常 USB コンソールなので、GPS にはふつう 1 か 2 を使います。

変更履歴

変更履歴は英語です。

0.19.0

Changed

  • minEngine 0.19.0: built against engine 0.19.0, whose component metadata records the package each class is in. A build of this package from before does not load and is rebuilt.

Added

  • Japanese, Simplified Chinese and Korean: editor/lang/ja.json, zh.json and ko.json translate the names, tooltips and enum values this package's components show in the Inspector.

0.18.2

Added

  • IDekiGPS::Status(): sentences read, satellites in view (all constellations) and in use, altitude, and the serial speed. Indoors, where there may never be a fix, it shows whether the receiver is talking and how the search is going.
  • baudRate 0 on NEO6MGPSComponent finds the speed: 9600, 38400, 115200, 57600 and 4800 are tried until a valid sentence arrives. For a board that ships with more than one kind of module (the LilyGO T-Deck Plus: L76K or u-blox M10).
  • Reads $–GGA and $–GSV besides $–RMC, from any talker.
  • DekiGPSStatus::bytes: bytes read from the receiver, valid or not. With no sentences, bytes mean a wrong speed; none, a wrong pin or no power.

Fixed

  • A device never read its GPS. Nothing called the NMEA driver's update, so its UART was never read and there was never a fix. NEO6MGPSComponent now updates it every frame.
  • A position sentence with an empty field (no course, as when standing still) shifted every field after it, losing the date and time: fields were split with strtok, which skips empty ones.

それ以前のリリース: CHANGELOG.md


パッケージのリフレクションデータから生成しています (エンジン 0.19.0)。プロパティ名はシーンファイルで使われるキーです。名前を変えても別名が残ります (互換性)。