diff --git a/src/routes/ControlPanel.svelte b/src/routes/ControlPanel.svelte index be219f9..3f9c82d 100644 --- a/src/routes/ControlPanel.svelte +++ b/src/routes/ControlPanel.svelte @@ -42,7 +42,14 @@ const launch_datetime = formatLaunchDateTime(startDate, startTime); const getForecast = async () => { - // Create request object + const profileMap = { + 'Normal': 'standard_profile', + 'Float': 'float_profile', + 'Reverse (ascent only)': 'ascent_only_profile', + 'Custom': 'custom_profile' + }; + + // Create request object const request = { ascent_rate: parseFloat(ascentRate), burst_altitude: parseFloat(burstAltitude), @@ -53,7 +60,7 @@ launch_datetime, launch_latitude: parseFloat(inputLat), launch_longitude: parseFloat(inputLng), - profile: flightProfile === 'Normal' ? 'standard_profile' : 'custom_profile', + profile: profileMap[flightProfile] || 'standard_profile', version: 2 };