Skip to content

Commit

Permalink
Update ExportXP.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
AviationSFO authored Apr 29, 2022
1 parent 2aba1da commit 3096f40
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Resources/plugins/FlyWithLua/Scripts/ExportXP.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
local data = {}

-- this function retrieves the current aircraft's data and stores it in a table
-- from X-Plane's API for use elsewhere
-- from X-Plane's API for later export
function getData(data)
-- get the data from the flight model
dataref("lat", "sim/flightmodel/position/latitude")
dataref("lon", "sim/flightmodel/position/longitude")
dataref("alt", "sim/flightmodel/position/elevation")
dataref("hdg", "sim/flightmodel/position/true_psi")
dataref("gs", "sim/flightmodel/position/groundspeed")
dataref("vs", "sim/flightmodel/position/vh_ind_fpm")
dataref("pitch", "sim/flightmodel/position/true_theta")
dataref("roll", "sim/flightmodel/position/phi")
dataref("lat", "sim/flightmodel/position/latitude", "readonly")
dataref("lon", "sim/flightmodel/position/longitude", "readonly")
dataref("alt", "sim/flightmodel/position/elevation", "readonly")
dataref("hdg", "sim/flightmodel/position/true_psi", "readonly")
dataref("gs", "sim/flightmodel/position/groundspeed", "readonly")
dataref("vs", "sim/flightmodel/position/vh_ind_fpm", "readonly")
dataref("pitch", "sim/flightmodel/position/true_theta", "readonly")
dataref("roll", "sim/flightmodel/position/phi", "readonly")
-- Applying to data array
data.lat = lat
data.lon = lon
Expand Down Expand Up @@ -56,4 +56,4 @@ function main()
exportData(data)
end

doEveryDraw("main()")
do_every_draw("main()")

0 comments on commit 3096f40

Please sign in to comment.