Merge branch 'components' of https://git.intra.yksa.space/mikhailov.aa/leaflet_svelte into components
This commit is contained in:
commit
2db5d14202
1 changed files with 9 additions and 2 deletions
|
|
@ -42,6 +42,13 @@
|
||||||
const launch_datetime = formatLaunchDateTime(startDate, startTime);
|
const launch_datetime = formatLaunchDateTime(startDate, startTime);
|
||||||
|
|
||||||
const getForecast = async () => {
|
const getForecast = async () => {
|
||||||
|
const profileMap = {
|
||||||
|
'Normal': 'standard_profile',
|
||||||
|
'Float': 'float_profile',
|
||||||
|
'Reverse (ascent only)': 'ascent_only_profile',
|
||||||
|
'Custom': 'custom_profile'
|
||||||
|
};
|
||||||
|
|
||||||
// Create request object
|
// Create request object
|
||||||
const request = {
|
const request = {
|
||||||
ascent_rate: parseFloat(ascentRate),
|
ascent_rate: parseFloat(ascentRate),
|
||||||
|
|
@ -53,7 +60,7 @@
|
||||||
launch_datetime,
|
launch_datetime,
|
||||||
launch_latitude: parseFloat(inputLat),
|
launch_latitude: parseFloat(inputLat),
|
||||||
launch_longitude: parseFloat(inputLng),
|
launch_longitude: parseFloat(inputLng),
|
||||||
profile: flightProfile === 'Normal' ? 'standard_profile' : 'custom_profile',
|
profile: profileMap[flightProfile] || 'standard_profile',
|
||||||
version: 2
|
version: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue