generated from ut-issl/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPS時刻関連の更新 #79
Merged
Merged
GPS時刻関連の更新 #79
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
59166d7
add GPS_TIME_OF_WEEK struct
t-hosonuma 30b2fbd
modify way of updating jday from gps time
t-hosonuma 8da30d4
remove unnecessary modification in .vcxproj
t-hosonuma 50d7c69
rename and move gps_time_of_week.h/.c to time_system/gps_time.h/.c
t-hosonuma 6333263
move definition of JdayOrigin at GPSTime Epoch
t-hosonuma 7896a2c
rename gps_time to gps_time_obs in aocs_manager
t-hosonuma 461803d
remove leapseconds from gpsr\selector
t-hosonuma 8d33ae7
modify vcxproj
t-hosonuma e1ec6e4
remove leap_second related IF from Jday conversion function
t-hosonuma f8d22f4
move leap_seconds
t-hosonuma 8ee9588
modify way to calc diff_time for checking gps-tlm update status
t-hosonuma b3436ee
remove unnecessary process
t-hosonuma 6067cb9
rename GPS_TIME_OF_WEEK struct
t-hosonuma 6f47fb7
rename leap_seconds
t-hosonuma 36f9481
merge develop into the branch
t-hosonuma 19fd105
add include file
t-hosonuma 4ce7253
modify to pass build process on Vmicro
t-hosonuma 83c2acd
add modifications in accordance with Git comments
t-hosonuma 414f229
fix typo
t-hosonuma b54ee8b
rename GPS Time struct
t-hosonuma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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,16 @@ | ||
/** | ||
* @file gps_time.c | ||
* @brief GPS時刻構造体と定数の定義 | ||
*/ | ||
|
||
#include "gps_time.h" | ||
|
||
|
||
GPS_TIME_OF_WEEK GPS_TIME_OF_WEEK_create_gps_time(const uint16_t week_number, const uint32_t msec_of_week) | ||
{ | ||
GPS_TIME_OF_WEEK gps_time; | ||
gps_time.week_number = week_number; | ||
gps_time.msec_of_week = msec_of_week; | ||
|
||
return gps_time; | ||
} |
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,29 @@ | ||
/** | ||
* @file gps_time.h | ||
* @brief GPS時刻構造体と定数の定義 | ||
*/ | ||
#ifndef GPS_TIME_H_ | ||
#define GPS_TIME_H_ | ||
|
||
#include "stdint.h" | ||
|
||
/** | ||
* @struct GPS_TIME_OF_WEEK | ||
* @brief GPS時刻構造体 | ||
*/ | ||
typedef struct | ||
{ | ||
uint16_t week_number; //!< 週番号 | ||
uint32_t msec_of_week; //!< 週内の経過秒 [ミリ秒] | ||
} GPS_TIME_OF_WEEK; | ||
|
||
|
||
/** | ||
* @brief uint変数からのGPS時刻構造体生成 | ||
* @param[in] week_number : 週番号 | ||
* @param[in] msec_of_week : 週内の経過秒 [ミリ秒] | ||
* @return GPS_TIME_OF_WEEK | ||
*/ | ||
GPS_TIME_OF_WEEK GPS_TIME_OF_WEEK_create_gps_time(const uint16_t week_number, const uint32_t msec_of_week); | ||
200km marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#endif |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] ここのアルゴリズムを軽く説明していただけると、レビューしやすいかもしれません。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大きな方針は, 以前と変わらず,下記の様な方針です.
APP_TIME_SPACE_CALC_update_current_jday_ref_
にてGPSテレメ内の時刻をjdayに変換することでjdayを更新APP_TIME_SPACE_CALC_propagate_current_jday_ref_
でAOCSマネージャ内のJdayをインクリメントすることでJdayを伝播なのですが,
GPSテレメの更新
をどう判定するかという点を改修しており,その結果,見た目がややこしくなっていると思います.具体的には,下記の様に修正しています.
aocs_manager->obct_gps_time_obs
を見る様にし,最後にGPSテレメベースのjday変換を行った際に使ったGPSテレメ(にタグ付けされていた)受信時刻に対し,今回jday変換に使おうとしているGPSテレメ(にタグ付けされている)受信時刻が更新されているかどうかも確認する様にしたThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
アルゴリズムありがとうございます。あとは、そのような動作になっているか動作確認を乗せていただいて判断したいと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この後の定例で少し話せればと思いますが,S2E上で上記の様な動作になっていることは確認できました.
![無題](https://private-user-images.githubusercontent.com/97158519/250005391-51cd2186-b2d6-41d8-ae5d-3442d01cfa02.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NDE5NTgsIm5iZiI6MTczOTY0MTY1OCwicGF0aCI6Ii85NzE1ODUxOS8yNTAwMDUzOTEtNTFjZDIxODYtYjJkNi00MWQ4LWFlNWQtMzQ0MmQwMWNmYTAyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE3NDczOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3NTRlNmE3YTA3NjhmNGQ4MzJhMDAzZTJlM2U4NDNjMjE2YjNhZDEwYzkzMTA4NTg2NTVkNzJkMzFhOWIxNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.t5ocNPrrfG8XCs8XdTTBkLF-4eJ8jlT6ik1wUMMd9Hc)
(1HzでくるGPSからの時刻情報を,AOBCの自走クロックを使って10Hzで補間することで,GPSが可視の場合でも10HzでJdayが更新される)
ただ,GPSが常に非可視で,完全にAOBCだけで自走している場合と比べ,GPSが可視の場合だと,少しJdayの変化量がガタついている様に見えます.S2E上でC2A_AOCSを動かす際に,GPS時刻の基になっているS2E側の時間ステップがインクリメントされるタイミングと,C2A側のmaster_cycleをインクリメントするタイミングに何かしらズレがあるならばこういうことも起こり得るかと思うのですが,S2E上でこの2つのインクリメントタイミングは同期させていないと思って良いでしょうか…?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@t-hosonuma ミーティングで話しましたが、S2Eでは時間は一つのカウントアップだけに紐づいているのでばらつきがあるというのはなさそうです。そのあと少し考えてみたのですが、もしかするとfloat/double変換のばらつきとかそういう部分の方が可能性があるかもしれませんが、心当たりありますか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有難うございます,
そうですね,数値の桁の精度の話はありそうな気がしています(Jdayを0.1秒単位で比較するのがそもそもシビアなので…)
もう少し(検証のやり方そのものも含め)確認してみます.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このバタつきの原因は,(1) Excel上での計算の桁落ちすること,及び,(2) S2E上のGNSSモデルが出力するdouble型GPS時刻をuint32型のGPSレシーバコンポ出力模擬(msec時刻)に変換した際に,int型への切り詰めによってmsec以下の精度が失われることの様です.(搭載側というよりS2E_6Uの機器モデル側が原因)
詳細は検証結果に記載します.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@t-hosonuma 原因調査ありがとうございます。S2E_AOBC側で修正が必要とのことなので、そちらでissueを切っておきます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ut-issl/s2e-aobc#57