Board index FlightGear Development Documentation

Flightplan wiki error ?

Discussion of the FlightGear documentation, how it can be improved and coordination of people working on it.

Flightplan wiki error ?

Postby clm76 » Thu Nov 30, 2017 6:07 pm

In the wiki « Nasal flightplan », http://wiki.flightgear.org/Nasal_Flightplan, it’s written that the method « cleanPlan() » clears all waypoints including destination and departure.
It’s wrong : Departure and destination are not deleted as we can see with these few lines of code :
Code: Select all
var fp = createFlightplan();       
fp.departure = airportinfo("LFOH");
fp.destination = airportinfo("LFPG");
var navaid = findNavaidsByID("DVL");
navaid = navaid[0];
var wp = createWPFrom(navaid);
fp.insertWP(wp,1);
print(fp.getPlanSize()); ## return 3
fp.cleanPlan();
print(fp.getPlanSize());  ## return 2
for (var i=0;i<fp.getPlanSize();i+=1) {
  print(fp.getWP(i).wp_name);
} ### return « LFOH » and « LFPG »

Can I correct the wiki ?
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: Flightplan wiki error ?

Postby Clive2670 » Sat Dec 02, 2017 7:32 pm

Yes you can you just need to register yourself with a user name and password, I have added things to the Wiki myself, it's that easy hope this helps. All I can say (As I'm no coder) please ensure that the code will work flawlessly, as the last thing you want are disgruntled Flightgear Pilots "shouting your name from the rooftops" If they insert code into Flightgear and it causes crashes!
Thanks Clive aka: G-BLS01
Can be seen flying the Boeing 777-200LR
Toshiba laptop,
Intel i5 4210U,
16Gb RAM,
AMD R7-M260 graphics 2Gb RAM
Clive2670
 
Posts: 589
Joined: Mon Feb 08, 2016 8:11 pm
Location: Anywhere in the World at some point on Flightgear!
Callsign: G-BLS01
Version: 2018.3.1
OS: Windows 10 64bit

Re: Flightplan wiki error ?

Postby Johan G » Sun Dec 03, 2017 3:18 pm

Consider skimming through the first two sections here (perm). In particular Help:Your first article (perm) will be of help I hope (in particular if you have not worked with a wiki before), even if you just edit an existing article.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Flightplan wiki error ?

Postby clm76 » Sun Dec 03, 2017 4:40 pm

Wiki corrected.
Thanks for your replies.
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2


Return to Documentation

Who is online

Users browsing this forum: No registered users and 2 guests