...Среда, 25.12.2024, 21:20



Приветствую Вас Гость | RSS
Главная
[ Обновленные темы · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 4
  • 1
  • 2
  • 3
  • 4
  • »
Setting Departure & Destination with XML?
cassini-mДата: Пятница, 12.08.2011, 06:22 | Сообщение # 1
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Is it possible to use the XML GPS variables to set a flight plan that isn't direct to, direct to destination? As though it is an actual flight plan?
 
RobertДата: Пятница, 12.08.2011, 06:22 | Сообщение # 2
Группа: Удаленные





Yes it is, although you won't be able to save the plan to disk.

Download the honewell fmc and examine the script to learn how.
 
cassini-mДата: Пятница, 12.08.2011, 06:22 | Сообщение # 3
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
honeywellfmc.zip by Garrett Smith?

I downloaded this and worked with it some but it won't let me set the Origin or Destination if I don't have a flight plane active at the time of use. It actually doesn't let me do anything as far as setting a route if there isn't a flight plan loaded already.
 
RobertДата: Пятница, 12.08.2011, 06:22 | Сообщение # 4
Группа: Удаленные





Yes, that's the one. I haven't looked at it in a very long time, so obviously "misremembered" (is that even a word?) its capabilities...
 
cassini-mДата: Пятница, 12.08.2011, 06:22 | Сообщение # 5
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
No worries Bill, but you do say this is possible correct? To set the origin in a flight plan and destination using XML I understand you can't create or save the file using xml for the purposes of the flight would this be possible. From what limited knowledge I have I've only see that it's possible to set the destination if you will and in a direct to format.
 
Батька_ЧерноморДата: Пятница, 12.08.2011, 06:23 | Сообщение # 6
Генералиссимус
Группа: Менеджер
Сообщений: 1024
Награды: 0
Репутация: 40
Замечания: 0%
Статус: Не в сети
Hi,

You can try the "addwaypoint" way.
Difficult code, but it could work.
Only have experience with navaids, not airports and that works ok.


С уважением, Батька Черномор!


http://avsim.pp.ru/publ/barddakhaev_kirill_alekseevich_batka_chernomor/8-1-0-483
 
cassini-mДата: Пятница, 12.08.2011, 06:24 | Сообщение # 7
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Code
  <!--========================================RTE-1-ORGN-DEST-SET========================================-->

(L:FMC-RTE,enum) 1 == if{  
(L:FMC-RTE-1-ACT,enum) 0 == (L:FMC-RTE-1-READY,enum) 1 == (L:FMC-RTE-ACTIVATE,enum) 1 == and and if{  

'A' (>@c:IcaoSearchStartCursor)  
31 (>@c:enteringInput)  
(L:FMC-RTE-DEST-1,number) chr (L:FMC-RTE-DEST-2,number) chr  
(L:FMC-RTE-DEST-3,number) chr (L:FMC-RTE-DEST-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar)  

(@c:IcaoSearchMatchedIcaosNumber) 1 == if{ (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO) }  

(@c:FlightPlanWaypointIndex) 0 == (@c:IcaoSearchMatchedIcaosNumber) 1 ==  
(@c:IcaoSearchCurrentIcao) (@c:FacilityICAO) == and and if{ 1 (>@c:FlightPlanWaypointIndex) }  

(@c:FacilityICAO) (>@c:FlightPlanNewWaypointICAO)  

'A' (>@c:IcaoSearchStartCursor)  
31 (>@c:enteringInput)  
(L:FMC-RTE-ORGN-1,number) chr (L:FMC-RTE-ORGN-2,number) chr  
(L:FMC-RTE-ORGN-3,number) chr (L:FMC-RTE-ORGN-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar)  

(@c:IcaoSearchMatchedIcaosNumber) 1 == if{ (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO) }  

(@c:IcaoSearchCurrentIdent) (>@c:FlightPlanNewWaypointIdent)  

(L:FlightPlanWaypointIndex,number) (>@c:FlightPlanAddWaypoint)  

' ' (>@c:FacilityICAO) ' ' (>@c:IcaoSearchStartCursor)  

0 (>L:FMC-RTE-ACTIVATE,enum) quit } }
 
cassini-mДата: Пятница, 12.08.2011, 06:40 | Сообщение # 8
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
That's what I got right now, but the code only sets the Destinations airport so only the first half of the code works. It's inside a macro that's activated by a click. If you could point out what I'm doing wrong please.
 
cassini-mДата: Пятница, 12.08.2011, 06:40 | Сообщение # 9
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Code
(L:FMC-POS-INIT,enum) 1 == if{ (L:FMC-UNIT-4,number) 64 > if{

'A' (>@c:IcaoSearchStartCursor) 31 (>@c:enteringInput)  

(L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr  
(L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar)  

(@c:IcaoSearchMatchedIcaosNumber) 1 == if{  

(@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO)  
(@c:FacilityLatitude,degrees) (>L:FMC-POS-REF-ARPT-LAT,degrees)  
(@c:FacilityLongitude,degrees) (>L:FMC-POS-REF-ARPT-LON,degrees)  

(L:FMC-UNIT-1,number) (>L:FMC-POS-REF-ARPT-1,number) (L:FMC-UNIT-2,number) (>L:FMC-POS-REF-ARPT-2,number)
(L:FMC-UNIT-3,number) (>L:FMC-POS-REF-ARPT-3,number) (L:FMC-UNIT-4,number) (>L:FMC-POS-REF-ARPT-4,number)  
  1 (>L:FMC-POS-REF-ARPT,bool) 1 (>L:FMC-UNIT-EMPTY,bool) quit } els{ 1 (>L:FMC-NOT-IN-DATABASE,bool) } }
  els{ 1 (>L:FMC-INVALID-ENTRY,bool) quit } }

Anyone understand why everything in the above piece of code works except the Facility Latitude and Longitude setting to the respective LVar's. Now I've used a string to test weather I get a number for the facility long and lat and I do but the LVar's remain at zero. :Black Eye: My experience with the GPS Variables is that they're cranky sometimes and I can not figure out why they behave in certain ways at times.
 
RobertДата: Пятница, 12.08.2011, 06:42 | Сообщение # 10
Группа: Удаленные





Try

(@c:IcaoSearchMatchedIcaosNumber) 0 >
 
cassini-mДата: Пятница, 12.08.2011, 06:42 | Сообщение # 11
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Tried it, but oddly enough now neither the destination or the origin will set.
 
cassini-mДата: Пятница, 12.08.2011, 06:43 | Сообщение # 12
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Still haven't figure this one out, but I'm close.

I do have anther odd problem though, I am using the FS9GPS module to figure the LAT/LON position of a reference airport entered into the gauge, now here's the code I've been using it's wrapped in a macro and triggered by a click:
Code
<!--========================================POSITION-REFERENCE-AIRPORT========================================-->   

(L:FMC-POS,enum) 1 == if{ (L:FMC-UNIT-4,number) 64 > if{

'A' (>@c:IcaoSearchStartCursor) 31 (>@c:enteringInput)  

(L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr  
(L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar)  

(@c:IcaoSearchMatchedIcaosNumber) 1 == if{  

(@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO)  
(@c:FacilityICAO) (>@c:WaypointAirportICAO)  
(@c:WaypointAirportLatitude,degrees) (>L:FMC-POS-REF-ARPT-LAT,degrees)  
(@c:WaypointAirportLongitude,degrees) (>L:FMC-POS-REF-ARPT-LON,degrees)  

(L:FMC-UNIT-1,number) (>L:FMC-POS-REF-ARPT-1,number) (L:FMC-UNIT-2,number) (>L:FMC-POS-REF-ARPT-2,number)
(L:FMC-UNIT-3,number) (>L:FMC-POS-REF-ARPT-3,number) (L:FMC-UNIT-4,number) (>L:FMC-POS-REF-ARPT-4,number)  
  1 (>L:FMC-POS-REF-ARPT,bool) 1 (>L:FMC-UNIT-EMPTY,bool) quit } els{ 1 (>L:FMC-NOT-IN-DATABASE,bool) } }
  els{ 1 (>L:FMC-INVALID-ENTRY,bool) quit } }


Now the problem I have is everything seems to be working except for the LAT LON lvars setting, they only set at one time when I was testing the gauge and had used a string to see the waypoint icao and facility and icao search strings and make sure they were working properly. Now this set the LAT LON lvars properly every time, but since removing the text elements it will no longer work odd thing is I can not understand what they have to do with one another?

I have one thought at the moment, I know sometimes the FS9GPS values won't be set or won't allow to set if they're in anything but a click and I don't know why that is..
 
ГостьДата: Пятница, 12.08.2011, 06:43 | Сообщение # 13
Группа: Посетители





hello!

Interesting post, hoping someone has a solution to the problem.
 
RobertДата: Пятница, 12.08.2011, 06:43 | Сообщение # 14
Группа: Удаленные





Quote (cassini-m)
Anyone understand why everything in the above piece of code works except the Facility Latitude and Longitude setting to the respective LVar's. Now I've used a string to test weather I get a number for the facility long and lat and I do but the LVar's remain at zero. :Black Eye: My experience with the GPS Variables is that they're cranky sometimes and I can not figure out why they behave in certain ways at times.

Leave in the text elements, but set them to be "invisible." It is necessary for your XML script to dynamically recast the string returned to a FLOAT64 variable value.
 
bar_rodoyДата: Пятница, 12.08.2011, 06:44 | Сообщение # 15
Группа: Удаленные





A couple of things you might consider:

1. You don't need the 31 (>@g:enteringInput). It isn't doing anything for you in its current use. You never need any of the @g functions in your own gauge for that matter. The gps variables are always sufficient to interact with the gps engine. The @g custom functions are part of the gps.dll module and you could make use of them if you want and understand what they do for your code, but it looks like they were written to simplify or facilitate certain parts of the gps_500 gauge (and whatever the equivalent gps xml gauge is in FSX) --- but, again, not required to interact with any part of the gps engine.

2. You don't need the double ICAO transfers. First is IcaoSearchCurrentIcao to FacilityIcao. Second is FacilityIcao to WaypointAirportIcao. Either of the following would work:

IcaoSearchCurrentIcao to WaypointAirportIcao, then assign the Lat and Lon to your L:Vars just as you have coded it, or
IcaoSearchCurrentIcao to FacilityIcao then use FacilityLatitude and Longitude rather than WaypointAirportLatitude and Longitude to set your L:Vars. Why do you need L:Vars anyway since you can read (Get) Lat and Lon from the gps variables in the first place?

3. If you are limiting the Ident / Icao search to just airports, then you actually don't even need IcaoSearch since airport Idents are unique (Idents of the other facilities - NDBs, VOR/ILS/LOC, Intersections are not always unique and IcaoSearch is necessary then). Concatenating 'A _ _ _ _ _ _' (A followed by six spaces) with an airport Ident equals an airport ICAO. If a valid airport Ident is entered into L:FMC-UNIT-X, enum (enum would probably be clinically better than number, I suppose, but number units will work) and StartCursor is 'A', then you will have 1 ICAO match, and no more than 1. The same cannot be said when searching the other facility Ident/Icaos.

4. Icao transfers are an "asynchronous" operation. You cannot transfer IcaoSearchCurrentIcao into the WaypointAirport or Facility group and also retrieve information such as Lat and Lon from that group in the same gauge update cycle. There are a couple of cycle skipping techniques. First is cycle counting/toggling. ICAO transfers are usually a one cycle-skip operation and a cycle toggle might work (but don't use that technique with Nearest searches - they require many cycles). But a better approach is to let the gauge tell you when it's ready for the Airport group or Facility group query. This is similar to the approach used in the FS9 gps_500 gauge where, for example, screen display loops of search results do not begin until ItemsNumber is greater than zero (see line 2016 in the gps_500 gauge).

For your gauge, you might try delaying the L:Var Lat and Lon set by including something like

(C:fs9gps:WaypointAirportRunwaysNumber) 0 >
if{
(@c:WaypointAirportLatitude,degrees) (>L:FMC-POS-REF-ARPT-LAT,degrees)
(@c:WaypointAirportLongitude,degrees) (>L:FMC-POS-REF-ARPT-LON,degrees)
}

Another question - I take it you are entering characters using mouse click areas on your gauge rather than direct keyboard entry... is that right? You might try direct keyboard entry and see how you like it. IcaoSearchEnterChar and NameSearchEnterChar really are nice (and very easy) using direct keyboard entry.

Try that and see if it helps.

Bob

p.s., it's too bad that you cannot accomplish what you originally intended - to create a Flight Plan in xml. As Bill said, you cannot save (or create) a Flight Plan in xml. You can edit one that is already loaded using the FlightPlanNewWaypoint and FlightPlanNewApproach variables, but, of course, if the Flight Plan is already loaded, then it already has a departure and destination airport by definition.
 
cassini-mДата: Пятница, 12.08.2011, 06:44 | Сообщение # 16
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Bill, I thought to do that, but was just annoyed by the fact that I had to. I suppose it'll do, thank you.

Bob,

1 - I have no clue what entering input is for and I was told some time long ago that it was required for an icaosearch so I always included it. I'll try without it.

2 - I need them to set as L:Vars because that way they won't change every time I run a search or something as the gauge will use this function many times.

3 - I seem to understand the concept of what you're saying, but I think if you could post the code version of what you're trying to tell me it may help more. I believe you're saying that if I did: 'A_ _ _ _ _ _' (>@c:IcaoSearchStartCursor) should refine the search to just Airports - although I'm not sure I've got it perfectly right.

4 - I will try including that line and see if it works.

5 - I have incorporated a keyboard entry type but it's a really complex gauge so I've to find a way to register keyboard entries into my FMC-UNIT lvars thence work it round that way as the FMC-UNIT lvars allow the user to type anything at any time.

So you're saying that I is impossible to set the departure airport and destination via xml? Even if I were to some how figure out a way to add a waypoint to the current flight and make that waypoint the departure airport?
 
RobertДата: Пятница, 12.08.2011, 06:45 | Сообщение # 17
Группа: Удаленные





Not quite. If the airport ident is KORD for example, then its ICAO is 'A_ _ _ _ _ _KORD' - that's 'A' followed by six spaces followed by the airport Ident. There you have the full airport ICAO without doing an IcaoSearch. You can get away with using this shortcut only for airports.

'A '
(L:FMC-UNIT-1,enum) chr scat
(L:FMC-UNIT-2,enum) chr scat
(L:FMC-UNIT-3,enum) chr scat
(L:FMC-UNIT-4,enum) chr scat
(>@c:WaypointAirportICAO)
(@c:WaypointAirportRunwaysNumber) 0 >
if{
(@c:WaypointAirportLatitude, degrees) (>L:FMC-POS-REF-ARPT-LAT,degrees)
(@c:WaypointAirportLongitude, degrees) (>L:FMC-POS-REF-ARPT-LON,degrees)
}
 
cassini-mДата: Пятница, 12.08.2011, 06:45 | Сообщение # 18
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
So you're saying that I is impossible to set the departure airport and destination via xml? Even if I were to some how figure out a way to add a waypoint to the current flight and make that waypoint the departure airport?
 
RobertДата: Пятница, 12.08.2011, 06:45 | Сообщение # 19
Группа: Удаленные





Quote (cassini-m)
So you're saying that I is impossible to set the departure airport and destination via xml? Even if I were to some how figure out a way to add a waypoint to the current flight and make that waypoint the departure airport?

Editing the Flight Plan to change the departure airport will not give you very satisfying results* even though editing a loaded Flight Plan to add a new waypoint is a very simple process.

Adding a new waypoint to a loaded flight plan is a two step process that involves defining the latitude and longitude of the new waypoint to be added, followed by assigning a waypoint index for the new waypoint (where the new en route waypoint will be inserted in the Flight Plan).

There are a few approaches for specifying Lat and Lon:

Enter the new waypoint lat and lon degrees or radians directly (necessary for custom waypoints)
Enter the new waypoint ICAO, from which lat and lon will automatically be accessed by fs9gps
Enter the full ICAO directly (usually not a very realistic experience).
Enter the new waypoint facility (airport, navaid or intersection) Ident followed by an ICAO search that determines the unique ICAO, from which lat and lon will be automatically accessed.
For airport waypoints, enter the airport Name followed by NameSearch which can be used to find the airport ICAO

The second step is the FlightPlanAddWaypoint statement. It requires an argument, which in your case, is 0 (zero - the Index pointer for a departure airport). The following would work:

'A '
(L:FMC-UNIT-1,enum) chr scat
(L:FMC-UNIT-2,enum) chr scat
(L:FMC-UNIT-3,enum) chr scat
(L:FMC-UNIT-4,enum) chr scat
(>C:fs9gps:FlightPlanNewWaypointICAO)
0 (>C:fs9gps:FlightPlanAddWaypoint)

Now, your new airport is the departure airport in your Flight Plan.

* Will you like the results? I doubt it.

Whatever had been the departure airport before you added the new departure airport just became WaypointIndex 1. Simple enough to delete it using FlightPlanDeleteWaypoint.
The Lat and Lon retrieved from WaypointAirportLatitude and Longitude is the center of the runway, or in the case of multiple runways, the center of the runway complex. So, you will begin your flight parked at the wrong place rather than at a gate or at the departure end of a runway. You could use WaypointAirportRunwayLatitude and Longitude instead, but then you will first need to specify which runway using WaypointAirportCurrentRunway. Add to that, you almost certainly will not be at the correct altitude -- maybe underground, maybe 500 feet above the airport. You would also have to take care of the new altitude.
Actually, you won't even begin your flight there, because the aircraft is still at the original departure airport. How are you going to move the aircraft to the new departure airport?

Anyway, you can probably see that editing the Flight Plan (in xml) to change the departure airport is not necessarily going to be a realistic sim experience.
 
cassini-mДата: Пятница, 12.08.2011, 06:45 | Сообщение # 20
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
It seems I've improperly explained my intentions. I did not intend to change the position of the aircraft in any sense, not mess with any structure such as that pertaining to FS. All I wished to achieve was to create a flight plan with a departure and destination airport as the first and last waypoints of a flight plan respectively with my gauge.

In further detail all it is, is a FMC with a RTE page for which one I've entered the Origin and Destination airports and I click activate thence the EXEC button thus setting the first waypoint which would be index 0 to the four figure origin airport and the second waypoint index 1 to the destination airport.

What you've explained I believe to be very useful for me and I will see to it to implement it within the following days, and will report back.

Thank You for you help, I am greatly appreciative for all of your efforts.
 
RobertДата: Пятница, 12.08.2011, 06:45 | Сообщение # 21
Группа: Удаленные





Editing the Flight Plan to add or delete an en route waypoint like a new destination airport is easy enough, its just that its problematic to consider doing this for the departure airport.

Try it and you'll see what I mean.
 
cassini-mДата: Пятница, 12.08.2011, 06:46 | Сообщение # 22
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
Code
(L:FMC-RTE-1,enum) 1 == if{  
(L:FMC-RTE-1-ACT,enum) 0 == (L:FMC-RTE-1-READY,enum) 1 == (L:FMC-RTE-1-ACTIVATE,enum) 1 == and and if{  

'A' (>@c:IcaoSearchStartCursor)  
(L:FMC-RTE-DEST-1,number) chr (L:FMC-RTE-DEST-2,number) chr  
(L:FMC-RTE-DEST-3,number) chr (L:FMC-RTE-DEST-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar)  

(@c:IcaoSearchMatchedIcaosNumber) 0 > if{ (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO) }  

(@c:FlightPlanWaypointIndex) 0 == (@c:IcaoSearchMatchedIcaosNumber) 0 >  
(@c:IcaoSearchCurrentIcao) (@c:FacilityICAO) == and and if{ 1 (>@c:FlightPlanWaypointIndex) }  

(@c:FacilityICAO) (>@c:FlightPlanNewWaypointICAO)  

'A' (>@c:IcaoSearchStartCursor)  
(L:FMC-RTE-ORGN-1,number) chr (L:FMC-RTE-ORGN-2,number) chr  
(L:FMC-RTE-ORGN-3,number) chr (L:FMC-RTE-ORGN-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar)  

(@c:IcaoSearchMatchedIcaosNumber) 0 > if{ (@c:IcaoSearchCurrentIcao) (>@c:FacilityICAO) }  

(@c:IcaoSearchCurrentIdent) (>@c:FlightPlanNewWaypointIdent)  

0 (>@c:FlightPlanAddWaypoint)  

' ' (>@c:FacilityICAO) ' ' (>@c:IcaoSearchStartCursor)  

1 (>L:FMC-RTE-1-ACT,enum)
0 (>L:FMC-RTE-1-ACTIVATE,enum) quit } }

Ok so the above code won't work. Neither the destination nor the origin airport will set. Is this because I don't have a loaded flight plan?

I've taken long to respond to this as school has been taking up most of my time.

I did get the Reference Airport feature working, just as we initially had thought I just hid the text.
 
RobertДата: Пятница, 12.08.2011, 06:46 | Сообщение # 23
Группа: Удаленные





No problem about not responding sooner. School is priority. This is not.

In the xml world, you need an open Flight Plan in order to use the gps variables FlightPlanNewWaypoint__, FlightPlanAddWaypoint.

If you have an open Flight Plan, then:

If you are dealing with Airports only, you can shortcut the IcaoSearch steps (StartCursor, EnterChar, MatchedIcaosNumber, CurrentIcao), as I indicated earlier. This also avoids the ICAO Transfer and the cycle skipping code it needs.

If you still want to use IcaoSearch, then you do not need to first store IcaoSearchCurrentIcao into FacilityIcao, then later, FacilityIcao into FlightPlanWaypointNewIcao. Just go IcaoSearchCurrentIcao directly into FlightPlanNewWaypointIcao.

In your (@c:IcaoSearchCurrentIcao) (@c:FacilityICAO) == statement, you're trying to see if two strings equal each other, but to do that, you should use scmp rather than ==.

In the same statement, you use FlightPlanWaypointIndex, but when adding new Waypoints, you want FlightPlanAddWaypoint like you did for the Origin Airport further down.

It is possible to open a Flight Plan, delete all the Waypoints, and then add a new Destination and Origin Airport. If you go that route, you should add Waypoint 0 first rather than Waypoint 1. Again, you still might not be satisfied with the results. For starters, the Lat, Lon of an Airport facility is the center of the facility, not a gate or departure end of a runway. The center of the Airport facility could be located inside an airport building or between runways, or the center of a runway - all bad places to start the flight.

Working with the fs9gps module is an aggressive undertaking especially if you are in school, so be very careful that this stuff does not consume more than discretionary time.
 
cassini-mДата: Пятница, 12.08.2011, 06:46 | Сообщение # 24
Полковник
Группа: Персонал
Сообщений: 113
Награды: 0
Репутация: 6
Замечания: 0%
Статус: Не в сети
So you're saying that I won't be able to add multiple waypoints as if I would set a direct to then add a waypoint prior and a few waypoints in between, completely circumventing the flight planner? Or would I absolutely have to have a flight plan loaded?

Schools not necessarily so tough as of late, but particularly time consuming. Flying a bunch most days.
 
RobertДата: Пятница, 12.08.2011, 06:47 | Сообщение # 25
Группа: Удаленные





I have re-read my posts and discovered that I made a significant mistake on one point which I now shall attempt to rectify.

Starting with no Flight Plan loaded (FlightPlanIsActiveFlightPlan = 0), you can create a Flight Plan using FlightPlanDirectToDestination, as follows:
Code

'A      KSFO' (>@C:FlightPlanNewWaypointIcao)
(>@c:FlightPlanDirectToDestination)


will create a two-waypoint "Direct to KSFO" Flight Plan starting at your aircraft's current Lat, Lon and Alt (so, this can be done at any time, including in-flight), and, in this case, terminating at San Francisco International Airport. I do not think you have any flexibility with the starting point using FlightPlanDirectToDestination - it's the current aircraft position.

FlightPlanDirectToDestination does not require an argument. The 'A_ _ _ _ _ _ KSFO' is the airport ICAO, but I know that you want to use ICAOSearch, which is fine as long as you pass the destination ICAO to FlightPlanNewWaypointICAO before the FlightPlanDirectToDestination statement. The destination does not need to be an airport. It could be any type of facility or even just a Lat Lon position not associated with a facility.

At this point, you now have an active Flight Plan and you can use the FlightPlanNewWaypoint variables to add / remove / direct to Waypoints - all the things you can do when a Flight Plan is loaded.

It looks like you indeed have the right idea and I am grateful for your previous post because it caused me to re-consider my statements. Good job.

Maybe you just have a few syntax errors to fix and then you're on your way!
 
  • Страница 1 из 4
  • 1
  • 2
  • 3
  • 4
  • »
Поиск:


Copyright MyCorp © 2024
Бесплатный конструктор сайтов - uCoz