Is it possible to change SITL position using Mavlink requests or increase SIM_SPEEDUP?

Hello all,

I’m a new user of Ardupilot.
Through an external software, I’m able to download trajectories and run a mission.
I’m wondering if there is any way to change the UAV position to an other mission waypoint for example.

For demonstration purpose, I want to show some parts of the trajectory without waiting the UAV to fly to. I’m not able to find how to change in simulation the UAV position to an other part of my trajectory.

Any ideas or this is not possible ?

Thanks in advance,

It’s a bit unclear what you’re asking.
You can navigate to waypoints (those are not predefined like mission) in GUIDED mode individually.
Is this what you’re looking for?

Hello and thanks for your answer.
I don’t want to navigate but change the position. for example, when my UAV starts to follow its trajectory and is between waypoints 2 and 3. I want a kind of “teleport” to set its postion on waypoint 19 and make it to follow the traj to the 20 (for this part set_target_position shall be ok)

I don’t know if it’s more clear for you

Well, there is no teleporting :slight_smile:
But you can change the simulation speed by setting the parameter “SIM_SPEEDUP” so the simulation will be faster.
If you set it to 5, means that it will simulate 5x faster.
You can also change the current waypoint during flight to skip some waypoints with MISSION_SET_CURRENT.
Are these enough for your use case?

Okay thanks a lot it is what i thought :slight_smile:

I already used SIM_SPEEDUP through PARAM_SET request and it works well.
I just have some questions about it : Is there a maximum value ?
I tested many values but it seems to be caped by a maximum. If I could bypass this cap, it could be awesome.


I had a look at the source code, and it doesn’t appear that there are fixed constraints on SITL speedup. The test module uses values up to 200. As you’ve already seen in this topic, it appears there is a limit, probably based on the fact that SITL eventually just cannot run any faster.

If you need to simulate something faster than 200x actual speed, I’d suggest there is a fundamental problem with your test procedure.

Please do not post the same question multiple times.

Thanks for your answer.

The trajectory downloaded is very long that’s why I wanted to have huge ramp up on simu speed because I need to reach a specific point at in about 2mins.

Maybe a better way to do is to change the departure point of my trajectory to be closer from the specific point I need to reach

Sorry about that thought it was bettern to open a new topic on that question because it was a new question different from the one of this topic.

The discussion is all related. I made a minor edit to the title to reflect that.

I think using a different start point in the simulation is a great way to achieve your goal. In Mission Planner, you can enter something like this into the extra command line options for SITL. The arguments are latitude, longitude, elevation, and heading.


Ok fine and thanks again.

Related to that, if I run a mission with my whole trajectory downloaded and change the Home point as you suggested, if I run the mission in AUTO_ARMED mode, it seems that after takeoff the UAV returns to the start of my dowloaded trajectory event if I changed current waypoint with MISSION_SET_CURRENT waypoint. I’m wonderning what is the cleanest method to select the next waypoint to target AUTO_ARMED mode.
I thought to use SET_POSITION_TARGET_GLOBAL_INT with my next waypoint coordinates but i think it will works only on guided mode. Any advice on the way to do ?

Tanks in advance,

I am not well versed in Plane, but I think you should be able to use the set waypoint feature as desired.

Have a look at MIS_RESTART

I really searched hard for that and couldn’t find any limit for that parameter.
I think it reaches the limit of Nyquist rate around 200Hz because of the control loop of the firmware rated at 400Hz.
Although I never did some experiments, there are some parameters like SIM_RATE_HZ, SCHED_LOOP_RATE those you can try but, warning, these might mess things up :slightly_smiling_face: