Jump to content
Sign in to follow this  
Guest Claviateur

Need help in this code plz :)

Recommended Posts

Guest Claviateur

Hi Luis,Thanks, I hope I am not troubling you with my code issue. I tried the line you mentioned Lon0-Lon1 and by doing that the photogrid is no more there. Its not in the sea or on the land. I looked around but could not find it. I also tried Lat0-Lat1 and I increased the V2=10000 but the phtogrid is still not showing. Very strange. Here is the latest codeArea( b 33:49:2.241296 35:29:23.355961 20 ) ;in the following 2 lines paste in your original latitude and longitudeUvar( $Lat0 33:49:2.241296 )Uvar( $Lon0 35:29:23.355961 ) ;then your ScaleUvar( $Scale 0.304800 ) ;now the latitude and longitude where you want to place your RefPoint();in the present case shifted 30 seconds to the East and same latitudeUvar( $Lat1 33:49:2.241296 )Uvar( $Lon1 35:26:53.146721 ) ;now evalute the shift in delta_unitsUvar( $DX [111120 / $Scale * cos($Lat1) * [$Lon0 - $Lon1] ] )Uvar( $DY [111120 / $Scale * [$Lat1 - $Lat0] ] ) ;finally the modified RefPoint() and the reposition TransformCall()RefPoint( rel :TagPhotoGrid [$Scale] [$Lat1] [$Lon1] v1= 37040 v2= 10000 )TransformCall( :rot [$DX] 0 [$DY] 0 0 0 0 0 0 ) Jump( : )Cheers!Michel

Share this post


Link to post
Share on other sites
Guest luissa

Hi,>Thanks, I hope I am not troubling you with my code issue. I >tried the line you mentioned Lon0-Lon1 and by doing that >the photogrid is no more there. Its not in the sea or on the >land. I looked around but could not find it. No problem, it is fun ...>I also tried >Lat0-Lat1 and I increased the V2=10000 but the phtogrid is >still not showing. Very strange. Here is the latest code No, please keep my last formula. I suspect that your polygons are in the right place but under the ground. This because you are using a "rel" RefPoint(). So when you shift your RefPoint() to the sea it will be at sea level. Later, the polys are shifted East by remain at sea level. To correct this you have 2 possibilities. The first one is to change the RefPoint() to an "abs" one and enter an elevation parameter. For example:>RefPoint( abs :TagPhotoGrid [$Scale] [$Lat1] [$Lon1] v1= >37040 v2= 10000 E= 100 ) In the example I assumed that your original location was at elevation of 100 refpoint units that is 100 x 0.3048 meters.An alternative is keeping the RefPoint and elevate the polys through the TransformCall. For the assumed 100 feet elevation change the second parameter as follows:>TransformCall( :rot [$DX] [100] [$DY] 0 0 0 0 0 0 ) Regards, Luis

Share this post


Link to post
Share on other sites
Guest Claviateur

WOW!! IT WORKS :) :) Thanks so much Luis!! Cheers!Michel

Share this post


Link to post
Share on other sites
Guest Claviateur

Hi again Luis,I was looking at my photogrid wish works very well now thanks to you and I noticed that there is a little difference in allignement between the original photogrid without the transformcall and the one now. Actually this difference is making the runways , the taxilines and the 3D objects on the grid not matching the photogrid the way they where. So I experiemented with different values for the long and lat of the shifting but none gave me the position I had before. Do you think this the result of the math operations that are in the code ? Like for exemple the result of the math formuala is rounded aproximatively?Also I made a new discovery related to runways and autogen. It seems runways disable autogen way passed their tips. like a hall that extendes from both runway tips exclude autogen. Thanks!Michel

Share this post


Link to post
Share on other sites
Guest Claviateur

After I scrathed my head a little bit I found a solution to precisely allign the photogrid during the transformcall by adding a value to the Long in the refpoint :)here is what I did and it works !RefPoint( rel :TagPhotoGrid [$Scale] [$Lat1] [$Lon1 + 0.00008] v1= 37040 v2= 10000 )I added 0.00008 to the $Lon1 wish makes the photogrid alligns like beforeNow I am trying to see if I can avoid the autogen exclusion along the ruwnay pathesCheers!Michel

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...