generated from ut-issl/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #301 from ut-issl/develop
Merge develop into main for v5.3.0 release
- Loading branch information
Showing
47 changed files
with
1,028 additions
and
392 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
[GScalculator] | ||
//通信回線のうち,ANT同士をつなぐ部分のパラメータ | ||
//偏波損失[dB] | ||
// Polarization loss [dB] | ||
loss_polarization = 0.0 | ||
|
||
//大気吸収損失[dB] | ||
// Atmospheric loss [dB] | ||
loss_atmosphere = -0.5 | ||
|
||
//降雨損失[dB] | ||
// Rain fall loss [dB] | ||
loss_rainfall = -0.12 | ||
|
||
//その他損失[dB] | ||
// Other losses [dB] | ||
loss_others = 0.0 | ||
|
||
//通信回線のデータ方式まわりの計算のパラメータ | ||
//要求Eb/N0[dB](QPSKでBER1e-6の場合) | ||
// Required Eb/N0 [dB](The following value is QPSK and BER=1e-6) | ||
EbN0 = 10.8 | ||
|
||
//ハードウェア劣化[dB] | ||
// Deterioration of hardware [dB] | ||
hardware_deterioration = 1.5 | ||
|
||
//符号化利得[dB](RS(E16)+畳み込みでBER1e-6の場合) | ||
// Codig gain [dB](The following value is RS(E16)+Convolution and BER=1e-6) | ||
coding_gain = -8.17 | ||
|
||
//ビットレート[kbps](最大ビットレート履歴を求めるという解析目的ではこれは指定する値ではない) | ||
|
||
//確保する回線マージン[dB] | ||
// Required margin to calclate maximum bitrate [dB] | ||
margin_req = 3.0 | ||
|
||
// Downlink bitrate to calculate receive margin [bps] | ||
downlink_bitrate_bps = 100000 |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,105 @@ | ||
# | ||
# Plot Disturbances | ||
# | ||
# arg[1] : read_file_tag : time tag for default CSV output log file. ex. 220627_142946 | ||
# | ||
|
||
# | ||
# Import | ||
# | ||
# plots | ||
import matplotlib.pyplot as plt | ||
# local function | ||
from common import find_latest_log_tag | ||
from common import read_3d_vector_from_csv | ||
from common import read_scalar_from_csv | ||
# arguments | ||
import argparse | ||
|
||
aparser = argparse.ArgumentParser() | ||
|
||
aparser.add_argument('--logs-dir', type=str, help='logs directory like "../../data/SampleSat/logs"', default='../../data/SampleSat/logs') | ||
aparser.add_argument('--file-tag', type=str, help='log file tag like 220627_142946') | ||
aparser.add_argument('--no-gui', action='store_true') | ||
|
||
args = aparser.parse_args() | ||
|
||
# | ||
# Read Arguments | ||
# | ||
# log file path | ||
path_to_logs = args.logs_dir | ||
|
||
read_file_tag = args.file_tag | ||
if read_file_tag == None: | ||
print("file tag does not found. use latest.") | ||
read_file_tag = find_latest_log_tag(path_to_logs) | ||
|
||
print("log: " + read_file_tag) | ||
|
||
# | ||
# CSV file name | ||
# | ||
read_file_name = path_to_logs + '/' + 'logs_' + read_file_tag + '/' + read_file_tag + '_default.csv' | ||
|
||
# | ||
# Data read and edit | ||
# | ||
# Read S2E CSV | ||
time = read_scalar_from_csv(read_file_name, 'time[sec]') | ||
|
||
srp_force_b = read_3d_vector_from_csv(read_file_name, 'srp_force_b', 'N') | ||
airdrag_force_b = read_3d_vector_from_csv(read_file_name, 'airdrag_force_b', 'N') | ||
|
||
third_body_acc_i = read_3d_vector_from_csv(read_file_name, 'acc_thirdbody_i', 'm/s2') | ||
geopotential_acc_ecef = read_3d_vector_from_csv(read_file_name, 'a_geop_ecef', 'm/s2') | ||
|
||
total_acc_i = read_3d_vector_from_csv(read_file_name, 'sat_acc_i_i', 'm/s^2') | ||
|
||
# | ||
# Plot | ||
# | ||
plt.figure(0) | ||
plt.plot(time[0], srp_force_b[0], marker=".", c="red", label="SRP-X") | ||
plt.plot(time[0], srp_force_b[1], marker=".", c="green", label="SRP-Y") | ||
plt.plot(time[0], srp_force_b[2], marker=".", c="blue", label="SRP-Z") | ||
plt.plot(time[0], airdrag_force_b[0], marker=".", c="orange", label="AIR-X") | ||
plt.plot(time[0], airdrag_force_b[1], marker=".", c="yellow", label="AIR-Y") | ||
plt.plot(time[0], airdrag_force_b[2], marker=".", c="purple", label="AIR-Z") | ||
plt.title("Non-gravitational Disturbance Force @ Body frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Force [N]") | ||
plt.legend() | ||
|
||
plt.figure(1) | ||
plt.plot(time[0], third_body_acc_i[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], third_body_acc_i[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], third_body_acc_i[2], marker=".", c="blue", label="Z") | ||
plt.title("Third body acceleration @ Inertial frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Acceleration [m/s2]") | ||
plt.legend() | ||
|
||
plt.figure(2) | ||
plt.plot(time[0], geopotential_acc_ecef[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], geopotential_acc_ecef[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], geopotential_acc_ecef[2], marker=".", c="blue", label="Z") | ||
plt.title("Geo-potential acceleration @ ECEF frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Acceleration [m/s2]") | ||
plt.legend() | ||
|
||
plt.figure(3) | ||
plt.plot(time[0], total_acc_i[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], total_acc_i[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], total_acc_i[2], marker=".", c="blue", label="Z") | ||
plt.title("Total acceleration @ Inertial frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Acceleration [m/s2]") | ||
plt.legend() | ||
|
||
# Data save | ||
if args.no_gui: | ||
plt.savefig(read_file_tag + "_disturbance_torque.png") # save last figure only | ||
else: | ||
plt.show() |
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,109 @@ | ||
# | ||
# Plot Disturbances | ||
# | ||
# arg[1] : read_file_tag : time tag for default CSV output log file. ex. 220627_142946 | ||
# | ||
|
||
# | ||
# Import | ||
# | ||
# plots | ||
import matplotlib.pyplot as plt | ||
# local function | ||
from common import find_latest_log_tag | ||
from common import read_3d_vector_from_csv | ||
from common import read_scalar_from_csv | ||
# arguments | ||
import argparse | ||
|
||
aparser = argparse.ArgumentParser() | ||
|
||
aparser.add_argument('--logs-dir', type=str, help='logs directory like "../../data/SampleSat/logs"', default='../../data/SampleSat/logs') | ||
aparser.add_argument('--file-tag', type=str, help='log file tag like 220627_142946') | ||
aparser.add_argument('--no-gui', action='store_true') | ||
|
||
args = aparser.parse_args() | ||
|
||
# | ||
# Read Arguments | ||
# | ||
# log file path | ||
path_to_logs = args.logs_dir | ||
|
||
read_file_tag = args.file_tag | ||
if read_file_tag == None: | ||
print("file tag does not found. use latest.") | ||
read_file_tag = find_latest_log_tag(path_to_logs) | ||
|
||
print("log: " + read_file_tag) | ||
|
||
# | ||
# CSV file name | ||
# | ||
read_file_name = path_to_logs + '/' + 'logs_' + read_file_tag + '/' + read_file_tag + '_default.csv' | ||
|
||
# | ||
# Data read and edit | ||
# | ||
# Read S2E CSV | ||
time = read_scalar_from_csv(read_file_name, 'time[sec]') | ||
|
||
total_torque_b = read_3d_vector_from_csv(read_file_name, 'torque_true_b', 'Nm') | ||
gg_torque_b = read_3d_vector_from_csv(read_file_name, 'ggtorque_b', 'Nm') | ||
srp_torque_b = read_3d_vector_from_csv(read_file_name, 'srp_torque_b', 'Nm') | ||
airdrag_torque_b = read_3d_vector_from_csv(read_file_name, 'airdrag_torque_b', 'Nm') | ||
mag_torque_b = read_3d_vector_from_csv(read_file_name, 'mag_dist_torque_b', 'Nm') | ||
|
||
# | ||
# Plot | ||
# | ||
plt.figure(0) | ||
plt.plot(time[0], gg_torque_b[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], gg_torque_b[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], gg_torque_b[2], marker=".", c="blue", label="Z") | ||
plt.title("Gravity Gradient torque @ Body frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Torque [Nm]") | ||
plt.legend() | ||
|
||
plt.figure(1) | ||
plt.plot(time[0], srp_torque_b[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], srp_torque_b[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], srp_torque_b[2], marker=".", c="blue", label="Z") | ||
plt.title("Solar Radiation Pressure torque @ Body frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Torque [Nm]") | ||
plt.legend() | ||
|
||
plt.figure(2) | ||
plt.plot(time[0], airdrag_torque_b[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], airdrag_torque_b[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], airdrag_torque_b[2], marker=".", c="blue", label="Z") | ||
plt.title("Air drag torque @ Body frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Torque [Nm]") | ||
plt.legend() | ||
|
||
plt.figure(3) | ||
plt.plot(time[0], mag_torque_b[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], mag_torque_b[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], mag_torque_b[2], marker=".", c="blue", label="Z") | ||
plt.title("Magnetic disturbance torque @ Body frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Torque [Nm]") | ||
plt.legend() | ||
|
||
plt.figure(4) | ||
plt.plot(time[0], total_torque_b[0], marker=".", c="red", label="X") | ||
plt.plot(time[0], total_torque_b[1], marker=".", c="green", label="Y") | ||
plt.plot(time[0], total_torque_b[2], marker=".", c="blue", label="Z") | ||
plt.title("Total torque @ Body frame") | ||
plt.xlabel("Time [s]") | ||
plt.ylabel("Torque [Nm]") | ||
plt.legend() | ||
|
||
# Data save | ||
if args.no_gui: | ||
plt.savefig(read_file_tag + "_disturbance_torque.png") # save last figure only | ||
else: | ||
plt.show() |
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
Oops, something went wrong.