IZU2020 / PQAEGPS

Dependents:   IZU2020_AVIONICS IZU2020_AVIONICS

Embed: (wiki syntax)

« Back to documentation index

AEGPS Class Reference

AEGPS Class Reference

AE-GPSのライブラリ More...

#include <PQAEGPS.h>

Public Member Functions

 AEGPS (Serial &gps_serial)
int get_hour ()
 協定世界時(UTC)の時間のゲッター
int get_min ()
 協定世界時(UTC)の分のゲッター
float get_sec ()
 協定世界時(UTC)の秒のゲッター
float get_lat ()
 緯度のゲッター
float get_lon ()
 経度のゲッター
int get_fix ()
 位置特定品質のゲッター
int get_sat ()
 使用衛星数のゲッター
float get_hdop ()
 水平精度低下率のゲッター
float get_alt ()
 海抜高さのゲッター
float get_geoid ()
 ジオイド高さのゲッター

Detailed Description

AE-GPSのライブラリ

Note:
内部でシリアル受信割り込みを使用しています
GPGGAフォーマットのみを出力するように設定し、バックアップ用電池を使用すること
#include "mbed.h"
#include "PQAEGPS.h"

Serial pc(USBTX, USBRX, 115200);
Serial gps_serial(p9, p10, 115200);

AEGPS gps(gps_serial);

int main()
{
    while(1) {
        pc.printf("lat:%.6f, lon:%.6f, time:%d:%d:%.1f, fix:%d, sat:%d, hdop:%.2f, alt:%.1f, geoid:%.1f\r\n", gps.get_lat(), gps.get_lon(), gps.get_hour(), gps.get_min(), gps.get_sec(), gps.get_fix(), gps.get_sat(), gps.get_sat(), gps.get_hdop(), gps.get_alt(), gps.get_geoid());
    }
}

Definition at line 25 of file PQAEGPS.h.


Constructor & Destructor Documentation

AEGPS ( Serial &  gps_serial )
Parameters:
&gps_serialSerialのインスタンスへの参照

Definition at line 4 of file PQAEGPS.cpp.


Member Function Documentation

float get_alt (  )

海抜高さのゲッター

Returns:
海抜高さ

Definition at line 94 of file PQAEGPS.cpp.

int get_fix (  )

位置特定品質のゲッター

Returns:
位置特定品質

Definition at line 79 of file PQAEGPS.cpp.

float get_geoid (  )

ジオイド高さのゲッター

Returns:
ジオイド高さ

Definition at line 99 of file PQAEGPS.cpp.

float get_hdop (  )

水平精度低下率のゲッター

Returns:
水平精度低下率

Definition at line 89 of file PQAEGPS.cpp.

int get_hour (  )

協定世界時(UTC)の時間のゲッター

Returns:
時間(UTC)

Definition at line 54 of file PQAEGPS.cpp.

float get_lat (  )

緯度のゲッター

Returns:
緯度

Definition at line 69 of file PQAEGPS.cpp.

float get_lon (  )

経度のゲッター

Returns:
経度

Definition at line 74 of file PQAEGPS.cpp.

int get_min (  )

協定世界時(UTC)の分のゲッター

Returns:
分(UTC)

Definition at line 59 of file PQAEGPS.cpp.

int get_sat (  )

使用衛星数のゲッター

Returns:
使用衛星数

Definition at line 84 of file PQAEGPS.cpp.

float get_sec (  )

協定世界時(UTC)の秒のゲッター

Returns:
秒(UTC)

Definition at line 64 of file PQAEGPS.cpp.