As promised. The start of a collection of useful functions designed to help community development of instruments. I've started things off in version 1.00 with the following couple of functions.
1. curved text on canvas
2. compass rose on canvas
Air Manager Community Library
Air Manager Community Library
- Attachments
-
- AM Community Library v1.00.siff
- (9.68 KiB) Downloaded 369 times
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Manager Community Library
Hi
Coordinate manipulation.
Going to add this one here so they are all in one place.
Keith
Coordinate manipulation.
Going to add this one here so they are all in one place.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Manager Community Library
@Sling
Can you please do one based on date and time. The standard java string "date and time" formatting does not work in AM.
https://dzone.com/articles/java-string-format-examples
The one I am interested in is formatting decimal minuets into H:M:S
example
517.98 decimal seconds = 8:37:59
And then to show only H:M or only M:S when less than one hour.
Keith
Can you please do one based on date and time. The standard java string "date and time" formatting does not work in AM.
https://dzone.com/articles/java-string-format-examples
The one I am interested in is formatting decimal minuets into H:M:S
example
517.98 decimal seconds = 8:37:59
And then to show only H:M or only M:S when less than one hour.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: Air Manager Community Library
Had a few spare minutes so i added time formatting just for you @Keith Baxter .
Enjoy.
Tony
Enjoy.
Tony
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Manager Community Library
Awesome Tony,
That would have taken me a few days to do. No guessing what I want it for... Yes the ETE's and ETA's and FUEL REM.
Oh.. That compass rose will also find it's place in there.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Manager Community Library
Hi,
This code by Corjan helps in reducing dataref fires.
Keith
This code by Corjan helps in reducing dataref fires.
Code: Select all
function xpl_dataref_subscribe_trottle(...)
-- Local variables
local args = {...}
local user_callback = args[#args - 1]
local delta_ms = table.remove(args, #args)
local data = nil
-- Replace the user callback with our own
args[#args] = function (...)
data = {...}
end
-- Do the actual subscribe
xpl_dataref_subscribe(table.unpack(args))
-- Start a timer that will fire the callback on requested interval
timer_start(0, delta_ms, function()
if data ~= nil then
user_callback(table.unpack(data))
data = nil
end
end)
end
function new_xpl_data(altitude, baro, battery, ap_altitude)
print(altitude)
end
xpl_dataref_subscribe_trottle("sim/flightmodel/misc/h_ind", "FLOAT",
"sim/cockpit2/gauges/actuators/barometer_setting_in_hg_pilot", "FLOAT",
"sim/cockpit/electrical/battery_on", "INT",
"sim/cockpit/autopilot/altitude", "FLOAT", new_xpl_data, 1000)
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Manager Community Library
@Ralph
Can we please make this thread a sticky. It is so hard to find and refer members to. I think it will attract air to other creatives
Keith
Can we please make this thread a sticky. It is so hard to find and refer members to. I think it will attract air to other creatives
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Air Manager Community Library
@Ralph
Awesome. Thank you.
Keith
Awesome. Thank you.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card