Jump to content

Recommended Posts

Posted

Hello,

 

on a mission of mine, I need to detect when an aircraft is stopped on deck. The parameters for aircraft speed (tas, indicated, gs) all take into account the carrier and/or wind speeds. So far I can detect if the player is applying wheelbrakes, but not if the aircraft is immobile or not.

anyone has a script that could work for this use case?

 

thanks a lot for any help with this 

 

Eduardo 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted

Would checking distance variation from carrier to plane work? That would have to be in a loop and require an initial/prior position, sorta asking has it moved since I last checked?

 

Posted
2 minutes ago, Draken35 said:

Would checking distance variation from carrier to plane work? That would have to be in a loop and require an initial/prior position, sorta asking has it moved since I last checked?

 

Hi, 

thanks for posting here. I will check your idea, to see if it would work in practice ... will let you know.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted

My pleasure... That was a quick idea and not knowing the context (but I assume it is about the training mission of the T-45C 🙂 ) and toolbox used (native, mist or moose), although it should be doable with all. Good luck!

 

@Rudel_chw Another one.. If any of the speeds (GSmost likely) you can get for the plane, matches the carrier's , then they are not moving...

Posted
24 minutes ago, Draken35 said:

@Rudel_chw Another one.. If any of the speeds (GSmost likely) you can get for the plane, matches the carrier's , then they are not moving...

 

Hi, yes, I was just testing that 🙂 👍

On my mission the carrier's speed is set to 25 knots, but in reality it fluctuates between 24.95 and 24.98. If the aircraft is taxing towards the bow, its GS will be higher than that range, if it is taxing towards the stern then its speed will be below that range.

I will test this now in practice, and let you know how it went 🙂 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted
17 minutes ago, Rudel_chw said:

 

Hi, yes, I was just testing that 🙂 👍

On my mission the carrier's speed is set to 25 knots, but in reality it fluctuates between 24.95 and 24.98. If the aircraft is taxing towards the bow, its GS will be higher than that range, if it is taxing towards the stern then its speed will be below that range.

I will test this now in practice, and let you know how it went 🙂 

Cool!
I was typing this script using moose (untested) :
 

Quote

function isStopped(unitName, referenceUnitName)
  -- checks if unitName is stopped in relation to referenceUnitName.
  -- if referenceUnitName is not provided, it does not exist or it is not alive, the stopped condition will be checked without a reference.
  local margin_of_error = 0.001 --m/s
  local unit = UNIT:FindByName(unitName)
  local ref_unit = nil
  local speed = nil
  local ref_speed = nil
  local isStopped = nil -- nil if unitName does not exists, true/false otherwise
  
  if referenceUnitName then
    ref_unit = UNIT:FindByName(referenceUnitName)
    if  ref_unit and  ref_unit:IsAlive() then
      ref_speed = ref_unit:GetVelocityMPS()
    else
      ref_unit = nil -- Reference unit not found or not alive. Nil'ing it just in case it is dead
    end
  end
  
  if unit and unit:IsAlive() then
    local speed  = unit:GetVelocityMPS()
    isStopped = false
    if 
      (ref_speed and  math.abs(speed - ref_speed) <= margin_of_error )
      or
      ( not ref_speed and math.abs(speed) <= margin_of_error)
    then
      isStopped = true
    end 
  end
  
  return isStopped
end --function

Posting it as a starting point if you or anybody else wants to used it... I'll probably add it to my library just in case 🙂

Checking speeds is a lot easier ... Sometime the first idea is not the best 😄

  • Like 1
Posted
6 minutes ago, Draken35 said:

Checking speeds is a lot easier ... Sometime the first idea is not the best 😄

 

Indeed .. I'm checking the speed on an aircraft Parameter, not sure if it can be seen on a script:

CURRENT_GS:24.972935\

It returns the speed in knots 🙂 

 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted
3 hours ago, Rudel_chw said:

I will test this now in practice, and let you know how it went 🙂 

 

3 hours ago, Draken35 said:

Posting it as a starting point if you or anybody else wants to used it...

 

Hi,

 

I'm now able to detect when the aircraft is stopped on deck, tough I still need to work on my triggers to avoid conflicting messages 😄 ... but I now believe that my mission will eventually work as intended:

 

 

 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted
1 hour ago, Rudel_chw said:

 

 

Hi,

 

I'm now able to detect when the aircraft is stopped on deck, tough I still need to work on my triggers to avoid conflicting messages 😄 ... but I now believe that my mission will eventually work as intended:

 

 

 

Looking good! 

Looking forward to it and the updated version of the T-45!

  • Like 1
  • Recently Browsing   0 members

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