From a2db2436cec063626a296292f01a99d31982610c Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:24:37 +0200 Subject: [PATCH 01/40] Fix typo in comments --- .../Applications/UserDefined/Power/power_switch_control.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_user/Applications/UserDefined/Power/power_switch_control.c b/src/src_user/Applications/UserDefined/Power/power_switch_control.c index fe71f832..d7e2a038 100644 --- a/src/src_user/Applications/UserDefined/Power/power_switch_control.c +++ b/src/src_user/Applications/UserDefined/Power/power_switch_control.c @@ -1,6 +1,6 @@ #pragma section REPRO /** -* @file power_switch_conrtol.c +* @file power_switch_control.c * @brief 電源操作アプリケーション */ @@ -86,7 +86,7 @@ static void APP_PSC_init_(void) APP_PSC_private_info_5v_[APP_PSC_5V_IDX_NANOSSOC_D60].port_list = PORT_CH_GPIO_OUT_POWER_SS; APP_PSC_private_info_5v_[APP_PSC_5V_IDX_MTQ_SEIREN].port_list = PORT_CH_GPIO_OUT_POWER_MTQ; - // unregurated power port list + // unregulated power port list APP_PSC_private_info_unreg_[APP_PSC_UNREG_IDX_STIM210].port_list = PORT_CH_GPIO_OUT_POWER_STIM; APP_PSC_private_info_unreg_[APP_PSC_UNREG_IDX_SAGITTA].port_list = PORT_CH_GPIO_OUT_POWER_SAGITTA; APP_PSC_private_info_unreg_[APP_PSC_UNREG_IDX_OEM7600].port_list = PORT_CH_GPIO_OUT_POWER_OEM; @@ -102,7 +102,7 @@ static void APP_PSC_init_(void) } APP_PSC_private_info_5v_[APP_PSC_5V_IDX_INA260].output_logic = APP_PSC_OUTPUT_LOGIC_NEGATIVE; - // unregurated output logic + // unregulated output logic for (uint8_t i = 0; i < APP_PSC_UNREG_IDX_MAX; i++) { APP_PSC_private_info_unreg_[i].output_logic = APP_PSC_OUTPUT_LOGIC_POSITIVE; From 6bbe572a12416fe00db66dc3c6a7d00593affc32 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:25:36 +0200 Subject: [PATCH 02/40] Fix typo in comments --- .../Applications/UserDefined/Cdh/non_volatile_memory_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h index ea9d9c4b..13fb1b5a 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_manager.h @@ -33,7 +33,7 @@ typedef enum } APP_NVM_MANAGER_ERROR; /** - * @struct APP_NVM_M Date: Sun, 13 Aug 2023 10:26:48 +0200 Subject: [PATCH 03/40] Fix typo for local variable --- .../UserDefined/Cdh/non_volatile_memory_parameter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c index 49d7e04b..e9106af6 100644 --- a/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c +++ b/src/src_user/Applications/UserDefined/Cdh/non_volatile_memory_parameter.c @@ -16,7 +16,7 @@ static NonVolatileMemoryParameter non_volatile_memory_parameter_; const NonVolatileMemoryParameter* const non_volatile_memory_parameter = &non_volatile_memory_parameter_; static uint8_t APP_NVM_PARAMETER_calc_data_size_(const APP_NVM_PARAM_TYPE data_type); -static APP_NVM_MANAGER_ERROR APP_NVM_PARAMETER_check_registration_(const APP_NVM_PARTITION_ID partion_id, +static APP_NVM_MANAGER_ERROR APP_NVM_PARAMETER_check_registration_(const APP_NVM_PARTITION_ID partition_id, const APP_NVM_PARAM_TYPE data_type, const uint32_t start_address, const uint8_t length); @@ -316,21 +316,21 @@ static uint8_t APP_NVM_PARAMETER_calc_data_size_(const APP_NVM_PARAM_TYPE data_t } } -static APP_NVM_MANAGER_ERROR APP_NVM_PARAMETER_check_registration_(const APP_NVM_PARTITION_ID partion_id, +static APP_NVM_MANAGER_ERROR APP_NVM_PARAMETER_check_registration_(const APP_NVM_PARTITION_ID partition_id, const APP_NVM_PARAM_TYPE data_type, const uint32_t start_address, const uint8_t length) { - if (partion_id >= APP_NVM_PARTITION_ID_MAX) return APP_NVM_MANAGER_ERROR_NG_OTHERS; + if (partition_id >= APP_NVM_PARTITION_ID_MAX) return APP_NVM_MANAGER_ERROR_NG_OTHERS; if (data_type >= APP_NVM_PARAM_TYPE_MAX) return APP_NVM_MANAGER_ERROR_NG_OTHERS; - if (start_address > non_volatile_memory_partition->elements[partion_id].size_byte) + if (start_address > non_volatile_memory_partition->elements[partition_id].size_byte) { return APP_NVM_MANAGER_ERROR_NG_ADDRESS; } uint8_t single_data_size = APP_NVM_PARAMETER_calc_data_size_(data_type); if (single_data_size == 0) return APP_NVM_MANAGER_ERROR_NG_LENGTH; uint32_t stop_address = start_address + single_data_size * length; - if (stop_address > non_volatile_memory_partition->elements[partion_id].size_byte) + if (stop_address > non_volatile_memory_partition->elements[partition_id].size_byte) { return APP_NVM_MANAGER_ERROR_NG_LENGTH; } From 9ade8357296b71e325accb9e577cb8f3a56069d8 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:28:28 +0200 Subject: [PATCH 04/40] Fix typo for local variable --- src/src_user/Applications/UserDefined/AOCS/aocs_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index b7146c26..f3896da3 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -503,9 +503,9 @@ AOCS_MANAGER_ERROR AOCS_MANAGER_set_sun_visibility(const AOCS_MANAGER_SUN_VISIBI return AOCS_MANAGER_ERROR_OK; } -AOCS_MANAGER_ERROR AOCS_MANAGER_set_stt_availability(const AOCS_MANAGER_STT_AVAILABILITY stt_availibility) +AOCS_MANAGER_ERROR AOCS_MANAGER_set_stt_availability(const AOCS_MANAGER_STT_AVAILABILITY stt_availability) { - aocs_manager_.stt_availability = stt_availibility; + aocs_manager_.stt_availability = stt_availability; return AOCS_MANAGER_ERROR_OK; } From e9a2093687a5bf997d30aa6e7d9c43bd42302ff0 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:30:37 +0200 Subject: [PATCH 05/40] Fix typo invisible --- .../HardwareDependent/SensorFilters/nanossoc_d60_filter.c | 2 +- .../AOCS/HardwareDependent/SensorFilters/oem7600_filter.c | 2 +- .../AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c | 2 +- .../HardwareDependent/SensorSelectors/sun_sensor_selector.c | 2 +- src/src_user/Applications/UserDefined/AOCS/aocs_manager.c | 4 ++-- src/src_user/Applications/UserDefined/AOCS/aocs_manager.h | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c index 0cdcb5e3..0ce899c4 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/nanossoc_d60_filter.c @@ -56,7 +56,7 @@ static void APP_NANOSSOC_D60_FILTER_exec_(void) { // 太陽センサのプレゼンスがない場合には,直近のプレゼンスに備え,伝播値をフィルタ過去値に反映 // 伝播値そのものに対してはフィルタ処理を実施しない - if (aocs_manager->sun_visibility == AOCS_MANAGER_SUN_INVISIBILE) + if (aocs_manager->sun_visibility == AOCS_MANAGER_SUN_INVISIBLE) { VECTOR3_copy(nanossoc_d60_filter_.sun_vec_est_body, aocs_manager->sun_vec_est_body); return; diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c index 83df6cb3..766f7154 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/oem7600_filter.c @@ -61,7 +61,7 @@ static void APP_OEM7600_FILTER_init_(void) static void APP_OEM7600_FILTER_exec_(void) { - if (aocs_manager->gps_visibility == AOCS_MANAGER_GPS_INVISIBILE) return; + if (aocs_manager->gps_visibility == AOCS_MANAGER_GPS_INVISIBLE) return; for (uint8_t axis_id = 0; axis_id < PHYSICAL_CONST_THREE_DIM; axis_id++) { diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c index f08c1205..331a473d 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/gpsr_selector.c @@ -49,7 +49,7 @@ static void APP_GPSR_SELECTOR_exec_(void) } else { - AOCS_MANAGER_set_gps_visibility(AOCS_MANAGER_GPS_INVISIBILE); + AOCS_MANAGER_set_gps_visibility(AOCS_MANAGER_GPS_INVISIBLE); } break; default: diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c index 1750cd5b..2098bd97 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c @@ -64,7 +64,7 @@ static void APP_SS_SELECTOR_exec_(void) if (APP_SS_SELECTOR_num_of_available_sun_sensor_ == 0) { // どのサンセンサからも太陽が見えていないときは,ひとまず最後の太陽方向ベクトルを保持するために,サンセンサセレクタからは太陽方向ベクトルの更新をしない - AOCS_MANAGER_set_sun_visibility(AOCS_MANAGER_SUN_INVISIBILE); + AOCS_MANAGER_set_sun_visibility(AOCS_MANAGER_SUN_INVISIBLE); return; } diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c index f3896da3..5f2b339e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.c @@ -119,8 +119,8 @@ static void APP_AOCS_MANAGER_init_(void) aocs_manager_.reference_jday = ORBIT_PARAMETERS_reference_jday; aocs_manager_.obct_diff_max_limit_s = 10.0f; // TODO_L : 可変にする?あまり必要なさそう。 // センサ状態 - aocs_manager_.sun_visibility = AOCS_MANAGER_SUN_INVISIBILE; - aocs_manager_.gps_visibility = AOCS_MANAGER_GPS_INVISIBILE; + aocs_manager_.sun_visibility = AOCS_MANAGER_SUN_INVISIBLE; + aocs_manager_.gps_visibility = AOCS_MANAGER_GPS_INVISIBLE; aocs_manager_.stt_availability = AOCS_MANAGER_STT_UNAVAILABLE; // 軌道 diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h index ff66e2db..65929694 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h @@ -48,7 +48,7 @@ typedef enum typedef enum { AOCS_MANAGER_SUN_VISIBLE = 0, //!< 少なくとも一つのサンセンサ情報から,太陽方向ベクトルが取れている状態 - AOCS_MANAGER_SUN_INVISIBILE //!< サンセンサから太陽方向ベクトルが取れないので,太陽方向ベクトルをダイナミクスによって伝搬する必要がある状態 + AOCS_MANAGER_SUN_INVISIBLE //!< サンセンサから太陽方向ベクトルが取れないので,太陽方向ベクトルをダイナミクスによって伝搬する必要がある状態 } AOCS_MANAGER_SUN_VISIBILITY; /** @@ -60,7 +60,7 @@ typedef enum typedef enum { AOCS_MANAGER_GPS_VISIBLE = 0, //!< 可視衛星数が十分な状態 - AOCS_MANAGER_GPS_INVISIBILE //!< 可視衛星数が不十分な状態 + AOCS_MANAGER_GPS_INVISIBLE //!< 可視衛星数が不十分な状態 } AOCS_MANAGER_GPS_VISIBILITY; /** From 76a15bdbf6f955732a744026b4575c76ba12750e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:31:38 +0200 Subject: [PATCH 06/40] Fix typo in comment --- src/src_user/Applications/UserDefined/AOCS/aocs_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h index 65929694..cf50efb6 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h @@ -39,7 +39,7 @@ typedef enum } AOCS_MANAGER_MTQ_OUTPUT_STATE; /** - * @enum AOCS_MANAGER_SUN_VISIVILITY + * @enum AOCS_MANAGER_SUN_VISIBILITY * @brief 太陽がサンセンサから見えているかどうか * @note 複数あるサンセンサの中で,どれか一つでも太陽方向ベクトルが取れていればVISIBLEとなる * @note サンセンサ選択アプリから,太陽方向ベクトルが取れていないことを太陽方向伝播アプリに伝えるために使う From dbb21aad66668ddc655595e9955bd90faab4b793 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:31:52 +0200 Subject: [PATCH 07/40] Fix typo in comment --- src/src_user/Applications/UserDefined/AOCS/aocs_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h index cf50efb6..591b10c5 100644 --- a/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h +++ b/src/src_user/Applications/UserDefined/AOCS/aocs_manager.h @@ -52,7 +52,7 @@ typedef enum } AOCS_MANAGER_SUN_VISIBILITY; /** - * @enum AOCS_MANAGER_GPS_VISIVILITY + * @enum AOCS_MANAGER_GPS_VISIBILITY * @brief GPSRの可視衛星数が十分 (=>4) 採れているか否か * @note 時刻決定やクロックドリフト推定の際にGPSR情報を用いるか否かの判定に利用 * @note uint8_tを想定 From 4e574b3d27a4d9bf13e6e1db1bdef92dfc2447c6 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:32:25 +0200 Subject: [PATCH 08/40] Fix local function name --- .../HardwareDependent/SensorSelectors/sun_sensor_selector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c index 2098bd97..60f33519 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/sun_sensor_selector.c @@ -35,7 +35,7 @@ static int APP_SS_SELECTOR_num_of_available_sun_sensor_; static void APP_SS_SELECTOR_init_(void); static void APP_SS_SELECTOR_exec_(void); -static APP_SS_SELECTOR_AVAILABLE APP_SS_SELECTOR_check_avarlability_(NANOSSOC_D60_IDX idx); +static APP_SS_SELECTOR_AVAILABLE APP_SS_SELECTOR_check_availability_(NANOSSOC_D60_IDX idx); static void APP_SS_SELECTOR_generate_available_list_(void); static void APP_SS_SELECTOR_fusion_(void); @@ -98,7 +98,7 @@ static void APP_SS_SELECTOR_generate_available_list_(void) for (int idx = 0; idx < NANOSSOC_D60_IDX_MAX; idx++) { - if (APP_SS_SELECTOR_check_avarlability_((NANOSSOC_D60_IDX)idx) == APP_SS_SELECTOR_AVAILABLE_OK) + if (APP_SS_SELECTOR_check_availability_((NANOSSOC_D60_IDX)idx) == APP_SS_SELECTOR_AVAILABLE_OK) { APP_SS_SELECTOR_available_sun_sensor_list_[APP_SS_SELECTOR_num_of_available_sun_sensor_] = (NANOSSOC_D60_IDX)idx; APP_SS_SELECTOR_num_of_available_sun_sensor_++; @@ -106,7 +106,7 @@ static void APP_SS_SELECTOR_generate_available_list_(void) } } -static APP_SS_SELECTOR_AVAILABLE APP_SS_SELECTOR_check_avarlability_(NANOSSOC_D60_IDX idx) +static APP_SS_SELECTOR_AVAILABLE APP_SS_SELECTOR_check_availability_(NANOSSOC_D60_IDX idx) { float sun_intensity_percent = nanossoc_d60_driver[idx]->info.sun_intensity_percent; From 6e201d73b1617fd2d5e54e6ed1e8937e55fac309 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:37:33 +0200 Subject: [PATCH 09/40] Fix typo in comment --- .../AOCS/TargetAttitude/target_attitude_from_orbit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c index 42bd445a..5a9c8974 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c @@ -48,7 +48,7 @@ static void APP_TAFO_calc_target_direction_vec_eci_(float target_direction_vec_e /** * @brief 目標方向チェック関数 * main,subの2目標方向が一致しているかどうか判定する - * @param[in] main_taregt : main目標 + * @param[in] main_target : main目標 * @param[in] sub_target : sub目標 * @return 0:不一致,1:一致 */ From d8bff45a185a9d8cd1db5e9a4c4f2c1bf47ca904 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:41:54 +0200 Subject: [PATCH 10/40] Add TODO for major update typo fix --- .../AOCS/TargetAttitude/target_attitude_from_orbit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h index ce21b374..feaeffa9 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.h @@ -12,7 +12,7 @@ #include /** - * @enum APP_TAFO_TARGET_DIRECITON + * @enum APP_TAFO_TARGET_DIRECITON TODO Fix typo (This will be major update) * @brief 機体座標系の特定軸を向ける方向を指定する * @note uint8_tを想定 */ From 4194d5dee70893999772fb026d226d5d1831eaea Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:42:15 +0200 Subject: [PATCH 11/40] Fix typo for local variable --- .../AOCS/TargetAttitude/target_attitude_from_orbit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c index 5a9c8974..4065f7d5 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c @@ -245,7 +245,7 @@ static void APP_TAFO_calc_target_direction_vec_eci_(float target_direction_vec_e float float_sat_pos_est_eci_m[PHYSICAL_CONST_THREE_DIM]; float float_sat_vel_est_eci_m_s[PHYSICAL_CONST_THREE_DIM]; float orbit_normal_vec[PHYSICAL_CONST_THREE_DIM]; - float orbit_noraml_vec_est_eci_normalized[PHYSICAL_CONST_THREE_DIM]; + float orbit_normal_vec_est_eci_normalized[PHYSICAL_CONST_THREE_DIM]; for (int idx = 0; idx < PHYSICAL_CONST_THREE_DIM; idx++) { @@ -253,8 +253,8 @@ static void APP_TAFO_calc_target_direction_vec_eci_(float target_direction_vec_e float_sat_vel_est_eci_m_s[idx] = (float)aocs_manager->sat_vel_est_eci_m_s[idx]; } VECTOR3_outer_product(orbit_normal_vec, float_sat_pos_est_eci_m, float_sat_vel_est_eci_m_s); - VECTOR3_normalize(orbit_noraml_vec_est_eci_normalized, orbit_normal_vec); - VECTOR3_copy(target_direction_vec_eci_normalized, orbit_noraml_vec_est_eci_normalized); + VECTOR3_normalize(orbit_normal_vec_est_eci_normalized, orbit_normal_vec); + VECTOR3_copy(target_direction_vec_eci_normalized, orbit_normal_vec_est_eci_normalized); break; } default: From cabaf5afdcd1820ebe2c8aa16be42ceac223f7b3 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:43:41 +0200 Subject: [PATCH 12/40] Fix typo for local variable --- .../AOCS/TargetAttitude/target_attitude_from_orbit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c index 4065f7d5..34bc2b21 100644 --- a/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c +++ b/src/src_user/Applications/UserDefined/AOCS/TargetAttitude/target_attitude_from_orbit.c @@ -301,9 +301,9 @@ CCP_CmdRet Cmd_APP_TAFO_SET_MAIN_TARGET_DIRECTION(const CommonCmdPacket* packet) } // main_target_directionとsub_target_directionが一致するのを禁止 - uint8_t is_target_direcition_same = APP_TAFO_check_is_target_direction_same_((APP_TAFO_TARGET_DIRECITON)main_target_direction, + uint8_t is_target_direction_same = APP_TAFO_check_is_target_direction_same_((APP_TAFO_TARGET_DIRECITON)main_target_direction, target_attitude_from_orbit_.sub_target_direction); - if (is_target_direcition_same) + if (is_target_direction_same) { return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } @@ -347,9 +347,9 @@ CCP_CmdRet Cmd_APP_TAFO_SET_SUB_TARGET_DIRECTION(const CommonCmdPacket* packet) } // main_target_directionとsub_target_directionが一致するのを禁止 - uint8_t is_target_direcition_same = APP_TAFO_check_is_target_direction_same_(target_attitude_from_orbit_.main_target_direction, + uint8_t is_target_direction_same = APP_TAFO_check_is_target_direction_same_(target_attitude_from_orbit_.main_target_direction, (APP_TAFO_TARGET_DIRECITON)sub_target_direction); - if (is_target_direcition_same) + if (is_target_direction_same) { return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } @@ -430,9 +430,9 @@ CCP_CmdRet Cmd_APP_TAFO_ENABLE(const CommonCmdPacket* packet) // main_target_directionとsub_target_directionが一致しているとき, // is_enabledの有効化を禁止 - uint8_t is_target_direcition_same = APP_TAFO_check_is_target_direction_same_(target_attitude_from_orbit_.main_target_direction, + uint8_t is_target_direction_same = APP_TAFO_check_is_target_direction_same_(target_attitude_from_orbit_.main_target_direction, target_attitude_from_orbit_.sub_target_direction); - if (is_target_direcition_same) + if (is_target_direction_same) { return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } From 435d0235506a109c004e8e577a4b7a91623ff822 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:45:22 +0200 Subject: [PATCH 13/40] Remove unnecessary comment --- .../UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c index 7bda2c8d..5cf08d71 100644 --- a/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c +++ b/src/src_user/Applications/UserDefined/AOCS/OrbitEstimation/gpsr_orbit_propagator.c @@ -41,7 +41,6 @@ static void APP_GPSROP_init_(void) { memset(&gpsr_orbit_propagator_, 0x00, sizeof(GpsrOrbitPropagator)); - // ひとまず初期値はS2E_ISSL6U_AOCSの軌道設定に合わせる gpsr_orbit_propagator_.orbital_elements.semi_major_axis_km = ORBIT_PARAMETERS_gpsr_semi_major_axis_km; gpsr_orbit_propagator_.orbital_elements.eccentricity = ORBIT_PARAMETERS_gpsr_eccentricity; gpsr_orbit_propagator_.orbital_elements.inclination_rad = ORBIT_PARAMETERS_gpsr_inclination_rad; From 455ec50afaeff45f1cfaea7985a6a347e97d8b8a Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:47:35 +0200 Subject: [PATCH 14/40] Fix public variable typo --- .../AOCS/InertialReference/inertial_geomag_calculator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c index c3472141..61020d24 100644 --- a/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c +++ b/src/src_user/Applications/UserDefined/AOCS/InertialReference/inertial_geomag_calculator.c @@ -14,8 +14,8 @@ #include -static InertialGeomagCalculator inertial_geomag_calulator_; -const InertialGeomagCalculator* const inertial_geomag_calulator = &inertial_geomag_calulator_; +static InertialGeomagCalculator inertial_geomag_calculator_; +const InertialGeomagCalculator* const inertial_geomag_calculator = &inertial_geomag_calculator_; static void APP_GEOMAG_ECI_CALC_init_(void); static void APP_GEOMAG_ECI_CALC_exec_(void); @@ -29,7 +29,7 @@ AppInfo APP_GEOMAG_ECI_CALC_create_app(void) static void APP_GEOMAG_ECI_CALC_init_(void) { - inertial_geomag_calulator_.calc_order = 13; + inertial_geomag_calculator_.calc_order = 13; return; } @@ -41,7 +41,7 @@ static void APP_GEOMAG_ECI_CALC_exec_(void) float mag_i_nT_temp[PHYSICAL_CONST_THREE_DIM]; C2A_MATH_ERROR error = GEOMAGNETISM_calc_igrf(mag_i_nT_temp, - inertial_geomag_calulator_.calc_order, + inertial_geomag_calculator_.calc_order, aocs_manager->reference_jday, dcm_ecef2eci, aocs_manager->sat_pos_est_lla_rad_m); From 0bf55608c04b846d5eb257de0b6a4bd7fe746045 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:48:15 +0200 Subject: [PATCH 15/40] Fix typo in comment --- .../HardwareDependent/SensorSelectors/magnetometer_selector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h index 900b84d1..a5c020f2 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorSelectors/magnetometer_selector.h @@ -24,7 +24,7 @@ typedef enum } APP_MAG_SELECTOR_STATE; /** - * @struct MagnetmeterSelector + * @struct MagnetometerSelector * @brief 磁気センサ統合に関する外部公開情報用構造体 */ typedef struct From 0b6324ddb11cf39050b369c748689fd432a7b81d Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:50:24 +0200 Subject: [PATCH 16/40] Fix typo for local variables --- .../SensorFilters/mpu9250_filter.c | 18 +++++++++--------- .../SensorFilters/rm3100_filter.c | 18 +++++++++--------- .../SensorFilters/stim210_filter.c | 14 +++++++------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c index c47c0373..48c7ff38 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/mpu9250_filter.c @@ -317,33 +317,33 @@ CCP_CmdRet Cmd_APP_MPU9250_FILTER_SET_SPIKE_FILTER_PARAM(const CommonCmdPacket* if (axis_id >= PHYSICAL_CONST_THREE_DIM) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); read_out_offset++; - SpikeFilter_Config config_recieved; - config_recieved.count_limit_to_accept = param[read_out_offset]; + SpikeFilter_Config config_received; + config_received.count_limit_to_accept = param[read_out_offset]; read_out_offset++; - config_recieved.count_limit_to_reject_continued_warning = param[read_out_offset]; + config_received.count_limit_to_reject_continued_warning = param[read_out_offset]; read_out_offset++; float reject_threshold_float; ENDIAN_memcpy(&reject_threshold_float, param + read_out_offset, sizeof(float)); if (reject_threshold_float < 0.0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - config_recieved.reject_threshold = (double)(reject_threshold_float); + config_received.reject_threshold = (double)(reject_threshold_float); read_out_offset += sizeof(float); float amplitude_limit_to_accept_as_step_float; ENDIAN_memcpy(&litude_limit_to_accept_as_step_float, param + read_out_offset, sizeof(float)); if (amplitude_limit_to_accept_as_step_float < 0.0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - config_recieved.amplitude_limit_to_accept_as_step = (double)(amplitude_limit_to_accept_as_step_float); + config_received.amplitude_limit_to_accept_as_step = (double)(amplitude_limit_to_accept_as_step_float); C2A_MATH_ERROR init_error; switch (sensor_id) { case MPU9250_FILTER_SENSOR_ID_MAG: - init_error = SPIKE_FILTER_init(&APP_MPU9250_FILTER_spike_mag_[axis_id], config_recieved); + init_error = SPIKE_FILTER_init(&APP_MPU9250_FILTER_spike_mag_[axis_id], config_received); if (init_error == C2A_MATH_ERROR_OK) { - mpu9250_filter_.spike_filter_config_mag[axis_id] = config_recieved; + mpu9250_filter_.spike_filter_config_mag[axis_id] = config_received; return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } else @@ -352,11 +352,11 @@ CCP_CmdRet Cmd_APP_MPU9250_FILTER_SET_SPIKE_FILTER_PARAM(const CommonCmdPacket* } break; case MPU9250_FILTER_SENSOR_ID_GYRO: - init_error = SPIKE_FILTER_init(&APP_MPU9250_FILTER_spike_gyro_[axis_id], config_recieved); + init_error = SPIKE_FILTER_init(&APP_MPU9250_FILTER_spike_gyro_[axis_id], config_received); if (init_error == C2A_MATH_ERROR_OK) { - mpu9250_filter_.spike_filter_config_gyro[axis_id] = config_recieved; + mpu9250_filter_.spike_filter_config_gyro[axis_id] = config_received; return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } else diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c index 62bcb90b..495c5ec8 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/rm3100_filter.c @@ -261,46 +261,46 @@ CCP_CmdRet Cmd_APP_RM3100_FILTER_SET_SPIKE_FILTER_PARAM(const CommonCmdPacket* p if (axis_id >= PHYSICAL_CONST_THREE_DIM) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); read_out_offset++; - SpikeFilter_Config config_recieved; - config_recieved.count_limit_to_accept = param[read_out_offset]; + SpikeFilter_Config config_received; + config_received.count_limit_to_accept = param[read_out_offset]; read_out_offset++; - config_recieved.count_limit_to_reject_continued_warning = param[read_out_offset]; + config_received.count_limit_to_reject_continued_warning = param[read_out_offset]; read_out_offset++; float reject_threshold_float; ENDIAN_memcpy(&reject_threshold_float, param + read_out_offset, sizeof(float)); if (reject_threshold_float < 0.0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - config_recieved.reject_threshold = (double)(reject_threshold_float); + config_received.reject_threshold = (double)(reject_threshold_float); read_out_offset += sizeof(float); float amplitude_limit_to_accept_as_step_float; ENDIAN_memcpy(&litude_limit_to_accept_as_step_float, param + read_out_offset, sizeof(float)); if (amplitude_limit_to_accept_as_step_float < 0.0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - config_recieved.amplitude_limit_to_accept_as_step = (double)(amplitude_limit_to_accept_as_step_float); + config_received.amplitude_limit_to_accept_as_step = (double)(amplitude_limit_to_accept_as_step_float); C2A_MATH_ERROR init_error; switch (rm3100_id) { case RM3100_IDX_ON_AOBC: init_error = SPIKE_FILTER_init(&APP_RM3100_FILTER_spike_[RM3100_IDX_ON_AOBC][axis_id], - config_recieved); + config_received); if (init_error != C2A_MATH_ERROR_OK) { return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - rm3100_filter_.spike_filter_config[RM3100_IDX_ON_AOBC][axis_id] = config_recieved; + rm3100_filter_.spike_filter_config[RM3100_IDX_ON_AOBC][axis_id] = config_received; return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case RM3100_IDX_EXTERNAL: init_error = SPIKE_FILTER_init(&APP_RM3100_FILTER_spike_[RM3100_IDX_EXTERNAL][axis_id], - config_recieved); + config_received); if (init_error != C2A_MATH_ERROR_OK) { return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - rm3100_filter_.spike_filter_config[RM3100_IDX_EXTERNAL][axis_id] = config_recieved; + rm3100_filter_.spike_filter_config[RM3100_IDX_EXTERNAL][axis_id] = config_received; return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); default: return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c index d717f70d..2876a4f0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c @@ -199,30 +199,30 @@ CCP_CmdRet Cmd_APP_STIM210_FILTER_SET_SPIKE_FILTER_PARAM(const CommonCmdPacket* if (axis_id >= PHYSICAL_CONST_THREE_DIM) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); read_out_offset++; - SpikeFilter_Config config_recieved; - config_recieved.count_limit_to_accept = param[read_out_offset]; + SpikeFilter_Config config_received; + config_received.count_limit_to_accept = param[read_out_offset]; read_out_offset++; - config_recieved.count_limit_to_reject_continued_warning = param[read_out_offset]; + config_received.count_limit_to_reject_continued_warning = param[read_out_offset]; read_out_offset++; float reject_threshold_float; ENDIAN_memcpy(&reject_threshold_float, param + read_out_offset, sizeof(float)); if (reject_threshold_float < 0.0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - config_recieved.reject_threshold = (double)(reject_threshold_float); + config_received.reject_threshold = (double)(reject_threshold_float); read_out_offset += sizeof(float); float amplitude_limit_to_accept_as_step_float; ENDIAN_memcpy(&litude_limit_to_accept_as_step_float, param + read_out_offset, sizeof(float)); if (amplitude_limit_to_accept_as_step_float < 0.0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - config_recieved.amplitude_limit_to_accept_as_step = (double)(amplitude_limit_to_accept_as_step_float); + config_received.amplitude_limit_to_accept_as_step = (double)(amplitude_limit_to_accept_as_step_float); C2A_MATH_ERROR init_error; - init_error = SPIKE_FILTER_init(&APP_STIM210_FILTER_spike_[axis_id], config_recieved); + init_error = SPIKE_FILTER_init(&APP_STIM210_FILTER_spike_[axis_id], config_received); if (init_error == C2A_MATH_ERROR_OK) { - stim210_filter_.spike_filter_config[axis_id] = config_recieved; + stim210_filter_.spike_filter_config[axis_id] = config_received; CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } else From e653ad6e3655ba9d625fda54eb1a5a7bd60a4721 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:50:39 +0200 Subject: [PATCH 17/40] Fix typo in comment --- .../AOCS/HardwareDependent/SensorFilters/stim210_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c index 2876a4f0..dc94dcd0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/SensorFilters/stim210_filter.c @@ -35,7 +35,7 @@ AppInfo APP_STIM210_FILTER_create_app(void) static void APP_STIM210_FILTER_init_(void) { // same sampling frequency is applied to all filters - // (since the frequency must be coincide with the call interval of this apllication) + // (since the frequency must be coincide with the call interval of this application) stim210_filter_.sampling_freq_Hz = 10.0f; int z_filter_init_result = APP_STIM210_FILTER_init_z_filter_(); From 590f3facfcde8dad5606fa1ffa4e92e4880ec6f1 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:51:14 +0200 Subject: [PATCH 18/40] Fix typo in comment --- .../ActuatorControllers/mtq_seiren_controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c index 0221786d..7f0ab09e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c +++ b/src/src_user/Applications/UserDefined/AOCS/HardwareDependent/ActuatorControllers/mtq_seiren_controller.c @@ -24,7 +24,7 @@ static MtqSeirenController mtq_seiren_controller_; const MtqSeirenController* const mtq_seiren_controller = &mtq_seiren_controller_; -//!< 元のcase文仕様に伴って生じる,MTQoff期間の余分な長さ [msec] +//!< 元のcase文仕様に伴って生じる,MTQ off期間の余分な長さ [msec] static const uint32_t APP_MTQ_SEIREN_CONTROLLER_kDelayForMTQStopExec_ms_ = 100; static void APP_MTQ_SEIREN_CONTROLLER_init_(void); @@ -76,7 +76,7 @@ static void APP_MTQ_SEIREN_CONTROLLER_wait_for_demagnitization_(void); * @brief MTQ出力磁気モーメント実効値clip関数 * @param[out] clipped_mag_moment_cmd_Am2s : clip後のMTQ駆動/消磁の合計インターバルの間に出力できる磁気モーメント積算値 [Am^2sec] * @param[in] mag_moment_cmd_Am2 : clip前の磁気モーメント出力指令値 [Am^2] - * @note MTQ_SEIREN_CONTROLLERアプリ内でMTQ駆動/消磁の比率とPWMduty比の計算が混ざって同じものとして計算されてしまっている + * @note MTQ_SEIREN_CONTROLLERアプリ内でMTQ駆動/消磁の比率とPWM duty比の計算が混ざって同じものとして計算されてしまっている * @note このことへの対処として,MTQ駆動/消磁の合計インターバルに対する駆動時間の比率を使って最大MTQ駆動可能量を補正した上でclipする */ static void APP_MTQ_SEIREN_CONTROLLER_clip_mtq_out_Am2s_(float clipped_mag_moment_cmd_Am2s[PHYSICAL_CONST_THREE_DIM], From c14dd26c249f0ebde893cbdf0aa00638d1601543 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:53:52 +0200 Subject: [PATCH 19/40] Fix typo local variables --- .../UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c index 2642f195..dc32e04b 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c @@ -106,7 +106,7 @@ typedef enum APP_STT_GYRO_EKF_STT_STATUS_NG //!< STTからQuaternionが更新されていない } APP_STT_GYRO_EKF_STT_STATUS; -static const float APP_STT_GYRO_EKF_kAccceptableMaxTimeStepSec_ = 1.0f; //!< 時間刻みがこれより大きい場合フィルタ計算をスキップ +static const float APP_STT_GYRO_EKF_kAcceptableMaxTimeStepSec_ = 1.0f; //!< 時間刻みがこれより大きい場合フィルタ計算をスキップ static const float APP_STT_GYRO_EKF_kComputationCycle_ = 0.1f; //!< EKFアプリの計算周期.タスクリストでの実行頻度と合わせること static float APP_STT_GYRO_EKF_rate_bias_propagation_coefficient_; //!< レートバイアス伝搬の漸化式の係数.計算速度のために固定値. static CalculationTime APP_STT_GYRO_EKF_calculation_time_; @@ -305,7 +305,7 @@ static void APP_STT_GYRO_EKF_exec_(void) void APP_STT_GYRO_EKF_execute_estimation(float time_step_s) { - if (time_step_s > APP_STT_GYRO_EKF_kAccceptableMaxTimeStepSec_) + if (time_step_s > APP_STT_GYRO_EKF_kAcceptableMaxTimeStepSec_) { // フィルタ計算を回し始めた初回や,別のモードに遷移したあと戻ってきた初回などは,time_step_sが大きな値になっている. // これらのケースでは,状態変数や推定結果に,ある程度正しい値を入れて初期化しておく. From a9f75a69dcb50f054847b5c67db93954094cc3f8 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:55:08 +0200 Subject: [PATCH 20/40] Fix typo local variables --- .../AOCS/AttitudeDetermination/stt_gyro_ekf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c index dc32e04b..8c36ecf0 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c @@ -729,14 +729,14 @@ CCP_CmdRet Cmd_STT_GYRO_EKF_SET_INITIAL_COVARIANCE_MATRIX(const CommonCmdPacket* size_t arg_num; for (arg_num = 0; arg_num < PHYSICAL_CONST_THREE_DIM; arg_num++) { - float initial_covarinace_upper_diagonal_component = CCP_get_param_from_packet(packet, arg_num, float); - if (initial_covarinace_upper_diagonal_component < 0.0f) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - stt_gyro_ekf_.initial_covariance.diagonal_component_stt[arg_num] = initial_covarinace_upper_diagonal_component; + float initial_covariance_upper_diagonal_component = CCP_get_param_from_packet(packet, arg_num, float); + if (initial_covariance_upper_diagonal_component < 0.0f) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + stt_gyro_ekf_.initial_covariance.diagonal_component_stt[arg_num] = initial_covariance_upper_diagonal_component; } - float initial_covarinace_lower_diagonal_component = CCP_get_param_from_packet(packet, arg_num, float); - if (initial_covarinace_lower_diagonal_component < 0.0f) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); - stt_gyro_ekf_.initial_covariance.diagonal_component_gyro = initial_covarinace_lower_diagonal_component; + float initial_covariance_lower_diagonal_component = CCP_get_param_from_packet(packet, arg_num, float); + if (initial_covariance_lower_diagonal_component < 0.0f) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + stt_gyro_ekf_.initial_covariance.diagonal_component_gyro = initial_covariance_lower_diagonal_component; return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } From 5b842c37c6de83e2f6384aaced5402225ec15751 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:55:18 +0200 Subject: [PATCH 21/40] Fix typo in comment --- .../AOCS/AttitudeDetermination/sun_vector_propagator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h index 79a527bb..2cf97e51 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/sun_vector_propagator.h @@ -1,5 +1,5 @@ /** -* @file sun_vecor_propagator.h +* @file sun_vector_propagator.h * @brief 太陽方向ベクトル伝搬アプリ * * 最後にサンセンサによって太陽方向が取れた時の姿勢を基準姿勢とする.基準姿勢から今の姿勢への変換クオータニオンを計算し,それを使って今の太陽方向ベクトルを計算する. From b858ed554534a6f3468fb12d09ae0ae44080c540 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 10:58:59 +0200 Subject: [PATCH 22/40] Fix typo in MAtrix library --- .../AOCS/AttitudeDetermination/stt_gyro_ekf.c | 10 +++++----- .../AOCS/AttitudeDetermination/stt_gyro_ekf.h | 2 +- src/src_user/Library/matrix_definition.h | 2 +- src/src_user/Library/matrix_user_settings.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c index 8c36ecf0..db9d867c 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.c @@ -23,11 +23,11 @@ // Satellite parameters #include -MATRIX_DEFINE_MATRIX_SRTUCT(6, 3, float); -MATRIX_DEFINE_MATRIX_SRTUCT(6, 1, float); -MATRIX_DEFINE_MATRIX_SRTUCT(3, 6, float); -MATRIX_DEFINE_MATRIX_SRTUCT(3, 3, float); -MATRIX_DEFINE_MATRIX_SRTUCT(3, 1, float); +MATRIX_DEFINE_MATRIX_STRUCT(6, 3, float); +MATRIX_DEFINE_MATRIX_STRUCT(6, 1, float); +MATRIX_DEFINE_MATRIX_STRUCT(3, 6, float); +MATRIX_DEFINE_MATRIX_STRUCT(3, 3, float); +MATRIX_DEFINE_MATRIX_STRUCT(3, 1, float); static SttGyroEkf stt_gyro_ekf_; const SttGyroEkf* const stt_gyro_ekf = &stt_gyro_ekf_; diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h index 81b0c080..8ce14335 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeDetermination/stt_gyro_ekf.h @@ -12,7 +12,7 @@ #include #include -MATRIX_DEFINE_MATRIX_SRTUCT(6, 6, float); +MATRIX_DEFINE_MATRIX_STRUCT(6, 6, float); /** * @struct EstimatedResult diff --git a/src/src_user/Library/matrix_definition.h b/src/src_user/Library/matrix_definition.h index be5b5e60..e36834c1 100644 --- a/src/src_user/Library/matrix_definition.h +++ b/src/src_user/Library/matrix_definition.h @@ -38,7 +38,7 @@ typedef struct #define MATRIX_T(row, col, type) MATRIX_T_INNER(row, col, type) //!< 各行列演算関数の返り値型定義マクロ #define MATRIX_TYPE_MEMBER(type) MATRIX_TYPE_ ## type //!< 型とMATRIX_TYPE enumの変換マクロ -#define MATRIX_DEFINE_MATRIX_SRTUCT(row, col, type) \ +#define MATRIX_DEFINE_MATRIX_STRUCT(row, col, type) \ typedef struct \ { \ MATRIX_Parameter parameter; \ diff --git a/src/src_user/Library/matrix_user_settings.h b/src/src_user/Library/matrix_user_settings.h index 4288e690..bd622cf1 100644 --- a/src/src_user/Library/matrix_user_settings.h +++ b/src/src_user/Library/matrix_user_settings.h @@ -16,6 +16,6 @@ #define MATRIX_MAX_COL 14 //!< 行列型に許容する最大の列数 (NOTE:逆行列計算で掃き出し法を用いるため列数は行数の2倍必要) -MATRIX_DEFINE_MATRIX_SRTUCT(MATRIX_MAX_ROW, MATRIX_MAX_COL, double); //!< 最大サイズの行列.行列計算時の中間変数として用いる +MATRIX_DEFINE_MATRIX_STRUCT(MATRIX_MAX_ROW, MATRIX_MAX_COL, double); //!< 最大サイズの行列.行列計算時の中間変数として用いる #endif From 6cdb30ca6ba5e23319a25a5290bcaf0daa4da9d7 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:00:21 +0200 Subject: [PATCH 23/40] Fix typo in local function --- .../Applications/UserDefined/AOCS/AttitudeControl/bdot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c index 8f2bf312..67eb6b2d 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/bdot.c @@ -47,7 +47,7 @@ static AOCS_ERROR APP_BDOT_calculate_mag_vec_time_derivative_(void); * @return void * @note MTQの出力がOFFのときに呼び出され,MTQの出力をONにする役割を持つ */ -static void APP_BDOT_cauculate_target_mtq_output_(void); +static void APP_BDOT_calculate_target_mtq_output_(void); /** * @brief MTQ目標磁気モーメント維持関数 @@ -92,7 +92,7 @@ void APP_BDOT_exec_(void) switch (aocs_manager->mtq_output_state) { case AOCS_MANAGER_MTQ_OUTPUT_STATE_OFF: - APP_BDOT_cauculate_target_mtq_output_(); + APP_BDOT_calculate_target_mtq_output_(); break; case AOCS_MANAGER_MTQ_OUTPUT_STATE_ON: APP_BDOT_maintain_mtq_output_(); @@ -106,7 +106,7 @@ void APP_BDOT_exec_(void) } } -void APP_BDOT_cauculate_target_mtq_output_(void) +void APP_BDOT_calculate_target_mtq_output_(void) { AOCS_ERROR ret; ret = APP_BDOT_calculate_mag_vec_time_derivative_(); From fead37d4c3318575c101b4571b8630b9688df504 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:01:00 +0200 Subject: [PATCH 24/40] Fix typo in coment --- .../Applications/UserDefined/AOCS/AttitudeControl/unloading.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c index e1e03b96..e38bc32e 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.c @@ -74,7 +74,7 @@ void APP_UNLOADING_exec_(void) APP_UNLOADING_update_unloading_state_(); APP_UNLOADING_calc_output_torque(); - // アンローディング処理がenableになっているときのみ,出力目標トルクをAOCS Manegerにセットする + // アンローディング処理がenableになっているときのみ,出力目標トルクをAOCS Managerにセットする // disableのときは,出力目標トルクのセットはしないが,トルク計算自体はcalc_torque_outputで行われている. if (unloading_.exec_is_enable == APP_UNLOADING_EXEC_ENABLE) { From 4576f2cb4af2d6b4484c3c2660cc3fedea7a2c72 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:02:57 +0200 Subject: [PATCH 25/40] Fix typo in comment --- src/src_user/Applications/DriverInstances/di_mpu9250.c | 2 -- .../Applications/UserDefined/AOCS/AttitudeControl/unloading.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_mpu9250.c b/src/src_user/Applications/DriverInstances/di_mpu9250.c index be343d2e..12df6af8 100644 --- a/src/src_user/Applications/DriverInstances/di_mpu9250.c +++ b/src/src_user/Applications/DriverInstances/di_mpu9250.c @@ -103,8 +103,6 @@ static void DI_MPU9250_init_(void) // 温度補正 const float kRangeLow = MPU9250_PARAMETERS_temperature_range_low_degC; const float kRangeHigh = MPU9250_PARAMETERS_temperature_range_high_degC; - // 切片は実機計測値、切片はOPT-1, RWASATでの測定値を利用 - // 特にSFは小さいのでなしとする // SF,バイアスは y = SF*x - BIASという式を想定 // X軸 ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_bias_compo_rad_s[0]), diff --git a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h index c4191f9c..614c90a5 100644 --- a/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h +++ b/src/src_user/Applications/UserDefined/AOCS/AttitudeControl/unloading.h @@ -65,7 +65,7 @@ extern const Unloading* const unloading; AppInfo APP_UNLOADING_create_app(void); CCP_CmdRet Cmd_APP_UNLOADING_SET_ENABLE(const CommonCmdPacket* packet); -CCP_CmdRet Cmd_APP_UNLOADING_SET_ANGULAR_VEROCITY_THRESHOLD(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_APP_UNLOADING_SET_ANGULAR_VEROCITY_THRESHOLD(const CommonCmdPacket* packet); // TODO Fix typo (major update) CCP_CmdRet Cmd_APP_UNLOADING_SET_CONTROL_GAIN(const CommonCmdPacket* packet); From 312cf2638704c945c0a284c9392fd24c8375b285 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:03:36 +0200 Subject: [PATCH 26/40] Fix typo in local function --- src/src_user/Applications/DriverInstances/di_mpu9250.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_mpu9250.c b/src/src_user/Applications/DriverInstances/di_mpu9250.c index 12df6af8..f2835382 100644 --- a/src/src_user/Applications/DriverInstances/di_mpu9250.c +++ b/src/src_user/Applications/DriverInstances/di_mpu9250.c @@ -19,7 +19,7 @@ static void DI_MPU9250_init_(void); static void DI_MPU9250_update_(void); -static void DI_MPU9250_temperature_caliblation_(void); +static void DI_MPU9250_temperature_calibration_(void); static MPU9250_Driver mpu9250_driver_[MPU9250_IDX_MAX]; const MPU9250_Driver* const mpu9250_driver[MPU9250_IDX_MAX] = {&mpu9250_driver_[MPU9250_IDX_ON_AOBC]}; @@ -108,7 +108,7 @@ static void DI_MPU9250_init_(void) ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_bias_compo_rad_s[0]), MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_bias_coeff_compo_x, kRangeLow, kRangeHigh); - if (ret3 < 0) Printf("MPU9250 Gyro-X Bias Temperature Caliblation init Failed ! \n"); + if (ret3 < 0) Printf("MPU9250 Gyro-X Bias Temperature Calibration init Failed ! \n"); ret3 = POLYNOMIAL_APPROX_initialize(&(di_mpu9250_[MPU9250_IDX_ON_AOBC].gyro_scale_factor_compo[0]), MPU9250_PARAMETERS_kNumCoeffTempCalib, MPU9250_PARAMETERS_scale_factor_coeff_compo_x, @@ -158,12 +158,12 @@ static void DI_MPU9250_update_(void) EL_record_event(EL_GROUP_TLM_ERROR_MPU9250, (uint32_t)MPU9250_IDX_ON_AOBC, EL_ERROR_LEVEL_HIGH, (uint32_t)ret); } - DI_MPU9250_temperature_caliblation_(); + DI_MPU9250_temperature_calibration_(); } return; } -static void DI_MPU9250_temperature_caliblation_(void) +static void DI_MPU9250_temperature_calibration_(void) { for (int mpu_idx = 0; mpu_idx < MPU9250_IDX_MAX; mpu_idx++) { From ac3c910d686172d06d1329ef7924a9ca8286d825 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:05:16 +0200 Subject: [PATCH 27/40] Fix typo in local function --- .../Applications/DriverInstances/di_stim210.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/src_user/Applications/DriverInstances/di_stim210.c b/src/src_user/Applications/DriverInstances/di_stim210.c index 2ddc57d6..048f1ef0 100644 --- a/src/src_user/Applications/DriverInstances/di_stim210.c +++ b/src/src_user/Applications/DriverInstances/di_stim210.c @@ -19,7 +19,7 @@ static void DI_STIM210_init_(void); static void DI_STIM210_update_(void); -static void DI_STIM210_temperature_caliblation_(void); +static void DI_STIM210_temperature_calibration_(void); static STIM210_Driver stim210_driver_[STIM210_IDX_MAX]; const STIM210_Driver* const stim210_driver[STIM210_IDX_MAX] = {&stim210_driver_[STIM210_IDX_IN_UNIT]}; @@ -83,26 +83,26 @@ static void DI_STIM210_init_(void) // X軸 ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].bias_compo_rad_s[0]), STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_bias_coeff_compo_x, kRangeLow, kRangeHigh); - if (ret < 0) Printf("STIM210 Gyro-X Bias Temperature Caliblation init Failed ! \n"); + if (ret < 0) Printf("STIM210 Gyro-X Bias Temperature Calibration init Failed ! \n"); ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].scale_factor_compo[0]), STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_scale_factor_coeff_compo_x, kRangeLow, kRangeHigh); - if (ret < 0) Printf("STIM210 Gyro-X SF Temperature Caliblation init Failed ! \n"); + if (ret < 0) Printf("STIM210 Gyro-X SF Temperature Calibration init Failed ! \n"); // Y軸 ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].bias_compo_rad_s[1]), STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_bias_coeff_compo_y, kRangeLow, kRangeHigh); - if (ret < 0) Printf("STIM210 Gyro-Y Bias Temperature Caliblation init Failed ! \n"); + if (ret < 0) Printf("STIM210 Gyro-Y Bias Temperature Calibration init Failed ! \n"); ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].scale_factor_compo[1]), STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_scale_factor_coeff_compo_y, kRangeLow, kRangeHigh); - if (ret < 0) Printf("STIM210 Gyro-Y SF Temperature Caliblation init Failed ! \n"); + if (ret < 0) Printf("STIM210 Gyro-Y SF Temperature Calibration init Failed ! \n"); // Z軸 ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].bias_compo_rad_s[2]), STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_bias_coeff_compo_z, kRangeLow, kRangeHigh); - if (ret < 0) Printf("STIM210 Gyro-Z Bias Temperature Caliblation init Failed ! \n"); + if (ret < 0) Printf("STIM210 Gyro-Z Bias Temperature Calibration init Failed ! \n"); ret = POLYNOMIAL_APPROX_initialize(&(di_stim210_[STIM210_IDX_IN_UNIT].scale_factor_compo[2]), STIM210_PARAMETERS_kNumCoeffTempCalib, STIM210_PARAMETERS_scale_factor_coeff_compo_z, kRangeLow, kRangeHigh); - if (ret < 0) Printf("STIM210 Gyro-Z SF Temperature Caliblation init Failed ! \n"); + if (ret < 0) Printf("STIM210 Gyro-Z SF Temperature Calibration init Failed ! \n"); return; } @@ -146,7 +146,7 @@ static void DI_STIM210_update_(void) // NOT REACHED } - DI_STIM210_temperature_caliblation_(); + DI_STIM210_temperature_calibration_(); } else if (power_switch_control->switch_state_unreg[APP_PSC_UNREG_IDX_STIM210] == APP_PSC_STATE_OFF) { @@ -155,7 +155,7 @@ static void DI_STIM210_update_(void) } } -static void DI_STIM210_temperature_caliblation_(void) +static void DI_STIM210_temperature_calibration_(void) { for (int stim_idx = 0; stim_idx < STIM210_IDX_MAX; stim_idx++) { From 01c0e9031fa3725112661ecbb7417aa02e58c084 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:06:41 +0200 Subject: [PATCH 28/40] Fix typo in comments --- src/src_user/Drivers/Aocs/mpu9250.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src_user/Drivers/Aocs/mpu9250.h b/src/src_user/Drivers/Aocs/mpu9250.h index daf14a44..be460e03 100644 --- a/src/src_user/Drivers/Aocs/mpu9250.h +++ b/src/src_user/Drivers/Aocs/mpu9250.h @@ -48,7 +48,7 @@ typedef enum typedef struct { // angular velocity - float ang_vel_raw_compo_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< uncalibrated angular velocity uncaliblated value @ gyroscope and accelerometer frame [rad/s] + float ang_vel_raw_compo_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< uncalibrated angular velocity uncalibrated value @ gyroscope and accelerometer frame [rad/s] float ang_vel_compo_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< calibrated angular velocity @ gyroscope and accelerometer frame [rad/s] float ang_vel_body_rad_s [PHYSICAL_CONST_THREE_DIM]; //!< calibrated angular velocity @ body frame [rad/s] float ang_vel_bias_compo_rad_s[PHYSICAL_CONST_THREE_DIM]; //!< bias correction value of angular velocity @ gyroscope and accelerometer frame [rad/s] @@ -60,7 +60,7 @@ typedef struct uint8_t mag_status_overrun; //!< status of magnetometer (0: ready to read, 1: reading register, 2,3: data overrun) uint8_t mag_status_overflow; //!< status of magnetometer (0,16: OK, 8,24: data overflow) uint8_t is_mag_enabled; //!< magnetometer is enabled or not (0: OFF, 1:ON) - float mag_raw_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< uncalibrated magnetic flux density uncaliblated value @ gyroscope and accelerometer frame [nT] (not magnetometer frame) + float mag_raw_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< uncalibrated magnetic flux density uncalibrated value @ gyroscope and accelerometer frame [nT] (not magnetometer frame) float mag_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< calibrated magnetic flux density @ gyroscope and accelerometer frame [nT] (not magnetometer frame) float mag_body_nT [PHYSICAL_CONST_THREE_DIM]; //!< calibrated magnetic flux density @ body frame [nT] (not magnetometer frame) float mag_bias_compo_nT[PHYSICAL_CONST_THREE_DIM]; //!< bias correction value of magnetic flux density @ gyroscope and accelerometer frame [nT] (not magnetometer frame) (output = observation - this value) From fe01e008f05aeea6f4a4b9ae2aa79006a39e42bb Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:07:12 +0200 Subject: [PATCH 29/40] Fix typo in comments --- src/src_user/Drivers/Aocs/mtq_seiren.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src_user/Drivers/Aocs/mtq_seiren.h b/src/src_user/Drivers/Aocs/mtq_seiren.h index 31af36ef..ff4bce73 100644 --- a/src/src_user/Drivers/Aocs/mtq_seiren.h +++ b/src/src_user/Drivers/Aocs/mtq_seiren.h @@ -27,7 +27,7 @@ typedef enum /** * @struct MTQ_SEIREN_OUT_STATUS * @brief MTQ駆動状態 - * @note PWM周期が遅いISSL6Uプロジェクト専用のMTQ駆動状態モニタ + * @note PWM周期が遅いプロジェクト専用のMTQ駆動状態モニタ * @note int8_tを想定 */ typedef enum @@ -60,7 +60,7 @@ typedef struct uint8_t ch_gpio_negative; MTQ_SEIREN_POLARITY polarity; //!< MTQ極性 float max_mag_moment; //!< 出力可能な最大磁気モーメント - MTQ_SEIREN_DRIVE_STATUS drive_status; //!< MTQ駆動状態 (PWM周期が遅いISSL6Uプロジェクト専用) + MTQ_SEIREN_DRIVE_STATUS drive_status; //!< MTQ駆動状態 (PWM周期が遅いプロジェクト専用) uint8_t unsigned_duty_percent_buffer; //!< 上位アプリからCMD指示されたPWMの符号なしduty (PWMタイマがゼロの時にunsigned_duty_percentへ反映) MTQ_SEIREN_POLARITY polarity_buffer; //!< 上位アプリからCMD指示されたMTQ駆動極性 struct From 7be64803de32888b056b50d9f730403db4ab14aa Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:10:44 +0200 Subject: [PATCH 30/40] Fi typo in local variable --- src/src_user/Drivers/Aocs/mpu9250.c | 6 ++-- src/src_user/Drivers/Aocs/oem7600.c | 48 ++++++++++++++--------------- src/src_user/Drivers/Aocs/oem7600.h | 6 ++-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/src_user/Drivers/Aocs/mpu9250.c b/src/src_user/Drivers/Aocs/mpu9250.c index 047c93b4..d2bd2493 100644 --- a/src/src_user/Drivers/Aocs/mpu9250.c +++ b/src/src_user/Drivers/Aocs/mpu9250.c @@ -440,7 +440,7 @@ static DS_ERR_CODE MPU9250_gyro_analyze_rec_data_(DS_StreamConfig* stream_config MPU9250_convert_bytes_to_info_accel_(mpu9250_rx_data, &(mpu9250_driver->info)); MPU9250_convert_bytes_to_info_temperature_(mpu9250_rx_data, &(mpu9250_driver->info)); - // Scale Factor and Bias caliblation: y = SF*x - BIAS + // Scale Factor and Bias calibration: y = SF*x - BIAS MATRIX33_multiply_matrix_vector(mpu9250_driver->info.ang_vel_compo_rad_s, mpu9250_driver->info.ang_vel_scale_factor_compo, mpu9250_driver->info.ang_vel_raw_compo_rad_s); @@ -466,12 +466,12 @@ static DS_ERR_CODE MPU9250_mag_analyze_rec_data_(DS_StreamConfig* stream_config, MPU9250_convert_bytes_to_info_mag_(mpu9250_rx_data, &(mpu9250_driver->info)); - // Bias caliblation + // Bias calibration VECTOR3_subtract(mpu9250_driver->info.mag_compo_nT, mpu9250_driver->info.mag_raw_compo_nT, mpu9250_driver->info.mag_bias_compo_nT); - // Scale Factor caliblation + // Scale Factor calibration MATRIX33_multiply_matrix_vector(mpu9250_driver->info.mag_compo_nT, mpu9250_driver->info.mag_scale_factor_compo, mpu9250_driver->info.mag_compo_nT); diff --git a/src/src_user/Drivers/Aocs/oem7600.c b/src/src_user/Drivers/Aocs/oem7600.c index 2779fec0..b56aa500 100644 --- a/src/src_user/Drivers/Aocs/oem7600.c +++ b/src/src_user/Drivers/Aocs/oem7600.c @@ -88,7 +88,7 @@ DS_INIT_ERR_CODE OEM7600_init(OEM7600_Driver* oem7600_driver, oem7600_driver->info.crc_state = OEM7600_CRC_STATE_OK; oem7600_driver->info.times.obct_gps_time_obs = OBCT_create(0, 0, 0); oem7600_driver->info.range_tlm_status.is_receiving = 0; - oem7600_driver->info.range_tlm_status.recieved_tlm_len = 0; + oem7600_driver->info.range_tlm_status.received_tlm_len = 0; oem7600_driver->info.range_tlm_status.expected_data_length = 0; oem7600_driver->info.range_tlm_status.range_tlm_wait_counter = 0; @@ -821,7 +821,7 @@ static DS_ERR_CODE OEM7600_store_range_tlm_chunk_(OEM7600_Driver* oem7600_driver if (ret_pickup != DS_ERR_CODE_OK) { // 不整合 → リセット - info->range_tlm_status.recieved_tlm_len = 0; + info->range_tlm_status.received_tlm_len = 0; } unread_buffer_len = if_rec_len - rx_buffer_read_pos; @@ -839,7 +839,7 @@ static DS_ERR_CODE OEM7600_store_range_tlm_chunk_pickup_(OEM7600_Driver* oem7600 uint16_t received_tlm_id; uint32_t received_tlm_size; - if (info->range_tlm_status.recieved_tlm_len == 0) + if (info->range_tlm_status.received_tlm_len == 0) { // ヘッダ未受信 uint8_t* p_header = NULL; @@ -858,8 +858,8 @@ static DS_ERR_CODE OEM7600_store_range_tlm_chunk_pickup_(OEM7600_Driver* oem7600 (*p_rx_buffer_read_pos) = (uint16_t)(p_header - &OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)]) + (*p_rx_buffer_read_pos); // ヘッダ 1 byte 確定 - OEM7600_range_tlm_buff_[info->range_tlm_status.recieved_tlm_len] = OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)]; - info->range_tlm_status.recieved_tlm_len++; + OEM7600_range_tlm_buff_[info->range_tlm_status.received_tlm_len] = OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)]; + info->range_tlm_status.received_tlm_len++; (*p_rx_buffer_read_pos)++; // unread_buffer_len--; unread_buffer_len = if_rec_len - (*p_rx_buffer_read_pos); @@ -868,29 +868,29 @@ static DS_ERR_CODE OEM7600_store_range_tlm_chunk_pickup_(OEM7600_Driver* oem7600 } - if (info->range_tlm_status.recieved_tlm_len < sizeof(OEM7600_rx_header_)) + if (info->range_tlm_status.received_tlm_len < sizeof(OEM7600_rx_header_)) { #ifdef DRIVER_OEM7600_DEBUG_SHOW_RANGE_DATA_BUFF - Printf("receiving rx header: %d, %d, \n", info->range_tlm_status.recieved_tlm_len, *p_rx_buffer_read_pos); + Printf("receiving rx header: %d, %d, \n", info->range_tlm_status.received_tlm_len, *p_rx_buffer_read_pos); #endif // ヘッダ受信中 - uint16_t unread_header = sizeof(OEM7600_rx_header_) - info->range_tlm_status.recieved_tlm_len; + uint16_t unread_header = sizeof(OEM7600_rx_header_) - info->range_tlm_status.received_tlm_len; uint16_t i; - for (i = info->range_tlm_status.recieved_tlm_len; i < sizeof(OEM7600_rx_header_); ++i) + for (i = info->range_tlm_status.received_tlm_len; i < sizeof(OEM7600_rx_header_); ++i) { #ifdef DRIVER_OEM7600_DEBUG_SHOW_RANGE_DATA_BUFF - Printf("receiving rx header for: %d, %d, \n", info->range_tlm_status.recieved_tlm_len, *p_rx_buffer_read_pos); + Printf("receiving rx header for: %d, %d, \n", info->range_tlm_status.received_tlm_len, *p_rx_buffer_read_pos); #endif - if (OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)] != OEM7600_rx_header_[info->range_tlm_status.recieved_tlm_len]) + if (OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)] != OEM7600_rx_header_[info->range_tlm_status.received_tlm_len]) { // 不整合 return DS_ERR_CODE_ERR; } - OEM7600_range_tlm_buff_[info->range_tlm_status.recieved_tlm_len] = OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)]; - info->range_tlm_status.recieved_tlm_len++; + OEM7600_range_tlm_buff_[info->range_tlm_status.received_tlm_len] = OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)]; + info->range_tlm_status.received_tlm_len++; (*p_rx_buffer_read_pos)++; unread_buffer_len--; @@ -898,25 +898,25 @@ static DS_ERR_CODE OEM7600_store_range_tlm_chunk_pickup_(OEM7600_Driver* oem7600 } } - if (info->range_tlm_status.recieved_tlm_len < OEM7600_COMMON_HEADER_SIZE) + if (info->range_tlm_status.received_tlm_len < OEM7600_COMMON_HEADER_SIZE) { #ifdef DRIVER_OEM7600_DEBUG_SHOW_RANGE_DATA_BUFF - Printf("receiving header: %d, %d, \n", info->range_tlm_status.recieved_tlm_len, *p_rx_buffer_read_pos); + Printf("receiving header: %d, %d, \n", info->range_tlm_status.received_tlm_len, *p_rx_buffer_read_pos); #endif // フレーム長p_rx_buffer_read_posまで受信中 - uint16_t unread_header_len = OEM7600_COMMON_HEADER_SIZE - info->range_tlm_status.recieved_tlm_len; + uint16_t unread_header_len = OEM7600_COMMON_HEADER_SIZE - info->range_tlm_status.received_tlm_len; uint16_t copy_len = unread_header_len; if (copy_len > unread_buffer_len) { copy_len = unread_buffer_len; } - memcpy(&OEM7600_range_tlm_buff_[info->range_tlm_status.recieved_tlm_len], + memcpy(&OEM7600_range_tlm_buff_[info->range_tlm_status.received_tlm_len], &OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)], copy_len); - info->range_tlm_status.recieved_tlm_len += copy_len; + info->range_tlm_status.received_tlm_len += copy_len; (*p_rx_buffer_read_pos) += copy_len; unread_buffer_len -= copy_len; @@ -924,7 +924,7 @@ static DS_ERR_CODE OEM7600_store_range_tlm_chunk_pickup_(OEM7600_Driver* oem7600 } #ifdef DRIVER_OEM7600_DEBUG_SHOW_RANGE_DATA_BUFF - Printf("receiving body: %d, %d, \n", info->range_tlm_status.recieved_tlm_len, *p_rx_buffer_read_pos); + Printf("receiving body: %d, %d, \n", info->range_tlm_status.received_tlm_len, *p_rx_buffer_read_pos); #endif // ここまできたらフレーム長などは受信できてる @@ -951,22 +951,22 @@ static DS_ERR_CODE OEM7600_store_range_tlm_chunk_pickup_(OEM7600_Driver* oem7600 // ここまで来たら,あとはデータをツモっていくだけ { - uint16_t unreceived_len = info->range_tlm_status.expected_data_length - info->range_tlm_status.recieved_tlm_len; + uint16_t unreceived_len = info->range_tlm_status.expected_data_length - info->range_tlm_status.received_tlm_len; uint16_t copy_len = unreceived_len; if (copy_len > unread_buffer_len) { copy_len = unread_buffer_len; } - memcpy(&OEM7600_range_tlm_buff_[info->range_tlm_status.recieved_tlm_len], + memcpy(&OEM7600_range_tlm_buff_[info->range_tlm_status.received_tlm_len], &OEM7600_range_tlm_if_rx_buffer_[(*p_rx_buffer_read_pos)], copy_len); - info->range_tlm_status.recieved_tlm_len += copy_len; + info->range_tlm_status.received_tlm_len += copy_len; (*p_rx_buffer_read_pos) += copy_len; unread_buffer_len -= copy_len; - unreceived_len = info->range_tlm_status.expected_data_length - info->range_tlm_status.recieved_tlm_len; + unreceived_len = info->range_tlm_status.expected_data_length - info->range_tlm_status.received_tlm_len; if (unreceived_len == 0) { // 受信完了 @@ -990,7 +990,7 @@ DS_CMD_ERR_CODE OEM7600_start_rec_range_tlm(OEM7600_Driver* oem7600_driver) #endif oem7600_driver->info.range_tlm_status.is_receiving = 1; - oem7600_driver->info.range_tlm_status.recieved_tlm_len = 0; + oem7600_driver->info.range_tlm_status.received_tlm_len = 0; oem7600_driver->info.range_tlm_status.expected_data_length = 0; oem7600_driver->info.range_tlm_status.range_tlm_wait_counter = 0; diff --git a/src/src_user/Drivers/Aocs/oem7600.h b/src/src_user/Drivers/Aocs/oem7600.h index d93ae763..3d831a34 100644 --- a/src/src_user/Drivers/Aocs/oem7600.h +++ b/src/src_user/Drivers/Aocs/oem7600.h @@ -31,7 +31,7 @@ typedef enum */ typedef enum { - // hwmonitor tlm内部の識別ID + // hw monitor tlm内部の識別ID OEM7600_TLM_ID_TEMPERATURE = 0x00000001, OEM7600_TLM_ID_ANTENNA_CURRENT = 0x00000002, OEM7600_TLM_ID_3V3_VOLTAGE = 0x00000006, @@ -69,7 +69,7 @@ typedef struct */ typedef struct { - float temperature_degC; //!< reciever temperature [degC] + float temperature_degC; //!< receiver temperature [degC] float antenna_current_A; //!< antenna current [A] float voltage_3v3_V; //!< 3V3 voltage regulated in the receiver and delivered mainly to the receiver's processor [V] float antenna_voltage_V; //!< antenna voltage [V] @@ -126,7 +126,7 @@ typedef struct struct oem7600 { uint8_t is_receiving; //!< flag to check whether the driver is under range tlm receiving or not - uint16_t recieved_tlm_len; //!< length of the range data stored to the range tlm buffer + uint16_t received_tlm_len; //!< length of the range data stored to the range tlm buffer uint16_t expected_data_length; //!< expected data length of range tlm sentence under receiving uint16_t range_tlm_wait_counter; //!< range tlmの受信処理call回数(閾値以上になった場合、range tlmの受信処理をリセット) } range_tlm_status; From a8c34c572f2389150365ca44c1dddc31a2bca998 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:14:48 +0200 Subject: [PATCH 31/40] Fix typo in local variables --- src/src_user/Drivers/Aocs/rw0003.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/src_user/Drivers/Aocs/rw0003.c b/src/src_user/Drivers/Aocs/rw0003.c index e5b59bc8..d4a6e707 100644 --- a/src/src_user/Drivers/Aocs/rw0003.c +++ b/src/src_user/Drivers/Aocs/rw0003.c @@ -31,9 +31,9 @@ typedef enum #define RW0003_WRITE_MODE_FILE_DATA_LENGTH (4) //!< Mode file データ書き込み長 [byte] -#define RW0003_READ_OVER_HAED (4) //!< TLMに付加される情報のバイト数 [byte] -#define RW0003_NSP_HEADER_SIZE (2) //!< Nano Satellite Protcol header: MCF(Message Control Field) + Source Address = 2 byte -#define RW0003_NSP_CRC_SIZE (2) //!< Nano Satellite Protcol CRC size +#define RW0003_READ_OVER_HEAD (4) //!< TLMに付加される情報のバイト数 [byte] +#define RW0003_NSP_HEADER_SIZE (2) //!< Nano Satellite Protocol header: MCF(Message Control Field) + Source Address = 2 byte +#define RW0003_NSP_CRC_SIZE (2) //!< Nano Satellite Protocol CRC size #define RW0003_FOOTER_SIZE (1) //!< TX/RX共通 #define RW0003_RX_MAX_FRAME_SIZE (15) //!< SLIPを考慮した(現時点での)最大テレメフレーム長( 9 + 6 ) #define RW0003_STREAM_TLM_CMD (0) From 2f7cbbf07769d0e9d67d49bf7375234d7d5353f1 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:17:41 +0200 Subject: [PATCH 32/40] Fix typo in comment --- src/src_user/Drivers/Aocs/sagitta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Drivers/Aocs/sagitta.h b/src/src_user/Drivers/Aocs/sagitta.h index 9e3e0dc3..a610b087 100644 --- a/src/src_user/Drivers/Aocs/sagitta.h +++ b/src/src_user/Drivers/Aocs/sagitta.h @@ -279,7 +279,7 @@ typedef struct float track_confidence; //!< Tracker Confidence Value. The lower this value is, the more confidence we can have in the solution. uint8_t num_stars_removed; //!< The number of stars that were removed by the tracking algorithms that can remove outlier stars uint8_t num_stars_centroided; //!< The number of stars for which a valid centroid was found - uint8_t num_stars_matched; //!< The numver of stars that was matched to a database star + uint8_t num_stars_matched; //!< The number of stars that was matched to a database star float lisa_percentage_close; //!< The percentage of identified stars in the image uint8_t num_stars_lisa_close; //!< The number of identified stars in the image uint8_t star_tracker_mode; //!< LISA = 1, Tracking = 0 From 75149bec40ba942fc1064870bb01a8f35bd4f9ae Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:18:16 +0200 Subject: [PATCH 33/40] Fix typo in comment --- src/src_user/Drivers/Aocs/stim210.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/src_user/Drivers/Aocs/stim210.c b/src/src_user/Drivers/Aocs/stim210.c index bb72b613..29cf3163 100644 --- a/src/src_user/Drivers/Aocs/stim210.c +++ b/src/src_user/Drivers/Aocs/stim210.c @@ -457,7 +457,7 @@ C2A_MATH_ERROR STIM210_set_ang_vel_scale_factor_compo(STIM210_Driver* stim210_dr /* * @private - * @breif ドライバ初期化設定 + * @brief ドライバ初期化設定 * @param p_super: ドライバーへのポインタ * @return DS_ERR_CODEを参照 */ @@ -481,7 +481,7 @@ static DS_ERR_CODE STIM210_load_driver_super_init_settings_(DriverSuper* p_super /* * @private - * @breif テレメトリのフレームサイズとヘッダー・フッターを指定する関数。 + * @brief テレメトリのフレームサイズとヘッダー・フッターを指定する関数。 * @param stim210: ドライバーへのポインタ * @return DS_CMD_ERR_CODEを参照 */ @@ -508,7 +508,7 @@ static DS_CMD_ERR_CODE STIM210_set_rec_frame_size_(STIM210_Driver* stim210_drive /* * @private - * @breif 汎用コマンド作成関数 + * @brief 汎用コマンド作成関数 * @param stim210: ドライバーへのポインタ * @param param_size: cmd paramで使われているバイト長 (フッターを含まない) * @param cmd_param: 送信するコマンドパラメータ @@ -541,7 +541,7 @@ static DS_CMD_ERR_CODE STIM210_send_cmd_(STIM210_Driver* stim210_driver, uint8_t /* * @private - * @breif 受け取ったデータを変数に格納していく + * @brief 受け取ったデータを変数に格納していく * @param stream_config: ドライバーの設定 * @param p_driver: ドライバーへのポインタ * @return DS_ERR_CODEを参照 @@ -800,7 +800,7 @@ static int STIM210_convert_latency_(STIM210_Driver* stim210_driver, const uint8_ static void STIM210_calc_ang_vel_calibration_(STIM210_Info* info) { - // Scale Factor and Bias caliblation: y = SF*x - BIAS + // Scale Factor and Bias calibration: y = SF*x - BIAS MATRIX33_multiply_matrix_vector(info->ang_vel_compo_rad_sec, info->ang_vel_scale_factor_compo, info->ang_vel_raw_compo_rad_sec); From 63ff2b5580c596fde3a8f7317dd73df1b1790b9c Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:19:12 +0200 Subject: [PATCH 34/40] Fix typo in comment --- src/src_user/Library/ControlUtility/gyroscopic_effect.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src_user/Library/ControlUtility/gyroscopic_effect.h b/src/src_user/Library/ControlUtility/gyroscopic_effect.h index 293f7246..89df5602 100644 --- a/src/src_user/Library/ControlUtility/gyroscopic_effect.h +++ b/src/src_user/Library/ControlUtility/gyroscopic_effect.h @@ -10,8 +10,8 @@ /** - * @brief ジャイロ効果トルク ωbxhbの計算 - * @param[out] gyroscopic_trq_Nm : ジャイロ効果トルクωbxhb [Nm] + * @brief ジャイロ効果トルク ωb x hbの計算 + * @param[out] gyroscopic_trq_Nm : ジャイロ効果トルクωb x hb [Nm] * @param[in] body_rate_rad_s : 姿勢レート制御使用値 at 機体座標系 [rad/s] * @param[in] body_momentum_Nms : 機体系 (RW込み) の角運動量 at 機体座標系 [Nms] * @return void From f39e02bb465b8689c0465eebd6f0b9722f830863 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:19:48 +0200 Subject: [PATCH 35/40] Fix typo in comment --- src/src_user/Library/Orbit/kepler_orbit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Library/Orbit/kepler_orbit.h b/src/src_user/Library/Orbit/kepler_orbit.h index 0ccd7df7..75088249 100644 --- a/src/src_user/Library/Orbit/kepler_orbit.h +++ b/src/src_user/Library/Orbit/kepler_orbit.h @@ -41,7 +41,7 @@ typedef struct /** * @brief 軌道要素から軌道計算に使う定数値を求める * @param[out] kepler_orbit_constant : ケプラー運動の定数 - * @param[in] ortibal_elements : 軌道要素 + * @param[in] orbital_elements : 軌道要素 */ void KEPLER_ORBIT_init_constants(KeplerOrbitConstants* kepler_orbit_constants, const KeplerOrbitalElements orbital_elements); From d5b095357f4b2264043c258f1b0a4c76a632b97e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:21:26 +0200 Subject: [PATCH 36/40] Fix typo in local variables --- .../Library/SignalProcess/spike_filter.c | 2 +- src/src_user/Library/SignalProcess/z_filter.c | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/src_user/Library/SignalProcess/spike_filter.c b/src/src_user/Library/SignalProcess/spike_filter.c index c313e47e..a0e48745 100644 --- a/src/src_user/Library/SignalProcess/spike_filter.c +++ b/src/src_user/Library/SignalProcess/spike_filter.c @@ -66,7 +66,7 @@ C2A_MATH_ERROR SPIKE_FILTER_calc_output_double(SpikeFilter* filter, double* outp filter->count_to_reject_continued_warning_++; // reset counter if the differential amplitude of successive spikes is too large - // so as not to misrecognize oscillating signal as step signal + // so as not to mis-recognize oscillating signal as step signal double diff_of_successive_spikes = input - filter->last_reject_val_; if (fabs(diff_of_successive_spikes) > filter->config.amplitude_limit_to_accept_as_step) { diff --git a/src/src_user/Library/SignalProcess/z_filter.c b/src/src_user/Library/SignalProcess/z_filter.c index 8abc7bf3..153c6b1f 100644 --- a/src/src_user/Library/SignalProcess/z_filter.c +++ b/src/src_user/Library/SignalProcess/z_filter.c @@ -22,7 +22,7 @@ static void Z_FILTER_zero_clear_coeff_(double numerator_coeff[Z_FILTER_ORDER_MAX C2A_MATH_ERROR Z_FILTER_init_as_lpf_1st(ZFilter* filter, const float f_sample_Hz, const float f_cut_Hz) { - // in these case, the filter maight not work + // in these case, the filter might not work if (f_cut_Hz <= 0) { filter->order = 0; // set the filter as feed-through @@ -49,8 +49,8 @@ C2A_MATH_ERROR Z_FILTER_init_as_lpf_1st(ZFilter* filter, const float f_sample_Hz filter->order = 1; double ts_sec = 1.0 / (double)(f_sample_Hz); - C2A_MATH_ERROR transration_error = Z_FILTER_bilinear_trans_(filter, ts_sec, numerator_continuous_coeff, denominator_continuous_coeff); - if (transration_error != C2A_MATH_ERROR_OK) return transration_error; + C2A_MATH_ERROR translation_error = Z_FILTER_bilinear_trans_(filter, ts_sec, numerator_continuous_coeff, denominator_continuous_coeff); + if (translation_error != C2A_MATH_ERROR_OK) return translation_error; Z_FILTER_reset(filter); @@ -60,7 +60,7 @@ C2A_MATH_ERROR Z_FILTER_init_as_lpf_1st(ZFilter* filter, const float f_sample_Hz C2A_MATH_ERROR Z_FILTER_init_as_lpf_2nd(ZFilter* filter, const float f_sample_Hz, const float f_cut_Hz, const float xi) { - // in these case, the filter maight not work + // in these case, the filter might not work if (f_cut_Hz <= 0) { filter->order = 0; // set the filter as feed-through @@ -88,8 +88,8 @@ C2A_MATH_ERROR Z_FILTER_init_as_lpf_2nd(ZFilter* filter, const float f_sample_Hz filter->order = 2; double ts_sec = 1.0 / (double)(f_sample_Hz); - C2A_MATH_ERROR transration_error = Z_FILTER_bilinear_trans_(filter, ts_sec, numerator_continuous_coeff, denominator_continuous_coeff); - if (transration_error != C2A_MATH_ERROR_OK) return transration_error; + C2A_MATH_ERROR translation_error = Z_FILTER_bilinear_trans_(filter, ts_sec, numerator_continuous_coeff, denominator_continuous_coeff); + if (translation_error != C2A_MATH_ERROR_OK) return translation_error; Z_FILTER_reset(filter); @@ -100,7 +100,7 @@ C2A_MATH_ERROR Z_FILTER_init_as_lpf_2nd(ZFilter* filter, const float f_sample_Hz C2A_MATH_ERROR Z_FILTER_init_as_notch(ZFilter* filter, const float f_sample_Hz, const float f_cut_Hz, const float xi, const float depth) { - // in these case, the filter maight not work + // in these case, the filter might not work if (f_cut_Hz <= 0) { filter->order = 0; // set the filter as feed-through @@ -129,8 +129,8 @@ C2A_MATH_ERROR Z_FILTER_init_as_notch(ZFilter* filter, const float f_sample_Hz, filter->order = 2; double ts_sec = 1.0 / (double)(f_sample_Hz); - C2A_MATH_ERROR transration_error = Z_FILTER_bilinear_trans_(filter, ts_sec, numerator_continuous_coeff, denominator_continuous_coeff); - if (transration_error != C2A_MATH_ERROR_OK) return transration_error; + C2A_MATH_ERROR translation_error = Z_FILTER_bilinear_trans_(filter, ts_sec, numerator_continuous_coeff, denominator_continuous_coeff); + if (translation_error != C2A_MATH_ERROR_OK) return translation_error; Z_FILTER_reset(filter); @@ -197,7 +197,7 @@ static C2A_MATH_ERROR Z_FILTER_bilinear_trans_(ZFilter* filter, { double pow2_ts = ts_sec * ts_sec; double inverse_trans_coeff = 1.0; //!< inverse of coeffs for bilinear trans - C2A_MATH_ERROR transration_success = C2A_MATH_ERROR_OK; + C2A_MATH_ERROR translation_success = C2A_MATH_ERROR_OK; switch (filter->order) { @@ -208,7 +208,7 @@ static C2A_MATH_ERROR Z_FILTER_bilinear_trans_(ZFilter* filter, if (fabs(inverse_trans_coeff) < MATH_CONST_PROHIBIT_DIVISION_VALUE) { - transration_success = C2A_MATH_ERROR_SINGULAR; + translation_success = C2A_MATH_ERROR_SINGULAR; break; } @@ -240,7 +240,7 @@ static C2A_MATH_ERROR Z_FILTER_bilinear_trans_(ZFilter* filter, if (fabs(inverse_trans_coeff) < MATH_CONST_PROHIBIT_DIVISION_VALUE) { - transration_success = C2A_MATH_ERROR_SINGULAR; + translation_success = C2A_MATH_ERROR_SINGULAR; break; } @@ -253,11 +253,11 @@ static C2A_MATH_ERROR Z_FILTER_bilinear_trans_(ZFilter* filter, filter->denominator_discrete_coeff[1] = 0.0; break; default: - transration_success = C2A_MATH_ERROR_SINGULAR; + translation_success = C2A_MATH_ERROR_SINGULAR; break; } - if (transration_success == C2A_MATH_ERROR_SINGULAR) + if (translation_success == C2A_MATH_ERROR_SINGULAR) { // set the filter order as feed-through filter->order = 0; @@ -267,7 +267,7 @@ static C2A_MATH_ERROR Z_FILTER_bilinear_trans_(ZFilter* filter, filter->numerator_discrete_coeff[0] = 1.0; } - return transration_success; + return translation_success; } From 1d4fe1f01c6db2798830815115afb63fc10df466 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:25:42 +0200 Subject: [PATCH 37/40] Fix typo in local variables --- src/src_user/Library/geomagnetism.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/src_user/Library/geomagnetism.c b/src/src_user/Library/geomagnetism.c index d7df2e41..82d8e142 100644 --- a/src/src_user/Library/geomagnetism.c +++ b/src/src_user/Library/geomagnetism.c @@ -199,7 +199,7 @@ static GEOMAGNETISM_Coeffs geomag_coeff_ = // localの作業用関数の宣言 //!< ルジャンドル陪関数の基底に用いる三角関数のn倍の計算 -static void GEOMAGNETISM_calc_trigonometrics_(float sinn[GEOMAGNETISM_IGRF_ORDER_MAX + 1], +static void GEOMAGNETISM_calc_trigonometric_(float sinn[GEOMAGNETISM_IGRF_ORDER_MAX + 1], float cosn[GEOMAGNETISM_IGRF_ORDER_MAX + 1], const float base_angle_rad, const uint8_t order); @@ -249,14 +249,14 @@ C2A_MATH_ERROR GEOMAGNETISM_calc_igrf(float* mag_i_nT, const uint8_t clac_order, // cast is necessary since C2A_MATH_clip_value handles only float variables uint8_t order = (uint8_t)C2A_MATH_clip_value((float)(clac_order), (float)(GEOMAGNETISM_IGRF_ORDER_MAX), 1.0f); - //!< geocentric co-lattitude and mean radius at the interest point + //!< geocentric co-latitude and mean radius at the interest point float colat_rad, radius_m; C2A_MATH_ERROR warning = TIME_SPACE_convert_geodetic_to_geocentric(&colat_rad, &radius_m, lla_rad_m); //!< buffer to avoid repitational computation of cos, sin harmonics float sin_m[GEOMAGNETISM_IGRF_ORDER_MAX + 1]; float cos_m[GEOMAGNETISM_IGRF_ORDER_MAX + 1]; - GEOMAGNETISM_calc_trigonometrics_(sin_m, cos_m, lon_rad, order); + GEOMAGNETISM_calc_trigonometric_(sin_m, cos_m, lon_rad, order); //!< buffer to solve the recurrence equation float legendre_p_n[GEOMAGNETISM_IGRF_ORDER_MAX + 1]; //!< P[n][m] @@ -267,7 +267,7 @@ C2A_MATH_ERROR GEOMAGNETISM_calc_igrf(float* mag_i_nT, const uint8_t clac_order, float sin_colat = sinf(colat_rad); float cos_colat = cosf(colat_rad); - //!< geomagnetic coeffsitients + //!< geomagnetic coefficients float gnm[GEOMAGNETISM_IGRF_ORDER_MAX + 1]; float hnm[GEOMAGNETISM_IGRF_ORDER_MAX + 1]; @@ -300,7 +300,7 @@ C2A_MATH_ERROR GEOMAGNETISM_calc_igrf(float* mag_i_nT, const uint8_t clac_order, mag_ned_nT[2] += (float)(n + 1) * pow_k_geo_aspect * mag_ned_temp[2]; } - // zero-devide constantly occurs at north/south pole + // zero-divide constantly occurs at north/south pole // 軌道傾斜角97deg位であれば,sin_colat > 0.1くらいはあるため,ゼロ割には至らない if (fabs(sin_colat) > MATH_CONST_PROHIBIT_DIVISION_VALUE) { @@ -328,7 +328,7 @@ C2A_MATH_ERROR GEOMAGNETISM_calc_igrf(float* mag_i_nT, const uint8_t clac_order, // localの作業用関数 -static void GEOMAGNETISM_calc_trigonometrics_(float sinn[GEOMAGNETISM_IGRF_ORDER_MAX + 1], +static void GEOMAGNETISM_calc_trigonometric_(float sinn[GEOMAGNETISM_IGRF_ORDER_MAX + 1], float cosn[GEOMAGNETISM_IGRF_ORDER_MAX + 1], const float base_angle_rad, const uint8_t order) @@ -424,20 +424,20 @@ static void GEOMAGNETISM_calc_gauss_coeffs_(float gnm[GEOMAGNETISM_IGRF_ORDER_MA hnm[0] = geomag_coeff_.igrf_hnm_nT[n - 1][0] + decimal_year * geomag_coeff_.igrf_htnm_nT[n - 1][0]; float factorial_coeff = C2A_MATH_sqrtf(2.0f); //!< factorial_coeff(n,m) = [2(n-m)!/(n+m)!]^(1/2) (for m >0) - float devide_coeff = 0.0; + float divide_coeff = 0.0; for (uint8_t m = 1; m <= n; m++) { // factorial_coeff(m) = factorial_coeff(m-1)/[(n+m)(n+m-1)]^(1/2) (for m < n) // factorial_coeff(m) = factorial_coeff(m-1)/[(n+m)]^(1/2) (for m = n) if (m == n) { - devide_coeff = C2A_MATH_sqrtf((float)((n + m))); + divide_coeff = C2A_MATH_sqrtf((float)((n + m))); } else { - devide_coeff = C2A_MATH_sqrtf((float)((n + m)*(n - m + 1))); + divide_coeff = C2A_MATH_sqrtf((float)((n + m)*(n - m + 1))); } - factorial_coeff = factorial_coeff / devide_coeff; + factorial_coeff = factorial_coeff / divide_coeff; // g(n,m,t) = [g0(n,m) + dt*gt(n,m)]*factorial_coeff gnm[m] = geomag_coeff_.igrf_gnm_nT[n - 1][m] + decimal_year * geomag_coeff_.igrf_gtnm_nT[n - 1][m]; From dc39bdb2a0cd533a14f16cf198424c0332ea413e Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:29:02 +0200 Subject: [PATCH 38/40] Fix typo in comments --- src/src_user/Library/matrix33.c | 2 +- src/src_user/Library/quaternion.c | 16 ++++++++-------- src/src_user/Library/quaternion.h | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/src_user/Library/matrix33.c b/src/src_user/Library/matrix33.c index cdd1b2fa..0f241ed0 100644 --- a/src/src_user/Library/matrix33.c +++ b/src/src_user/Library/matrix33.c @@ -458,7 +458,7 @@ C2A_MATH_ERROR MATRIX33_normalize(float matrix_out[PHYSICAL_CONST_THREE_DIM][PHY return C2A_MATH_ERROR_OK; } - // safety of devide operation with matrix_det is already guaranteed + // safety of divide operation with matrix_det is already guaranteed float matrix_det = fabs(MATRIX33_determinant(matrix_in)); // since det(k*matrix) = k^n*det(matrix), scale factor should be pow(1/n) of det(matrix) float inverse_scale_factor = powf(matrix_det, (1.0f /(float)(PHYSICAL_CONST_THREE_DIM))); diff --git a/src/src_user/Library/quaternion.c b/src/src_user/Library/quaternion.c index 5815650c..705b1678 100644 --- a/src/src_user/Library/quaternion.c +++ b/src/src_user/Library/quaternion.c @@ -69,12 +69,12 @@ C2A_MATH_ERROR QUATERNION_make_from_axis_angle(Quaternion* q_out, return is_normalized; } - // ignore warning since singular valune is already removed + // ignore warning since singular value is already removed C2A_MATH_ERROR ignored_warning = VECTOR3_normalize(axis_normalized, axis); - float angle_cliped = C2A_MATH_normalize_zero_2pi(angle_rad); + float angle_clipped = C2A_MATH_normalize_zero_2pi(angle_rad); - VECTOR3_scalar_product(q_out->vector_part, sinf(0.5f * angle_cliped), axis_normalized); - q_out->scalar_part = cosf(0.5f * angle_cliped); + VECTOR3_scalar_product(q_out->vector_part, sinf(0.5f * angle_clipped), axis_normalized); + q_out->scalar_part = cosf(0.5f * angle_clipped); *q_out = QUATERNION_normalize(*q_out); // ignore assertion, since input is safe in this case @@ -94,7 +94,7 @@ C2A_MATH_ERROR QUATERNION_make_from_matrix(Quaternion* q_out, return normalize_check; } - // ignore warning since singular valune is already removed + // ignore warning since singular value is already removed C2A_MATH_ERROR ignored_warning = MATRIX33_normalize(matrix_n, matrix); Quaternion q_before_check; @@ -133,7 +133,7 @@ C2A_MATH_ERROR QUATERNION_make_from_matrix(Quaternion* q_out, return C2A_MATH_ERROR_SINGULAR; } - // zero devide is already removed + // zero divide is already removed float denominator = 4.0f * q_candidate[max_value_index]; switch (max_value_index) @@ -197,7 +197,7 @@ C2A_MATH_ERROR QUATERNION_make_from_euler_angles(Quaternion* q_out, q_rot_3 = QUATERNION_make_x_rot(angle_3_rad); break; default: - // otherwise, replace the order with 1-2-3, which would be the most freqently used order + // otherwise, replace the order with 1-2-3, which would be the most frequently used order q_rot_1 = QUATERNION_make_x_rot(angle_1_rad); q_rot_2 = QUATERNION_make_y_rot(angle_2_rad); q_rot_3 = QUATERNION_make_z_rot(angle_3_rad); @@ -306,7 +306,7 @@ void QUATERNION_to_euler_axis_angle(float axis[PHYSICAL_CONST_THREE_DIM], float* float axis_unnormalized[PHYSICAL_CONST_THREE_DIM]; VECTOR3_scalar_product(axis_unnormalized, (1.0f / sin_half_angle), q_in.vector_part); - // ignore error code since zero-devide is already handled + // ignore error code since zero-divide is already handled C2A_MATH_ERROR err_check = VECTOR3_normalize(axis, axis_unnormalized); } diff --git a/src/src_user/Library/quaternion.h b/src/src_user/Library/quaternion.h index ce669efa..182e7f6e 100644 --- a/src/src_user/Library/quaternion.h +++ b/src/src_user/Library/quaternion.h @@ -47,7 +47,7 @@ typedef enum * @param[in] position : 配列中のスカラー部位置 (0か3のどちらかのみ想定) * @return C2A_MATH_ERROR * @note 入力が規格化されていないこととゼロ割を生じる値であることを区別してエラー出力 - * @note 入力がゼロ割を生じる場合はunitq uaternionを返し,入力が規格化されていない場合は規格化する + * @note 入力がゼロ割を生じる場合はunit quaternionを返し,入力が規格化されていない場合は規格化する */ C2A_MATH_ERROR QUATERNION_make_from_array(Quaternion* q_out, const float array[PHYSICAL_CONST_QUATERNION_DIM], @@ -73,7 +73,7 @@ C2A_MATH_ERROR QUATERNION_make_from_array_unnormalizing(Quaternion* q_out, * @param[in] angle_rad : axis周りの回転角 [rad] * @return C2A_MATH_ERROR * @note 入力軸が規格化されていないこととゼロ割を生じる値であることを区別してエラー出力 - * @note 入力がゼロ割を生じる場合はunitq uaternionを返し,入力軸が規格化されていない場合は規格化する + * @note 入力がゼロ割を生じる場合はunit quaternionを返し,入力軸が規格化されていない場合は規格化する */ C2A_MATH_ERROR QUATERNION_make_from_axis_angle(Quaternion* q_out, const float axis[PHYSICAL_CONST_THREE_DIM], @@ -85,7 +85,7 @@ C2A_MATH_ERROR QUATERNION_make_from_axis_angle(Quaternion* q_out, * @param[in] matrix : 元の行列 (2次元配列) * @return C2A_MATH_ERROR * @note 元行列が規格化されていないこととゼロ割を生じる値であることを区別してエラー出力 - * @note 入力がゼロ割を生じる場合はunitq uaternionを返し,元行列が規格化されていない場合は規格化する + * @note 入力がゼロ割を生じる場合はunit quaternionを返し,元行列が規格化されていない場合は規格化する */ C2A_MATH_ERROR QUATERNION_make_from_matrix(Quaternion* q_out, const float matrix[][PHYSICAL_CONST_THREE_DIM]); @@ -245,7 +245,7 @@ Quaternion QUATERNION_calc_time_derivative(const Quaternion q_in, const float om * @param[out] omega_rad_s : 角速度ベクトル [rad/s] * @param[in] q_previous : 前ステップのQuaternion * @param[in] q_current : 現ステップのQuaternion - * @param[in] time_diff_sec : Quaterionの時刻差 [sec] + * @param[in] time_diff_sec : Quaternionの時刻差 [sec] * @return C2A_MATH_ERRORに準拠 */ C2A_MATH_ERROR QUATERNION_calc_angular_velocity(float omega_rad_s[PHYSICAL_CONST_THREE_DIM], @@ -300,7 +300,7 @@ Quaternion QUATERNION_divide(const Quaternion q_in1, const Quaternion q_in2); * @param factor : 補間パラメータ [0, 1]で指定する * @return 演算結果 * @note factorが0に近づくほどq1に近い値となり,1に近づくほどq2に近い値となる. - * @note slerpはsphercial linear interpolationの略 + * @note slerpはspherical linear interpolationの略 */ Quaternion QUATERNION_interpolate_slerp(const Quaternion q_in1, const Quaternion q_in2, const float factor); From 610bd3bf70fd854a11dcba0595c148f1fb334745 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:33:56 +0200 Subject: [PATCH 39/40] Fix typos --- src/src_user/Library/time_space.c | 36 +++++++++++++++---------------- src/src_user/Library/time_space.h | 24 ++++++++++----------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/src_user/Library/time_space.c b/src/src_user/Library/time_space.c index de206e1e..ea9db708 100644 --- a/src/src_user/Library/time_space.c +++ b/src/src_user/Library/time_space.c @@ -16,10 +16,10 @@ /** * @brief 日周運動を表すR行列の計算 - * @param[in] gast_rad : Greenwitch Apparent Sidereal Time [rad] + * @param[in] gast_rad : Greenwich Apparent Sidereal Time [rad] * @param[out] axial_rotation : R * @note 歳差・章動を考慮しない場合,gast_radの代わりにgmst_radを用いることで, - axial_rotationがECIECEF変換のDCMとなる。 + axial_rotationがECI/ECEF変換のDCMとなる。 * GMSTが0に近いとき,GASTは負の値になりうる。 */ static void TIME_SPACE_axial_rotation_(const double gast_rad, double axial_rotation[PHYSICAL_CONST_THREE_DIM][PHYSICAL_CONST_THREE_DIM]); @@ -27,7 +27,7 @@ static void TIME_SPACE_axial_rotation_(const double gast_rad, double axial_rotat /** * @brief 歳差を表すP行列の計算 * @param[in] julian_century_terrestrial_time : Julian Century in Terrestrial Time [century] - (sholud be larger than zero) + (should be larger than zero) * @param[out] precession : P (set unit matrix when the input is out-of-range) * @return C2A_MATH_ERROR_RANGE_OVER : Julian Century in Terrestrial Timeが0以下 * @return C2A_MATH_ERROR_OK @@ -38,7 +38,7 @@ static C2A_MATH_ERROR TIME_SPACE_precession_(const double julian_century_terrest /** * @brief 章動を表すN行列の計算 * @param[in] julian_century_terrestrial_time : Julian Century in Terrestrial Time [century] - (sholud be larger than zero) + (should be larger than zero) * @param[out] nutation : N (set unit matrix when the input is out-of-range) * @param[out] epsilon_rad * @param[out] depsilon_rad @@ -53,7 +53,7 @@ static C2A_MATH_ERROR TIME_SPACE_nutation_(const double julian_century_terrestri double TIME_SPACE_convert_gpstime_to_julian_day(const uint16_t gps_time_week, const uint32_t gps_time_msec) { - const double kJulianDayAtGpsTimeEpoch_day = 2444244.5; //!< JulainDay at Origin of GPSTime (1980/1/6 00:00) + const double kJulianDayAtGpsTimeEpoch_day = 2444244.5; //!< Julian Day at Origin of GPSTime (1980/1/6 00:00) const double kMsecToSec = 1.0e-3; //!< conversion from msec to sec const double kDayOfWeek_day = 7.0; //!< days of a week const double kSecOfWeek_sec = kDayOfWeek_day * (double)(PHYSICAL_CONST_EARTH_SOLAR_DAY_s); @@ -72,7 +72,7 @@ double TIME_SPACE_convert_gpstime_to_julian_day(const uint16_t gps_time_week, co double TIME_SPACE_convert_julian_day_to_century(const double julian_day) { - const double kJulianDayAtJ2000Epoch_day = 2451545.0; //!< JulainDay at Epoch of J2000 (2000/1/1 12:00) + const double kJulianDayAtJ2000Epoch_day = 2451545.0; //!< Julian Day at Epoch of J2000 (2000/1/1 12:00) if (julian_day < kJulianDayAtJ2000Epoch_day) return 0.0; @@ -95,16 +95,16 @@ double TIME_SPACE_calc_gmst_rad(const double julian_day) double julian_century = TIME_SPACE_convert_julian_day_to_century(julian_day); - const double kOffsetNoonMidhight_day = 0.5; //!< offset day of noon from midnight [day] + const double kOffsetNoonMidnight_day = 0.5; //!< offset day of noon from midnight [day] uint32_t jday_integer = (uint32_t)(julian_day); - double elapsed_day = (julian_day - (double)(jday_integer)) + kOffsetNoonMidhight_day; + double elapsed_day = (julian_day - (double)(jday_integer)) + kOffsetNoonMidnight_day; if (elapsed_day >= 1.0) { elapsed_day = elapsed_day - 1.0; } double elapsed_time_of_day_sec = elapsed_day * PHYSICAL_CONST_EARTH_SOLAR_DAY_s; - //!< Coefficients to compute Greenwitch Mean Side Real Time (GMST)[hour angle/century] + //!< Coefficients to compute Greenwich Mean Side Real Time (GMST)[hour angle/century] const double kCoeffTimeToGmst_hour_angle_century[] = { 24110.54841, 8640184.812866, 0.093104, -6.2e-6 }; //!< ratio of the length of 1 seconds in Sidereal compare to Universal Time [-] const double kCoeffSecOfDayToGmst_hour_angle_sec = 1.002737909350975; @@ -140,7 +140,7 @@ void TIME_SPACE_calc_sun_direction_eci(const double julian_century, float sun_di //!< Mean obliquity of ecliptic [rad] const double kEclipticEpsilon_rad = 4.0909280E-01; - //!< Coefficients to compute Mean Anomarly of Sun [rad/century] + //!< Coefficients to compute Mean Anomaly of Sun [rad/century] const double kCoeffsMeanAnomalySun_rad_century[] = { 6.2399989E+00, 6.2830186E+02 }; //!< Coefficients to compute Ecliptic Longitude [rad/century] const double kCoeffsEclipticLongitude_rad_century[] @@ -164,7 +164,7 @@ void TIME_SPACE_calc_sun_direction_eci(const double julian_century, float sun_di } -C2A_MATH_ERROR TIME_SPACE_convert_geodetic_to_geocentric(float* colat_rad, float* radious_m, +C2A_MATH_ERROR TIME_SPACE_convert_geodetic_to_geocentric(float* colat_rad, float* radius_m, const double lla_rad_m[PHYSICAL_CONST_THREE_DIM]) { float lat_rad = (float)(lla_rad_m[0]); @@ -189,14 +189,14 @@ C2A_MATH_ERROR TIME_SPACE_convert_geodetic_to_geocentric(float* colat_rad, float float pow2_rp2_sin = pow2_earth_rp * rp_earth_sin_lat * rp_earth_sin_lat; //!< 1st_term of r^2 = [(Re^2*cos_lat)^2 + (Rp^2*sin_lat)^2]/(Rm^2) - float pow2_radious_m_1st_term = (pow2_re2_cos + pow2_rp2_sin) / pow2_radius_mean; + float pow2_radius_m_1st_term = (pow2_re2_cos + pow2_rp2_sin) / pow2_radius_mean; //!< r^2 = 1st_term of r^2 + 2h*Rm + h^2 - float pow2_radius_m = pow2_radious_m_1st_term + 2.0f * height_m * radius_mean + height_m * height_m; - *radious_m = C2A_MATH_sqrtf(pow2_radius_m); + float pow2_radius_m = pow2_radius_m_1st_term + 2.0f * height_m * radius_mean + height_m * height_m; + *radius_m = C2A_MATH_sqrtf(pow2_radius_m); //!< cos(colat) = (sin_lat/r)*(h + (Rp^2)/Rm) - float cos_colat = (sinf(lat_rad) / *radious_m) * (height_m + pow2_earth_rp / radius_mean); + float cos_colat = (sinf(lat_rad) / *radius_m) * (height_m + pow2_earth_rp / radius_mean); *colat_rad = C2A_MATH_acos_rad(cos_colat); @@ -215,10 +215,10 @@ C2A_MATH_ERROR TIME_SPACE_convert_ecef_to_lla(double lla_rad_m[PHYSICAL_CONST_TH double distance_p_m = sqrt(pos_ecef_m[0] * pos_ecef_m[0] + pos_ecef_m[1] * pos_ecef_m[1]); - double dot_z_earth_radious_a = pos_ecef_m[2] * Re; - double dot_xy_earth_radious_b = distance_p_m * Re_p; + double dot_z_earth_radius_a = pos_ecef_m[2] * Re; + double dot_xy_earth_radius_b = distance_p_m * Re_p; - double theta_rad = atan(dot_z_earth_radious_a / dot_xy_earth_radious_b); + double theta_rad = atan(dot_z_earth_radius_a / dot_xy_earth_radius_b); double sin_theta = sin(theta_rad); double cos_theta = cos(theta_rad); diff --git a/src/src_user/Library/time_space.h b/src/src_user/Library/time_space.h index 089fb407..b39406f9 100644 --- a/src/src_user/Library/time_space.h +++ b/src/src_user/Library/time_space.h @@ -24,21 +24,21 @@ double TIME_SPACE_convert_gpstime_to_julian_day(const uint16_t gps_time_week, co * @brief Julian DayからJulian Centuryへの変換 * * 色々なところで使いまわす1次項だけ計算 - * @param julian_day : JulianDay [day] (should be larger than JulainDay at Epoch of J2000) + * @param julian_day : JulianDay [day] (should be larger than Julian Day at Epoch of J2000) * @return Julian Century [century] (returns zero when the input is out-of-range ) */ double TIME_SPACE_convert_julian_day_to_century(const double julian_day); /** - * @brief Greenwitch Mean Sidereal Time (GMST) [rad]の計算 - * @param julian_day : JulianDay [day] (should be larger than JulainDay at Epoch of J2000) + * @brief Greenwich Mean Sidereal Time (GMST) [rad]の計算 + * @param julian_day : JulianDay [day] (should be larger than Julian Day at Epoch of J2000) * @return GMST [rad] (returns zero when the input is out-of-range) */ double TIME_SPACE_calc_gmst_rad(const double julian_day); /** * @brief Julian Dayからdecimal year(基準日からの10進数表記での経過年数) - * @param julian_day : JulianDay [day] (should be larger than JulainDay at Epoch of J2000) + * @param julian_day : JulianDay [day] (should be larger than Julian Day at Epoch of J2000) * @param julian_day_base : JulianDayで表した基準日 [day] * @return decimal year [year] (returns zero when the input is out-of-range ) */ @@ -56,7 +56,7 @@ void TIME_SPACE_calc_sun_direction_eci(const double julian_century, float sun_di /** * @brief NEDからECEFへの座標変換 * @param[out] dcm_ned_to_ecef : rotational matrix from ned to ecef - * @param[in] lat_rad : geodetic lattitude [rad] + * @param[in] lat_rad : geodetic latitude [rad] * @param[in] lon_rad : geodetic longitude [rad] */ void TIME_SPACE_trans_ned_to_ecef(float dcm_ned_to_ecef[][PHYSICAL_CONST_THREE_DIM], @@ -67,10 +67,10 @@ void TIME_SPACE_trans_ned_to_ecef(float dcm_ned_to_ecef[][PHYSICAL_CONST_THREE_D * * 歳差と章動を考慮した変換 * @param[in] julian_century : Julian Century [century] (should be larger than zero) - * @param[in] gmst_rad : Greenwitch Mean Sidereal Time [rad] (should be larger than zero) + * @param[in] gmst_rad : Greenwich Mean Sidereal Time [rad] (should be larger than zero) * @param[out] dcm_eci_to_ecef : coordinate transformation from eci to ecef (set unit matrix when the input is out-of-range) - * @return C2A_MATH_ERROR_RANGE_OVER : Julian CenturyまたはGreenwitch Mean Sidereal Timeが0以下 + * @return C2A_MATH_ERROR_RANGE_OVER : Julian CenturyまたはGreenwich Mean Sidereal Timeが0以下 * @return C2A_MATH_ERROR_OK */ C2A_MATH_ERROR TIME_SPACE_trans_eci_to_ecef(const double julian_day, const double gmst_rad, @@ -80,10 +80,10 @@ C2A_MATH_ERROR TIME_SPACE_trans_eci_to_ecef(const double julian_day, const doubl * @brief ECIからECEFへの変換 R * * 歳差と章動を考慮しない変換 - * @param[in] gmst_rad : Greenwitch Mean Sidereal Time [rad] (should be larger than zero) + * @param[in] gmst_rad : Greenwich Mean Sidereal Time [rad] (should be larger than zero) * @param[out] dcm_eci_to_ecef : coordinate transformation from eci to ecef (set unit matrix when the input is out-of-range) - * @return C2A_MATH_ERROR_RANGE_OVER : Greenwitch Mean Sidereal Timeが0以下 + * @return C2A_MATH_ERROR_RANGE_OVER : Greenwich Mean Sidereal Timeが0以下 * @return C2A_MATH_ERROR_OK */ C2A_MATH_ERROR TIME_SPACE_trans_eci_to_ecef_rotation_only(const double gmst_rad, @@ -91,12 +91,12 @@ C2A_MATH_ERROR TIME_SPACE_trans_eci_to_ecef_rotation_only(const double gmst_rad, /** * @brief 測地経緯度, 高度を地心余緯度, 地心距離に変換 - * @param[out] colat_rad : co-lattitude in geocentric [rad] - * @param[out] radious_m : radious distance in geocentric [m] + * @param[out] colat_rad : co-latitude in geocentric [rad] + * @param[out] radius_m : radius distance in geocentric [m] * @param[in] lla_rad_m : lat, lon, alt in geodetic * @return C2A_MATH_ERROR_OK */ -C2A_MATH_ERROR TIME_SPACE_convert_geodetic_to_geocentric(float* colat_rad, float* radious_m, +C2A_MATH_ERROR TIME_SPACE_convert_geodetic_to_geocentric(float* colat_rad, float* radius_m, const double lla_rad_m[PHYSICAL_CONST_THREE_DIM]); /** From 0a16b44683d78cf3c52d6c3af7e8ed98a5ca2c18 Mon Sep 17 00:00:00 2001 From: Satoshi Ikari Date: Sun, 13 Aug 2023 11:35:05 +0200 Subject: [PATCH 40/40] Fix typo in comment --- src/src_user/Settings/Modes/mode_manager_params.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src_user/Settings/Modes/mode_manager_params.h b/src/src_user/Settings/Modes/mode_manager_params.h index 0ea4d57e..def34e8b 100644 --- a/src/src_user/Settings/Modes/mode_manager_params.h +++ b/src/src_user/Settings/Modes/mode_manager_params.h @@ -1,6 +1,6 @@ /** * @file - * @brief ModeMangaer のパラメーターオーバーライト + * @brief ModeManager のパラメーターオーバーライト */ #ifndef MODE_MANAGER_PARAMS_H_ #define MODE_MANAGER_PARAMS_H_