Nasal Flightplan: Difference between revisions

Line 63: Line 63:
Notice, that a leg you have gotten from a plan, but deleted in the plan, will be invalid and should not be used or modified.
Notice, that a leg you have gotten from a plan, but deleted in the plan, will be invalid and should not be used or modified.
A leg you have gotten from a plan, when modified, will modify the leg inside the plan you got it from.
A leg you have gotten from a plan, when modified, will modify the leg inside the plan you got it from.
; setSpeed(speed, type) : Sets the speed restriction. Setting nil type, will crash FG.
; setSpeed(speed, type) : Sets the speed restriction. Setting nil type, will crash FG, setting empty type is same as setting "at". See below for type list.
; setAltitude(altitude, type) : Sets the altitude restriction. Setting nil type, will crash FG.
; setAltitude(altitude, type) : Sets the altitude restriction. Setting nil type, will crash FG, setting empty type is same as setting "at". See below for type list.
; path() : Returns a vector of hashes containing lat and lon variables. These compromise a curved path for long non straight legs.
; path() : Returns a vector of hashes containing lat and lon variables. These compromise a curved path for long non straight legs.
; courseAndDistanceFrom(coord) : Return vector with true course and distance. Coord is a geo.Coord.
; courseAndDistanceFrom(coord) : Return vector with true course and distance. Coord is a geo.Coord.
; parents :
; parents : Nasal parents.
; index :
; wp_owner : Will return you the owning route-structure of the WP - this could be an airway, procedure, or the flightplan if the waypoint doesn’t belong to a route structure.
; index : Returns the index of the leg in the owning route-structure.
; alt_cstr : Read-only. Altitude restriction.
; alt_cstr : Read-only. Altitude restriction.
; alt_cstr_type : Read-only. Altitude restriction type. Can be "at", "above", "below", "computed", "delete".
; alt_cstr_type : Read-only. Altitude restriction type. See below for list.
; speed_cstr : Read-only. Speed restriction.
; speed_cstr : Read-only. Speed restriction.
; speed_cstr_type : Read-only. Speed restriction. Can be "at", "above", "below", "mach", "computed-mach", "delete".
; speed_cstr_type : Read-only. Speed restriction. See below for list.
; leg_distance :
; leg_distance : Returns distance along the leg, from the preceding waypoint.
; leg_bearing :
; leg_bearing : Returns the bearing along the leg.
; distance_along_route :
; distance_along_route : Return the total distance laterally along the route to the beginning of the leg.
 
For speed restrictions these types can be used:
* "at" = kt should be spot on
* "above" = kt should be higher
* "below" = kt should be under
* "computed" = predicted kt
* "computed-mach" = predicted mach
* "mach" = its in mach instead of kt
* "delete" = Cleared by ATC
 
For altitude restrictions these types can be used:
* "at" = alt should be spot on
* "above" = alt should be higher
* "below" = alt should be below
* "computed" = predicted alt
* "computed-mach" = not used for altitude
* "mach" = not used for altitude
* "delete" = Cleared by ATC


== Procedure methods and variables ==
== Procedure methods and variables ==
574

edits