Jump to content
Sign in to follow this  
spokes2112

NearestAirportCurrent...

Recommended Posts

Guest ridgell

I am looking for help on 2 fronts: @c:GeoCalc and on what to use to determine the frequency of transponder query rate. I made a transponder that has a light to indicate squawk transmission, or incoming queries. Originally I had a random number (Doug

Share this post


Link to post
Share on other sites

I would use nearest airspace, as using nearest airport does not give the airspace type ( Class C or better ), just runway type. ( Cement etc. )Coding in general terms..This should be updated continously (It really doesn't take too much off FRates. While setting a LAT/LON might work using GEO CALC you would never know when you left one airspace for another.. Unless...... See #2 --#1 Constant updateTell GPS where you are for the search.(A:Plane Latitude, Radians) -> NearestAirspaceCurrentLatitude(A:Plane Longitude, Radians) -> NearestAirspaceCurrentLongitudeTell GPS how far & the amount of airspace to search for.. Bummer - the airspace type cannot be filtered yet.200 or ? -> NearestAirspaceMaximumItemsLine of site -or- Fixed ->NearestAirspaceMaximumDistanceStart a loop to check for ASPC better/= than Class C.Loop# (start at 0) -> NearestAirspaceCurrentLineCheck current selected airspace if Class C or better-NearestAirspaceCurrentType > 0 or < 5 if { NearestAirspaceCurrentNearDistance,Nmiles -> L:MY_XPNDER_DIST_VAR Start "search" over again, Loop# @ zero }els{ Increment loop or reset if @ end of list - Loop# ++ s1 >Loop# l1 NearestAirspaceItemsNumber 1 - > if{ 0 -> L:MY_XPNDER_DIST_VAR, 0 -> Loop#, Start "search" over again } els { Return Loop } #2. Single find, update when range is greater than a set mileage after a airspace has been found. Tell GPS where you are for the search.(A:Plane Latitude, Radians) -> NearestAirspaceCurrentLatitude(A:Plane Longitude, Radians) -> NearestAirspaceCurrentLongitudeTell GPS how far & the amount of airspace to search for.. Bummer - the airspace type cannot be filtered yet.200 Or ? -> NearestAirspaceMaximumItemsLine of site -or- Fixed ->NearestAirspaceMaximumDistanceStart a loop to check for ASPC better/= than Class C.Loop# (start at 0) -> NearestAirspaceCurrentLineCheck current selected airspace if Class C or better-NearestAirspaceCurrentType > 0 or < 5 if { NearestAirspaceCurrentLatitude -> L:My_LATNearestAirspaceCurrentLongitude -> L:My_LON Stop search}els{ Increment loop or reset if @ end of list - Loop# ++ s1 >Loop# l1 NearestAirspaceItemsNumber 1 - > if{ 0 -> L:My_LAT, 0 ->L:My_LON } els { Return Loop }L:My_Lat = 0 and L:My_Lon = 0 if{ Reset everything and start over }els{ L:My_LAT -> GeoCalcLatitude1L:My_LON -> GeoCalcLongitude1(A:Plane Latitude, Radians) -> GeoCalcLatitude2(A:Plane Longitude, Radians) -> GeoCalcLongitude2 }GeoCalcDistance,Nmile L:My_RESET,Dist > if{ Reset everything and start over } els{ GeoCalcDistance,Nmile -> L:MY_XPNDER_DIST_VAR }I hope this can help and can read the psuedo code. It's generally based on some things I've been working on which work, did not test this, just used the SDK for reference.RomanProud "TEAM AVSIM" RTW race member.


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...