Skip to content
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

Add ObserveGroundPositionDeviation Function #529

Merged
merged 20 commits into from
Nov 4, 2023

Conversation

Hiro-0110
Copy link
Member

@Hiro-0110 Hiro-0110 commented Oct 27, 2023

Related issues

N/A

Description

Calculate how the image of the initial nadir point moves in the telescope sensor when a satellite is an earth-pointing mode.

Added ObserveGroundPositionDeviation Function to calculate the image movement in the telescope sensor and also added the Python script to plot the movement.

Test results

Successfully plotted the movement of the initial nadir point in the image sensor calculated by the newly introduced ObserveGroundPositionDeviation Function.

Figure_1111

Impact

N/A

Supplementary information

N/A

@Hiro-0110 Hiro-0110 requested review from 200km and seki-hiro October 27, 2023 03:14
@Hiro-0110 Hiro-0110 self-assigned this Oct 27, 2023
@Hiro-0110 Hiro-0110 requested review from sksat and a team as code owners October 27, 2023 03:14
@Hiro-0110 Hiro-0110 requested review from suzuki-toshihir0 and t-hosonuma and removed request for a team October 27, 2023 03:14
Copy link
Member

@200km 200km left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CIで弾かれているので、format修正お願いします。

scripts/Plot/plot_ground_position_argument.py Outdated Show resolved Hide resolved
scripts/Plot/plot_ground_position_argument.py Outdated Show resolved Hide resolved
src/components/real/mission/telescope.hpp Outdated Show resolved Hide resolved
src/components/real/mission/telescope.cpp Outdated Show resolved Hide resolved
src/components/real/mission/telescope.cpp Outdated Show resolved Hide resolved
src/components/real/mission/telescope.hpp Show resolved Hide resolved
src/components/real/mission/telescope.hpp Outdated Show resolved Hide resolved
src/components/real/mission/telescope.cpp Outdated Show resolved Hide resolved
src/components/real/mission/telescope.cpp Outdated Show resolved Hide resolved
@@ -53,6 +56,10 @@ Telescope::Telescope(ClockGenerator* clock_generator, const libra::Quaternion& q

star_list_in_sight.push_back(star);
}
//Get initial spacecraft position in ECEF
initial_spacecraft_position_ecef_m_ = orbit_->GetPosition_ecef_m();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Q] ここの三行で何をやりたいのかわからなかったので、意図を教えてもらえると助かります。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ECEF座標系での衛星の座標をもとめて(initial_spacecraft_position_ecef_m_)、それに対して
地球半径を掛けて、地球半径と高度の和で割る事によってECEF座標系での直下点の座標(initial_ground_position_ecef_m_)を求めています。
ベクトルをスカラーで割ろうとするとエラーになるのでやり方がわからず、紛らわしい書き方になっています、、

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

やりたいこと、なんとなくわかりました。

initial_ground_position_ecef_m_ = environment::earth_equatorial_radius_m * (initial_spacecraft_position_ecef_m.CalcNormalizedVector());

こんな感じでも同じ意図になりますかね?(理解のために尋ねているだけなので、こう修正しなくても良いです。)

ベクトルをスカラーで割ろうとするとエラーになる

こちらに関しては、現状は次のようにコーディングする必要があります。

Vector2 = (1.0/scalar) * Vector1

今回の場合は、

double a = (environment::earth_equatorial_radius_m)/(orbit_->GetGeodeticPosition().GetAltitude_m() + environment::earth_equatorial_radius_m);
initial_ground_position_ecef_m_ = a * initial_spacecraft_position_ecef_m;

みたいな感じですかね。

@seki-hiro seki-hiro added priority::medium priority medium minor update add functionality in a backwards compatible manner labels Oct 30, 2023
@seki-hiro
Copy link
Member

issue概要欄の更新もお願いします。今回の場合、plot結果がどうなるのかをTest resultsに貼ってもらえるとわかりやすいと思います。

@200km
Copy link
Member

200km commented Oct 30, 2023

clang++ののbuildエラーは最新のdevelopとマージ or rebaseしてもらえると解消されると思いますので、試してみてください。

@Hiro-0110 Hiro-0110 changed the title Add Observe Ground Position Function Add ObserveGroundPositionDeviation Function Oct 30, 2023
@200km 200km added this to the Minor update v7.1.0 milestone Oct 30, 2023
Copy link
Member

@200km 200km left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビュー対応してくださったとのことですので、再レビューさせていただきました。一部resolveしていない前回コメントが残っているので、そちらはコメントをもらえると嬉しいです。
(修正が必要ないと思われているのであれば、遠慮なくそう言ってくれて問題ないです。)

src/components/real/mission/telescope.cpp Outdated Show resolved Hide resolved
src/components/real/mission/telescope.cpp Outdated Show resolved Hide resolved
src/components/real/mission/telescope.cpp Outdated Show resolved Hide resolved
@200km 200km self-requested a review November 3, 2023 07:38
Copy link
Member

@200km 200km left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントはしていますが、修正は必須ではないのでApproveします。

@Hiro-0110 Hiro-0110 merged commit bdb63da into develop Nov 4, 2023
12 checks passed
@Hiro-0110 Hiro-0110 deleted the feature/add-observe-ground-position branch November 4, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor update add functionality in a backwards compatible manner priority::medium priority medium
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants