profile fix
This commit is contained in:
parent
cd98f04622
commit
6bd3a656f9
1 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue