BlueFalkor Posted October 1, 2004 Report Posted October 1, 2004 We are busy with a project for school. We have to make a Motion simulator together with Flightsimulator. We used FUIPC to get certain information which is very useful for the motion simulator. The Throttle level is where we get stuck. Of course also the possibilty to write a differnt throttle level is something we need. Anyway this is the code we have now but we get a Throttlle Level of Zero. Hopefully someone can help us Greetz Rob Loskamp: import com.flightsim.fsuipc.*; public class Test { static void TestADF() { System.out.println("Testing ADF"); FSADF adf = new FSADF(); System.out.println("freq " + adf.Freq()); System.out.println("freq as string " + adf.FreqAsString()); System.out.println("ID " + adf.Identity()); System.out.println("Name " + adf.Name()); } static void TestEngine() { FSEngine1 engine = new FSEngine1(); //FSEngine engine = new FSEngine(); for(int x=0;x<1000000;x++){ System.out.println("Throttlelever " + (engine.ThrottleLever()*100000000)); } } static void TestAircraft() { System.out.println("TestAircraft"); FSAircraft air = new FSAircraft(); for(int x=0;x<10000;x++){ //System.out.println("Pitch-Degrees " + Math.round(air.Pitch()) + " Roll-Degrees " + Math.round(air.Bank())); //System.out.println("Airspeed " + air.IAS()); System.out.println("enginetype " + air.Heading()); } } static void TestFlightSim() { System.out.println("\nTestFlightSim"); FSFlightSim sim = new FSFlightSim(); System.out.println("name " + sim.StartSituationName()); } public static void main(String s[]) { System.out.println("Running tests"); int ret = fsuipc_wrapper.Open(fsuipc_wrapper.SIM_ANY); System.out.println("ret =" + ret); if (ret == 0) { System.out.println("Flight sim not found"); } else { TestADF(); //TestAircraft(); TestFlightSim(); TestEngine(); } } }
Pete Dowson Posted October 1, 2004 Report Posted October 1, 2004 We used FUIPC to get certain information which is very useful for the motion simulator. The Throttle level is where we get stuck. Of course also the possibilty to write a differnt throttle level is something we need. Anyway this is the code we have now but we get a Throttlle Level of Zero. I can't tell from the code what offsets you are reading or writing. When you say you "get a Throttle Level of Zero", is this looking at FS when you write something different, or is this something you are reading? Please explain what you are doing rather than show me code which is completely alien to me, I'm afraid. See the FSUIPC SDK, the Programmer's Guide therein? Check the offsets and definitions of what you are reading and writing. Check these also with the tool FSInterrogate, provided specifically for this purpose. Also, use FSUIPC's IPC read and write logging to check what it is you are doing as far as FSUIPC is concerned. You can also use the monitoring facilities in the FSUIPC Logging page to monitor values at offsets in real time. Please use the tools available and I'm sure you'll solve your own problems. If not, explain what you are doing and seeing and I'll try to help. Regards, Pete
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now