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 5: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: 135
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.2.0
OS: Linux Mint 18.3

Re: Flightplan wiki error ?

Postby Clive2670 » Sat Dec 02, 2017 6: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, BIGJET1
Can be seen flying the Boeing 777-200LR
Toshiba laptop,
Intel i5 4210U,
16Gb RAM,
AMD R7-M260 graphics 2Gb RAM
User avatar
Clive2670
 
Posts: 557
Joined: Mon Feb 08, 2016 7:11 pm
Location: Anywhere in the World at some point on Flightgear!
Callsign: G-BLS01, BIGJET1
Version: 2018.1.1
OS: Windows 10 64bit

Re: Flightplan wiki error ?

Postby Johan G » Sun Dec 03, 2017 2: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)
Johan G
Moderator
 
Posts: 5266
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Flightplan wiki error ?

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

Wiki corrected.
Thanks for your replies.
clm76
 
Posts: 135
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.2.0
OS: Linux Mint 18.3


Return to Documentation

Who is online

Users browsing this forum: No registered users and 1 guest