-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
title: 'Stophone Support' | ||
description: 'Stophone Supportの技術仕様書' | ||
pubDate: 'dec 28 2024' | ||
heroImage: '/official/stophone_support.jpg' | ||
--- | ||
|
||
|
||
### スマホ加速度センサー記録アプリ | ||
|
||
このアプリは、スマートフォンの加速度センサーから取得したデータをリアルタイムで記録し、CSV形式で保存および共有する機能を提供するアプリです。また、このアプリは [Stophone](https://github.com/KTaisei/stophone) の開発支援ツールとしても設計されています。 | ||
|
||
--- | ||
|
||
### アプリの概要 | ||
|
||
#### 主な機能 | ||
- **加速度データのリアルタイム記録** | ||
スマートフォンの加速度センサーを利用して、以下のデータを記録します。 | ||
- X軸の加速度 | ||
- Y軸の加速度 | ||
- Z軸の加速度 | ||
- 総合加速度(3軸の合成値) | ||
|
||
- **CSV形式でのデータ保存** | ||
記録したデータをCSVファイル形式で保存し、ファイル名にはタイムスタンプが付与されます。 | ||
|
||
- **ファイル共有機能** | ||
`share_plus` を使用して、保存したCSVファイルを他のアプリ(Google Driveなど)で共有できます。 | ||
|
||
- **ダウンロードフォルダへの保存** | ||
`path_provider` を利用して、端末のダウンロードフォルダにデータを保存します。 | ||
|
||
--- | ||
|
||
### 使用方法 | ||
|
||
1. **アプリの起動** | ||
アプリを起動し、ホーム画面のUIにアクセスします。 | ||
|
||
2. **記録の開始** | ||
「記録開始」ボタンをタップすると、加速度センサーが起動し、データの記録が開始されます。 | ||
|
||
3. **記録の停止** | ||
「記録停止」ボタンをタップすると、記録が停止し、データがCSVファイルとして保存されます。 | ||
|
||
4. **ファイル共有** | ||
保存後、画面上の共有ボタンを使用してCSVファイルを他のアプリで共有します。 | ||
|
||
5. **CSVファイルへのアクセス** | ||
保存したCSVファイルは、デバイスのダウンロードフォルダから確認できます。 | ||
|
||
--- | ||
|
||
### 技術仕様 | ||
|
||
- フレームワーク : Flutter | ||
- 言語: Dart | ||
- 依存ライブラリ: | ||
- `sensors_plus`: 加速度センサーのデータを取得 | ||
- `path_provider`: 保存先のパスを取得 | ||
- `share_plus`: ファイル共有機能を提供 | ||
|
||
----- | ||
|
||
### アプリの変数説明 | ||
|
||
このセクションでは、アプリの主要な変数やフィールドの意味、役割について説明します。 | ||
|
||
--- | ||
|
||
#### 1. **加速度データ関連の変数** | ||
|
||
##### `double xAxis` | ||
- **説明**: 加速度センサーから取得したX軸方向の加速度値を保持します。 | ||
- **値の範囲**: 正の値は右方向、負の値は左方向への加速度を表します。 | ||
- **単位**: メートル毎秒毎秒 (m/s²) | ||
|
||
--- | ||
|
||
##### `double yAxis` | ||
- **説明**: 加速度センサーから取得したY軸方向の加速度値を保持します。 | ||
- **値の範囲**: 正の値は前方、負の値は後方への加速度を表します。 | ||
- **単位**: メートル毎秒毎秒 (m/s²) | ||
|
||
--- | ||
|
||
##### `double zAxis` | ||
- **説明**: 加速度センサーから取得したZ軸方向の加速度値を保持します。 | ||
- **値の範囲**: 正の値は上方向、負の値は下方向への加速度を表します。 | ||
- **単位**: メートル毎秒毎秒 (m/s²) | ||
|
||
--- | ||
|
||
##### `double totalAcceleration` | ||
- **説明**: X、Y、Z軸の加速度を合成した総加速度を表します。 | ||
- **計算式**: | ||
``` | ||
totalAcceleration = sqrt(xAxis^2 + yAxis^2 + zAxis^2) | ||
``` |