p1: fig
This commit is contained in:
@@ -79,29 +79,29 @@ class LaunchSite:
|
||||
# 预定义的发射场
|
||||
LAUNCH_SITES = {
|
||||
# 赤道参考
|
||||
'赤道': LaunchSite("Equator (参考)", 0.0),
|
||||
'赤道': LaunchSite("Equator", 0.0),
|
||||
|
||||
# 法属圭亚那 (接近赤道)
|
||||
'Kourou': LaunchSite("Kourou (French Guiana)", 5.2),
|
||||
'Kourou': LaunchSite("French Guiana", 5.2),
|
||||
|
||||
# 印度
|
||||
'SDSC': LaunchSite("Satish Dhawan (India)", 13.7),
|
||||
'SDSC': LaunchSite("Satish Dhawan", 13.7),
|
||||
|
||||
# 美国
|
||||
'Texas': LaunchSite("Boca Chica (Texas)", 26.0),
|
||||
'Florida': LaunchSite("Cape Canaveral (Florida)", 28.5),
|
||||
'California': LaunchSite("Vandenberg (California)", 34.7),
|
||||
'Virginia': LaunchSite("Wallops (Virginia)", 37.8),
|
||||
'Alaska': LaunchSite("Kodiak (Alaska)", 57.4),
|
||||
'Texas': LaunchSite("Texas", 26.0),
|
||||
'Florida': LaunchSite("Florida", 28.5),
|
||||
'California': LaunchSite("California", 34.7),
|
||||
'Virginia': LaunchSite("Virginia", 37.8),
|
||||
'Alaska': LaunchSite("Alaska", 57.4),
|
||||
|
||||
# 中国
|
||||
'Taiyuan': LaunchSite("Taiyuan (China)", 38.8),
|
||||
'Taiyuan': LaunchSite("Taiyuan", 38.8),
|
||||
|
||||
# 新西兰
|
||||
'Mahia': LaunchSite("Mahia (New Zealand)", -39.3), # 南半球
|
||||
'Mahia': LaunchSite("Mahia", -39.3), # 南半球
|
||||
|
||||
# 哈萨克斯坦
|
||||
'Baikonur': LaunchSite("Baikonur (Kazakhstan)", 45.6),
|
||||
'Baikonur': LaunchSite("Kazakhstan", 45.6),
|
||||
}
|
||||
|
||||
|
||||
@@ -535,8 +535,12 @@ def plot_latitude_effects(
|
||||
mission_plot = mission
|
||||
title_suffix = " (Target: Equatorial Orbit)"
|
||||
|
||||
# Golden ratio aspect: width=10, height=10*0.618
|
||||
fig, ax = plt.subplots(figsize=(10, 10 * 0.618))
|
||||
# Golden ratio aspect: 缩小尺寸使字体相对更大
|
||||
fig, ax = plt.subplots(figsize=(8, 8 * 0.618))
|
||||
|
||||
# 中低饱和度配色
|
||||
color_curve = '#52796F' # 暗绿色 - 曲线
|
||||
color_point = '#8E7B9A' # 灰紫色 - 数据点
|
||||
|
||||
# Continuous latitude range
|
||||
latitudes = np.linspace(0, 65, 100)
|
||||
@@ -549,29 +553,32 @@ def plot_latitude_effects(
|
||||
fuel_ratios.append(result['fuel_ratio'])
|
||||
|
||||
# Plot continuous curve
|
||||
ax.plot(latitudes, fuel_ratios, 'g-', linewidth=2, label='Fuel Ratio vs Latitude')
|
||||
ax.plot(latitudes, fuel_ratios, color=color_curve, linewidth=2, label='Fuel Ratio vs Latitude')
|
||||
|
||||
# Mark launch sites with custom offsets to avoid overlap with curve
|
||||
# Offsets: (x, y) in points - positive y moves text up, positive x moves right
|
||||
# 纬度参考: Equator(0), French Guiana(5.2), Satish Dhawan(13.7), Texas(26),
|
||||
# Florida(28.5), California(34.7), Virginia(37.8), Taiyuan(38.8),
|
||||
# Mahia(39.3), Kazakhstan(45.6), Alaska(57.4)
|
||||
label_offsets = {
|
||||
'赤道': (5, -15), # Below curve
|
||||
'Kourou': (5, 8), # Above curve
|
||||
'SDSC': (5, -15), # Below curve
|
||||
'Texas': (-50, 8), # Left and above
|
||||
'Florida': (5, 8), # Above curve
|
||||
'California': (-60, -8), # Left
|
||||
'Virginia': (5, 8), # Above curve
|
||||
'Taiyuan': (-45, -12), # Left and below
|
||||
'Mahia': (5, 8), # Above curve
|
||||
'Alaska': (5, -15), # Below curve
|
||||
'Baikonur': (5, 8), # Above curve
|
||||
'Kourou': (-75, 15), # Left above (French Guiana)
|
||||
'SDSC': (8, -15), # Below right (Satish Dhawan)
|
||||
'Texas': (-38, -15), # Left below
|
||||
'Florida': (8, -15), # Right below
|
||||
'California': (8, -15), # Right below
|
||||
'Virginia': (8, 12), # Right above
|
||||
'Taiyuan': (-52, 12), # Left above (避开California)
|
||||
'Mahia': (8, -18), # Right below
|
||||
'Alaska': (8, 8), # Right above
|
||||
'Baikonur': (8, 8), # Right above (Kazakhstan)
|
||||
}
|
||||
|
||||
for name, site in LAUNCH_SITES.items():
|
||||
abs_lat = abs(site.latitude)
|
||||
site_temp = LaunchSite(site.name, abs_lat)
|
||||
result = ground_launch_specific_energy_with_latitude(engine, mission_plot, site_temp, constants)
|
||||
ax.plot(abs_lat, result['fuel_ratio'], 'mo', markersize=8)
|
||||
ax.plot(abs_lat, result['fuel_ratio'], 'o', color=color_point, markersize=8)
|
||||
# Simplified label
|
||||
label = site.name.split('(')[0].strip()
|
||||
# Get custom offset for this site, default to (5, 8)
|
||||
@@ -583,7 +590,7 @@ def plot_latitude_effects(
|
||||
ax.set_ylabel('Fuel / Payload Mass Ratio', fontsize=12)
|
||||
# ax.set_title(f'Fuel Requirement vs Launch Latitude{title_suffix}', fontsize=13)
|
||||
ax.grid(True, alpha=0.3)
|
||||
ax.set_xlim(0, 65)
|
||||
ax.set_xlim(-2, 65)
|
||||
|
||||
plt.tight_layout()
|
||||
plt.savefig(save_path, dpi=150, bbox_inches='tight')
|
||||
|
||||
Reference in New Issue
Block a user