Archived

This topic is now archived and is closed to further replies.

spokes2112

NearestAirportCurrent...

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

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.

Share this post


Link to post
Share on other sites