Skip to content

Commit

Permalink
SITL: add some parameter documentation
Browse files Browse the repository at this point in the history
SITL: vehicle_test_suite.py parameters removal from whitelist

SITL: Add known unit amp hour

SITL: Add known unit Ah

Co-authored-by: Peter Barker <[email protected]>
  • Loading branch information
YuxinPan and peterbarker committed Sep 10, 2024
1 parent b38201b commit 46763d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
5 changes: 3 additions & 2 deletions Tools/autotest/param_metadata/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ def has_param(self, pname):
'dB' : 'decibel' ,
# compound

'kB' : 'kilobytes' ,
'kB' : 'kilobytes' ,
'MB' : 'megabyte' ,
'm.m/s/s' : 'square meter per square second',
'deg/m/s' : 'degrees per meter per second' ,
'm/s/m' : 'meters per second per meter' , # Why not use Hz here ????
'mGauss/A': 'milligauss per ampere' ,
'mAh' : 'milliampere hour' ,
'mAh' : 'milliampere hour' ,
'Ah' : 'ampere hour' ,
'A/V' : 'ampere per volt' ,
'm/V' : 'meters per volt' ,
'gravities': 'standard acceleration due to gravity' , # g_n would be a more correct unit, but IMHO no one understands what g_n means
Expand Down
13 changes: 0 additions & 13 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2559,14 +2559,9 @@ def test_adsb_send_threatening_adsb_message(self, here, offset_ne=None):
def get_sim_parameter_documentation_get_whitelist(self):
# common parameters
ret = set([
"SIM_ACC_FILE_RW",
"SIM_ACC_TRIM_X",
"SIM_ACC_TRIM_Y",
"SIM_ACC_TRIM_Z",
"SIM_ADSB_ALT",
"SIM_ADSB_COUNT",
"SIM_ADSB_RADIUS",
"SIM_ADSB_TX",
"SIM_ARSPD2_OFS",
"SIM_ARSPD2_RND",
"SIM_ARSPD_OFS",
Expand All @@ -2591,7 +2586,6 @@ def get_sim_parameter_documentation_get_whitelist(self):
"SIM_BAR3_WCF_LFT",
"SIM_BAR3_WCF_RGT",
"SIM_BAR3_WCF_UP",
"SIM_BARO_COUNT",
"SIM_BARO_DELAY",
"SIM_BARO_DISABLE",
"SIM_BARO_FREEZE",
Expand All @@ -2601,12 +2595,6 @@ def get_sim_parameter_documentation_get_whitelist(self):
"SIM_BARO_WCF_LFT",
"SIM_BARO_WCF_RGT",
"SIM_BARO_WCF_UP",
"SIM_BATT_CAP_AH",
"SIM_BAUDLIMIT_EN",
"SIM_DRIFT_SPEED",
"SIM_DRIFT_TIME",
"SIM_EFI_TYPE",
"SIM_ESC_ARM_RPM",
"SIM_FTOWESC_ENA",
"SIM_FTOWESC_POW",
"SIM_GND_BEHAV",
Expand All @@ -2616,7 +2604,6 @@ def get_sim_parameter_documentation_get_whitelist(self):
"SIM_GYR4_RND",
"SIM_GYR5_RND",
"SIM_GYR_FAIL_MSK",
"SIM_GYR_FILE_RW",
"SIM_IE24_ENABLE",
"SIM_IE24_ERROR",
"SIM_IE24_STATE",
Expand Down
7 changes: 4 additions & 3 deletions libraries/SITL/SITL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ const AP_Param::GroupInfo SIM::var_info[] = {
AP_GROUPINFO("BATT_VOLTAGE", 19, SIM, batt_voltage, 12.6f),
// @Param: BATT_CAP_AH
// @DisplayName: Simulated battery capacity
// @Description: Simulated battery capacity in Amp hours
// @Description: Simulated battery capacity
// @Units: Ah
// @User: Advanced
AP_GROUPINFO("BATT_CAP_AH", 20, SIM, batt_capacity_ah, 0),
AP_GROUPINFO("SONAR_GLITCH", 23, SIM, sonar_glitch, 0),
Expand Down Expand Up @@ -180,7 +181,7 @@ const AP_Param::GroupInfo SIM::var_info[] = {
AP_GROUPINFO("FLOW_DELAY", 36, SIM, flow_delay, 0),
// @Param: ADSB_COUNT
// @DisplayName: Number of ADSB aircrafts
// @Description: Total number of ADSB simulated aircrafts
// @Description: Total number of ADSB simulated aircraft
AP_GROUPINFO("ADSB_COUNT", 45, SIM, adsb_plane_count, -1),
// @Param: ADSB_RADIUS
// @DisplayName: ADSB radius stddev of another aircraft
Expand All @@ -194,7 +195,7 @@ const AP_Param::GroupInfo SIM::var_info[] = {
AP_GROUPINFO("ADSB_ALT", 47, SIM, adsb_altitude_m, 1000),
AP_GROUPINFO("PIN_MASK", 50, SIM, pin_mask, 0),
// @Param: ADSB_TX
// @DisplayName: ADSB transceiever enable
// @DisplayName: ADSB transmit enable
// @Description: ADSB transceiever enable and disable
// @Values: 0:Transceiever disable, 1:Transceiever enable
AP_GROUPINFO("ADSB_TX", 51, SIM, adsb_tx, 0),
Expand Down

0 comments on commit 46763d6

Please sign in to comment.