Jump to content
The simFlight Network Forums

motuslechat

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by motuslechat

  1. * Added new contructor to FsLatLonPoint to accept Lat and Lon in DecimalDegrees : tested and Ok

    * Added new FsAltitide class to convert between Feet, Metres and FS Altitude Units : tested and Ok in meters

    * Added FSUIPCConnection.MoveAircraft() method. This will move the plane to the specified location,   an optionally set a new Altitiude, Speed, Pitch and Bank is specified : tested and Ok

    All is perfect :-)

     

    When you will have time, can you give us samples for AirportsDatabase and AITraffic and AiPlaneInfo.

     

    Thank you very much for your job !!!!

     

     

  2. Hi Paul,

    I have a problem with Zulu Time and Local Time :

    I choose an airport on US, (KVPS for example)

    Local Time = 30 may 2017 18:59:30

    Zulu Time = 30 may 2017 23:59:30

    and have a timer to update values each second. All is ok but when Zulu Time = 31 may 2017 00:00:01, date for Local Time is now =31 may 2017 19:00:01. For Local Time date must be 30 may and not 31 may.

    Here is the code :
           

    private Offset<byte[]> fsLocalDateTime = new Offset<byte[]>(0x0238, 10);
            private Offset<byte[]> fsZuluDateTime = new Offset<byte[]>(0x023B, 10);
    
            private Offset<byte> zmin = new Offset<byte>(0x23c);
            private Offset<byte> zhour = new Offset<byte>(0x23b);
            private Offset<byte> second = new Offset<byte>(0x23a);
    
    
            private void timer1_Tick(object sender, EventArgs e)
            {
                // Process the default group
                try
                {
                    FSUIPCConnection.Process();
    
                    // get local Time
                    short year = BitConverter.ToInt16(fsLocalDateTime.Value, 8);
                    DateTime fsTime = new DateTime(year, 1, 1, fsLocalDateTime.Value[0], fsLocalDateTime.Value[1], fsLocalDateTime.Value[2]);
                    short dayNo = BitConverter.ToInt16(fsLocalDateTime.Value, 6);
                    fsTime = fsTime.Add(new TimeSpan(dayNo - 1, 0, 0, 0));
                    lblLocalTime.Text = (fsTime.ToString("F", CultureInfo.CreateSpecificCulture("fr-FR")));
    
                    // get Zulu Time
                    short year2 = BitConverter.ToInt16(fsZuluDateTime.Value, 5);
                    DateTime fsZuluTime = new DateTime(year2, 1, 1, zhour.Value, zmin.Value, second.Value);
                    short zuludayNo = BitConverter.ToInt16(fsZuluDateTime.Value, 6);
                    fsZuluTime = fsZuluTime.Add(new TimeSpan(dayNo - 1, 0, 0, 0));
                    lblZuluTime.Text = (fsZuluTime.ToString("F", CultureInfo.CreateSpecificCulture("fr-FR")));
    
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error : " + ex.Message);
                }
    
           }
    

     

    Thank you for your help.

  3. Hi Paul,

     

    Is there a way to have the nearest airport from given coordinates ?

     

    private Offset<string> nearestICAO = new Offset<string>(0x0658, 4);

    ...

    double Lat = 48.4

    double Lon = -4.4

     

    private string NearestAirpot(Lat, Lon)

    {

    ...

    FSUIPCConnection.Process();
    ...

    return this.nearestICAO.Value;  // "LFRB"

    }

     

    Thank you for your help !

     

    Motus

  4. Thank you Paul for all these intersting informations.

     

    Can you confirm this sample ?

     

    private Offset<int> id = new Offset<int>(0x2904);

    private Offset<int> ctrl = new Offset<int>(0x2908);

    private Offset<int> val = new Offset<int>(0x2900);

     

    id.value = 637;   // FSX ID od my Simobject

    ctrl.value = 66054; // STOBES_SET for example

    val.value = 1;   // Set to 1 for true

    FSUIPCConnection.Process();

     

     I will give you results if it's Ok.

    Thank you again.

     

    Motus 

     

     

      

     

     

     

     

     

     

     

  5. Hi,

     

    I want to create AI for helicopter. You can't do this with simconnect.

    Do you think there is a possibility to do this with FSUIPC ?

     

    1. Create helicopter : no problem

    2. create waypoints to follow : no problem

    3. Take off : ?

    4. Reach the speed and the altitude : ?

    5. Go to the next waypoint : if 3 and 4 is possible, it is not a problem

    6. Take on at the last waypoint : if 3 and 4 is possible, it is not a problem

     

    Thank you for your help.

     

    Motus

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.