Page 1 of 1

presetThrottle & Altitude in Waypoint

Posted: Sun Dec 04, 2022 3:49 pm
by GJV
Good afternoon,

I'm trying to initiate a A/C with WP's but cannot get the speed and altitude in the Waypoints. Unable to find what I'm doing wrong, also not seeing both parameters in the Waypoint settings.

Code: Select all

-- Add A/C + Homeplate
local homebase = ScenEdit_GetUnit({name='Chernyakhovsk Air Base', guid='DA4EJL-0HMLKS285SKR0'});
local AC1 = ScenEdit_AddUnit({guid='2BGABG-0HMMD7HQ13JL5', name='Golub #1', side='Russia', DBID=600, LoadoutID=1473, type='aircraft', latitude='54.6177049426136', longitude='21.7828231889477', altitude=3500, heading=270, presetThrottle='cruise'});
AC1.base = homebase;

-- Set WP's
ProbeCourse = {
    [1] = { TypeOf = 'ManualPlottedCourseWaypoint',  desription='1-High', latitude='55.5613458922204', longitude='17.7358573281829', presetAltitude='HIGH25000' presetThrottle='military'},
    [2] = { TypeOf = 'ManualPlottedCourseWaypoint',  desription='2-Low', latitude='55.6885769813964', longitude='16.7903917927341', presetAltitude='LOW2000', presetThrottle='afterburner'} ,
    [3] = { TypeOf = 'ManualPlottedCourseWaypoint',  description='target', latitude='56.2017352448754', longitude='16.1747209083475'} } -- deze nog on-top!
    ScenEdit_SetUnit({guid='2BGABG-0HMMD7HQ13JL5', Course=ProbeCourse})
If someone sees my mistake, much appriciated.
regards

Re: presetThrottle & Altitude in Waypoint

Posted: Thu Dec 08, 2022 1:50 pm
by KnightHawk75
What version?

You need to add the DesiredAltitude I think (1147.4x) as just the presets without will not work as the desired gets set by the gui process you must add it yourself when manipulating course tables on your own. Probably need the description spelled right too, and comma was missing in the course entry for #1 after presetAltitude.

IE this works in 1147.4x (note DesiredAltitude is in meters):

Code: Select all

local probeCourse = {
    [1] = {description='1-High', latitude='55.5613458922204', longitude='17.7358573281829', presetAltitude='HIGH25000', presetThrottle='military',DesiredAltitude='7620.0'},
    [2] = {description='2-Low', latitude='55.6885769813964', longitude='16.7903917927341', presetAltitude='LOW2000', presetThrottle='afterburner',DesiredAltitude='609.6'} ,
    [3] = {description='target', latitude='56.2017352448754', longitude='16.1747209083475'} -- deze nog on-top!
}
local homebase = ScenEdit_GetUnit({name='Chernyakhovsk Air Base', guid='DA4EJL-0HMLKS285SKR0'});
local ac1 = ScenEdit_AddUnit({name='Golub #1', side='Russia', DBID=600, LoadoutID=1473, type='aircraft', latitude='37.6177049426136', longitude='-93.7828231889477', altitude=3500, heading=270, presetThrottle='cruise'});
ac1.base = homebase;
ac1.course = probeCourse;

Re: presetThrottle & Altitude in Waypoint

Posted: Thu Dec 08, 2022 7:19 pm
by Parel803
Knighthawk thank you for time and answer.
Sorry for the messy stuff.
best regards GJ