Board index FlightGear Support

Continuing from last position or airport, saving position?

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

Please report any bugs not specific to an aircraft on the issue tracker.
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Continuing from last position or airport, saving position?

Postby jaychris » Fri Jul 08, 2016 11:44 am

This seems so obvious, but I haven't found a way to do this in fg 2016.2.1. I want to fly to an airport and stay there "overnight" and continue my trip the next time I start flightgear. The plain should be where I parked it on that airport I landed on.
I really found no way to do that and I searched online for quite some time to find an answer.
Thanks,
Jay
jaychris
 
Posts: 3
Joined: Fri Jul 08, 2016 11:01 am

Re: Continuing from last position or airport, saving positio

Postby elgaton » Fri Jul 08, 2016 1:12 pm

Currently, there is no specific functionality in FlightGear to store the last saved position, but you can:
  1. choose Debug->Browse Internal Properties, then single-click on position/ and note down the values of latitude-deg and longitude-deg;
  2. close the Browse Internal Properties window;
  3. click on Equipment->Map and note down the current heading of the aircraft, then close the window and quit FlightGear.
To resume your flight, just launch the program as follows (I'm using the options you specified in your other post):
Code: Select all
fgfs --httpd=8080 --units-meters --airport=<airport> \
--terrasync-dir=/home/jay/.fgfs/TerraSync \
--fg-scenery=/home/jay/.fgfs/TerraSync \
--download-dir=/home/jay/.fgfs \
--lon=<longitude> --lat=<latitude> --heading=<heading>

(replace <airport> with the ICAO code of the airport, <longitude>, <latitude> and <heading> with the values you noted down).
NIATCA 2nd admin, regular ATC at LIPX and creator of the LIPX custom scenery
elgaton
 
Posts: 1106
Joined: Tue Mar 19, 2013 5:58 pm
Callsign: I-ELGA/LIPX_TW
Version: Git
OS: Windows + Arch Linux

Re: Continuing from last position or airport, saving positio

Postby Thorsten » Fri Jul 08, 2016 1:12 pm

The simple version is to just start up at the last airport.

Anything more fancy has to be encoded into the aircraft (fuel levels, damage, state when you left it, tiedown,...). In principle save/resume isn't hard to do (the Shuttle does it for complex dynamical states, I'm right now designing the atmosphere part of the RTLS autopilot based on a saved post-MECO state where the Shuttle is loaded directly before the plunge into the atmosphere) but it has to be done.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Continuing from last position or airport, saving positio

Postby Fritz » Fri Jul 08, 2016 5:09 pm

I mostly start from where I stopped the day before. My technique is based on "start up at the last airport", but it also uses log files to save the exact parking location (using only log files doesn't work in many cases). It also saves and restores some of the aircraft properties, like trim settings and fuel, but this depends on the aircraft model.

I mentioned in another thread how I do it and what problems can occur.
Fritz
 
Posts: 283
Joined: Tue Apr 26, 2016 11:04 pm
Location: Bavaria, Germany, near ETSL
Version: 2018.3.6
OS: Windows 7 Prof.

Re: Continuing from last position or airport, saving positio

Postby Mentris » Mon Nov 29, 2021 7:46 am

Late reply, but till now I haven't found a simpler solution:

Open the Nasal Console in Flightgear from the Menu: Debug/Nasal Console. Paste this code into the code box by clicking the button "Paste from Clipboard":

var airport = props.globals.getNode("sim/airport/closest-airport-id",1).getValue();
var lat = props.globals.getNode("position/latitude-deg",1).getValue();
var lon = props.globals.getNode("position/longitude-deg",1).getValue();
var heading = props.globals.getNode("orientation/heading-deg",1).getValue();
clipboard.setText("--airport=" ~ airport ~ "\n--lat=" ~ lat ~ "\n--lon=" ~ lon ~ "\n--heading=" ~ heading ~ "\n");

Flightgear will remember the code, so you won't have to copy it again. Click the "Execute" button. This will copy the exact position and the airport to the clipboard. For example:

--airport=LOWS
--lat=47.78944808943559
--lon=13.00141765510436
--heading=74.7499486705456

You can use this in the launcher and paste it into the box at "Settings/Additional Settings". This will be saved when you close the launcher. Or create an .fgfsrc file and save it there.

Kind regards
Mentris
Mentris
 
Posts: 1
Joined: Mon Nov 29, 2021 7:31 am

Re: Continuing from last position or airport, saving positio

Postby Doorknob747 » Mon Mar 07, 2022 8:33 am

I have done the following and it works on some aircrafts, or Flight gear will crash on others.

Before you exit, create the save point by first saving the flight recorder tape. Then save the route plan from the route planer. Make sure this is done much before or a while after crossing a waypoint.

When you want to start from where you have left off, do the following:
If you are using an MD-11, Boeing 737, DC-10, 747-400, there is a different one marked bellow that you must follow.

Other Aircrafts not listed above,
*Note that for most aircrafts, the fuel levels in fuel tanks are saved in the flight recorder tape, however the passenger/crew/cargo weights are not.
First start with the same aircraft and sub-aircraft type from any location on the ground.. yes on the ground like normal.
Set the crew/cargo/passenger weight accordingly.
Now open the folder where the route plans are stored, and open the one you saved with notepad.
Using that info, re enter the route plan.
After that is done, activate the route plan.
Now set the AP speed to the last speed you presume the aircraft was at where you left off.
Now start the aircraft as normal.
*Before you continue make sure all flaps and spoilers are retracted, and all flight controls, are centered "press 5", AND PARKING BREAKS ARE ACTIVE!!!!
*Read and try to remember everything till the "you are back where you left off" or your aircraft might end up in a crashed state if it hits something on the ground, or crashes into the ground after falling from the sky.
Now with parking breaks active, Increase throttle till N1 reaches anywhere between 85% to 95%. <-- if this is not done, when "my controls is pressed, and auto throttle activated, the aircraft will have to rev up the engines (thus the aircraft could stall or start nose diving).
Now load the flight recorder tape that you saved before.
DO NOT JUST JUMP TO THE END AND PRESS MY CONTROLS YET, your route planer still thinks you are the starting location. Go to 2 to 3 minutes before the end of the tape and try to see from distance to next waypoint via HUD or aircraft display, which waypoint the aircraft was heading to when the tape was saved. This can be done by opening the route manager, and selecting a waypoint then pressing "jump to". If in this process "end of tape" is reached, go back 4-5 minutes again before the end of tape. The "distance to waypoint" that shows it counting down (heading towards) and with the lowest distance, is the waypoint that the aircraft was going to when the tape was saved. Now with that waypoint "jump to"'ed, on to the next step.
Go to the end of tape, and have your finger above the pause key "p". Right after clicking my control you must press the pause key.
At this moment, the aircraft route manager is in the state where it was when the tape was saved, and the plane is now at that location as well.
Now turn on autothrottle, and autopilot with vnav and lnav, and then unpause. You are now almost there.
Fine tune the speed autothrottle.
you are back where you left off


For other aircrafts that were listed above, after clicking my controls and pausing, you will notice that the landing gear (example MD-11) is in the stowed position, but is stowed outwards and not in wards. Also you will notice that the flats are extended, is displayed on the console, but are not visibly extended from the exterior.

You must turn on the auto pilot and auto throttle. Then lower gear and raise the gear to fix the gear problem. Then lower the flaps all the way then raise them. If this is not done, within 4 to 5 minutes the flight gear software will catch this unusual problem, and flight gear will crash.
Doorknob747
 
Posts: 60
Joined: Thu Sep 02, 2021 5:27 am


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests