• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS20 Teleport Workaround?

Messages
46
Country
unitedstates
Did anyone find a workaround for teleport in MSFS? It appears to be broken in its current state. I can teleport successfully to the proper location, but heading, altitude, speed, etc. is not retained.
 
For the RequestTeleportAction to work properly you need to specify a SimState file, which is just an .FLT file that defines state of the aircraft after the teleport. Variables you don't define in the SimState file will be filled in from the last used .FLT, usually the .FLT that loaded the flight. This means that after teleport, things like lights, flaps, and crucially simvars, will be reset to the state at the start of the flight.

The simvars contain the coordinates, altitude, orientation, speeds, and a variable called SimOnGround:

Code:
[SimVars.0]
Latitude=N37° 57' 15.09"
Longitude=W107° 54' 7.20"
Altitude=+015009.81
Pitch=-1.7961822304756200896
Bank=0
Heading=67.595765396585463236
PVelBodyAxis=0
BVelBodyAxis=0
HVelBodyAxis=0
XVelBodyAxis=-8.3283299715813328135
YVelBodyAxis=-12.848052061414350078
ZVelBodyAxis=465.00570101166533732
SimOnGround=False
OnPlatformHeight=-9999999999

The coordinates, altitude, and orientation can be defined by the RequestTeleportAction, but the speeds and SimOnGround will be reset to the start. So if the flight started on the ground and the teleport was in the air, SimOnGround will be reset to True, and the plane will be put on the ground immediately after teleport.

To fix this, you should use a SimStateFile. This is the configuration that worked for me:
XML:
        <SimMission.RequestTeleportAction InstanceId="{858FF2F5-D5DA-42D6-BB25-0DADB7204774}">
            <SimStateFilename>offground</SimStateFilename>
            <AttachedWorldPosition>
                <WorldPosition>N41° 1' 52.45",W113° 44' 27.00",+007000.00</WorldPosition>
                <AltitudeIsAGL>False</AltitudeIsAGL>
                <Orientation>0.000,0.000,145.000</Orientation>
                <IsOnGround>False</IsOnGround>
            </AttachedWorldPosition>
        </SimMission.RequestTeleportAction>

offground.FLT:
Code:
[SimVars.0]
SimOnGround=False
XVelBodyAxis=0
YVelBodyAxis=0
ZVelBodyAxis=200.000

This will make sure the plane doesn't teleport to the ground and has forward speed, but still reset things changed after spawn such as flaps, gear, and lights, but you can add them to the .FLT as well.

I don't think this is the best way for the teleport to work. I think it would be better it the RequestTeleportAction didn't reset variables to the state at the start, but kept them the same as immediately before the teleport.

PS: You can specify Airspeed in the RequestTeleportAction, but it didn't work properly in my experience.
 
Mr_LiamT,

Thanks for your knowledge and information once again. I'll try applying what you have written here and see if I have success. I haven't messed with Simvars too much yet, but I am learning (slowly) how to interact with the sim.

Thanks again,

Jeff
 
Back
Top