Jump to content

Recommended Posts

Posted

Hello, 
I'd like to ask if it is already possible to get with Lua from API the DL address of active Apache helicopters?
 

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.

  • 1 month later...
Posted (edited)

You can read the display. Of course, you will need to press the comm button for that, but that can also be automated. Or you could repeatedly check if the user is on the comm page,  and update the value if it is so.

Check out this function for my tool that reads the displays. I adapted it from SRS.

https://github.com/FalcoGer/CoordinateConverter/blob/26477e4a7899c7d9069fbc8e362afb655b4e9b8d/CoordinateConverter/DCS/Communication/CoordinateConverter.lua#L32

Display IDs seem relatively stable, but ED won't tell you when they do change in an update.

You find them here.

https://github.com/FalcoGer/CoordinateConverter/blob/26477e4a7899c7d9069fbc8e362afb655b4e9b8d/CoordinateConverter/DCS/Aircraft/AH64/AH64.cs#L107

The lua api documentation is attrociously terrible. Maybe there is a better way. But even srs relies on reading the eufd for finding the selected radio and reading the comm page for iff codes.

 

Edit: it seems I misread. I don't think you can get that data from other apaches. You could export the unit list,  filter for apache units, read the display while stepping through the comm net dl phonebook and compare unit names. Might not work with dynamic slots.

Perhaps some experimentation on how dcs assigns these IDs instead and then try to emulate that to predict what the id of a specific unit should be?

All of that seems way too jank and fragile though. Any change and you'd have to redo everything.

Another option still would be to have a script that reads the apache id as described on every client, if you can control that, and then collect them centrally by having those clients connect somewhere to send that info. Then everyone can connect to the same api and querry those ids by sending the units export. Obviously that requires more infrastructure.

Maybe srs can be extended to provide dl ids, and a way to querry the server for a specific unit's id. Probably needs a PR from you though.

Edited by FalcoGer
Posted

Some time ago, I created a script that displays STN numbers for all units using a specific number or just for individual players. Now, I would like to extend this functionality to helicopters, allowing any player interested in cooperation to see who has which number and configure the network without needing to request this information over the radio.

This is a basic version of the idea. A more advanced implementation would enable automatic management of the DL network based on player connections and disconnections. However, this would require the ability to write information directly to a client helicopter’s avionics, making the implementation significantly more complex than simply reading the data.

Combining this with a password-based system—such as the one visible on the Apache display for Datalink-related functions—would create an excellent mechanism for automated DL network management within cooperating groups. If the API provided the ability to read and write DL addresses and access the password, scripting this functionality would be well within reach for an experienced scripter.

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.

Posted

I have a system that inputs the DL information into the helicopter. Same tool.

Either way, you still have to communicate with people. It's not just the DL ID, but also the radio and frequency to use. And of course there is more to communication that aircraft sending digital messages between each other.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...