
Guillaume-FR-
-
Posts
12 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Guillaume-FR-
-
-
Please !
-
Hello,
I’m modifying the FSD server with their source code , I’ve added some functions like FSHOST (?where ?hop…). I want to add a command for send the heading from the pilot to the airport
I’ve found it [C/C++]:
double GetCap(double Latclient, double Longclient,double Latdest, double Longdest) { double LaA;double LaB;double LonA;double LonB; double P;float Pi; double m;double brg; Pi = 3.14159265358979323846; int deg=(int)Latclient; float Min=(Latclient-deg)*60; LaA = (deg + Min / 60.0) / 180.0 * Pi; deg=(int)Latdest; Min=(Latdest-deg)*60.0; LaB = (deg + Min / 60.0) / 180.0 * Pi; deg=(int)Longclient; Min=(Longclient-deg)*60.0; LonA = (deg + Min / 60.0) / 180.0 * Pi; deg=(int)Longdest; Min=(Longdest-deg)*60.0; LonB = (deg + Min / 60.0) / 180.0 * Pi; P = LonB - LonA; m = acos(sin(LaA) * sin(LaB) * cos(LonB - LonA) + cos(LaA) * cos(LaB)); brg = acos(sin(LaB) / (sin(m) * cos(LaA)) - tan(LaA) / tan(m)); if(P < 0)brg = 2 * Pi - brg; brg = brg / Pi * 180; return brg; }
but I get 83 instead of 89 (in FSNAV) for the same airport.
Please, could you send me your function for the heading ?
Thanking you in advance for your help (and for FSNAV !).
EDIT : found it ! I didn't add the mag. variation ! how to calculate ?
Thanking you in advance.
----
Sorry for my french, i'm french !
-
Thanks alastairmonk1 !!
-
thanks,
i have just a question :
can i use the ICAO.txt for my module ?
-
please :cry:
-
Hi ,
I’m programming a FS module in C.
It’s like a Flight Recorder, I save the position of plane each 5 seconds (~5s to ~30s).
I need to display the flight plan in FSNAVIGATOR (the data of the position which have been saved) (export to .FSN format from my module.)
Where can I find the library , or the code to decrypt(and crypt) a .fsn format ?
Thanks
Sorry for my English I’m French....
-
Hi,
I don't understand all in "To convert to Degrees:" in the sdk (because i am french and my english is poor )
could you give me the code for to convert in degrees ? in c++
thanks
-
Hi ,
I have 2 questions :
How to get the latitude and longitude of the plane ? (like N47*19.79 E3*1.79 ....)
I don’t know if it’s possible, I want to know the distance covered in MN (sorry i don’t know the real expression in English )
In C++ with Devc++
Thanks :wink:
-
Hi
How to write a text in FS ? (in the green line).
in C++.
Thanks in advance.
-
Thanks Pete !
It's okay !
But with wsprintf(alting, "%.2f", dAlt); I get "f"
And with sprintf(alting, "%.2f", dAlt); it's okay
Thanks !
-
Hi
Sorry for my English I am French (and to understand the SDK with my English ....,I am 14 :cry: ...)
I am programming in C++ (with DEVC++).
And I want to read some data of Flight Simulator (altitude, speed ...).
But I can read some variable (with “expression”)
For example : for altitude (0570, S64) the expression is “#*3.28084/(65536*65536)” and with this :
int altint; char alt[8],alting[8]; ...... if (!FSUIPC_Read(0x0840, 8, alt, &dwResult) || !FSUIPC_Process(&dwResult)) fTimeOk = FALSE; wsprintf(alting, "%d", alt[0]); altint=atoi(alting); altint=altint*3.28084/(65536*65536); wsprintf(alting, "%d", altint);
and I get : -2147483648 :(
Why ?
Other question :
How to know the nearest airport of the plane ? (ICAO)
Thanks in advance. :wink:
[Programming] get heading
in FSNavigator Support Forum
Posted
Thanks !