Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Average speed

Featured Replies

Hi All

 

XML in FSX

 

Is there any vars. that can help to get average speed for a non direct course to a waypoint with changing speeds. It's easy to get if you use constant speed and direct course but maybe can't be done with XML.

 

Thanks

Paul EGLD

If you need this info before the flight I assume you have the flight plan data available (leg distances and speeds) and you can use a formula to get the average speed?  If only needed after the flight keep track of the overall distance and time and divide.

  • Author

Hi Tom

 

 Yes that would work OK but I am trying to get the average updated during the flight without keeping to a flightplan.

 

I thought of doing it by taking lat/long positions at minute intervals and get distance & ET from that but not sure of the maths required to get overall realtime average accurate.

Paul EGLD

  • Commercial Member

Ok... first... I have to state that unless the course leads to the waypoint... you can't arrive at the waypoint and thus time to the waypoint would always be infinite.

 

So... not certain you're saying what you actually mean.

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Author

Hi Ed

 

OK I haven't described it correctly.

 

This for FMC flight log page giving various info. like T/O time, current enroute time, fuel used etc. 

 

It also gives current avg. TAS & GS.  and  AIR DIST / GRD DIST traveled from departure point. These are values I am trying to get. 

 

Thanks

Paul EGLD

  • Commercial Member

Ah... those averages have nothing to do with waypoints.

 

Essentially while in flight the FMC is sampling the TAS and GS and computing the aircraft's average TAS and GS.

 

The way most avionics systems do this is that they have a definition of start of flight. Once it sees that, it starts to track TAS and GS and calculate the aircraft's average.

 

As for air distance and ground distance... that too is linked to the definition of start of flight.

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Author

That all strait forward but do you know how it calculates the aircrafts averages?

Paul EGLD

  • Author

Yes

 

how does the the RW FMS get the basic over the ground distance information? 

Paul EGLD

  • Commercial Member

All FMS systems get positional information... from a GPS, an INS... something that knows where the aircraft is. Many also utilize a triangulation method involving multiple navaids.

 

To be crystal clear... averaging speeds is completely separate from calculating distances of air vs ground. Are you wanting me to give you formula for calculating the distance values?

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Author

Yes please, That would be most helpful

Paul EGLD

  • Commercial Member

In short, you need to track the following values:

1 - Average TAS.

2 - Average GS.

3 - Average TAS for current waypoint.

4 - Average GS for current waypoint.

5 - Ground distance.

6 - Air distance.

7 - Ground distance for current waypoint.

8 - Air distance for current waypoint.

 

For Average TAS and Average GS simply do the following once per second:

 

avg_tas_total = avg_tas_total + tas.
avg_tas_count = avg_tas_count + 1.
avg_gs_total = avg_gs_total + gs.
avg_gs_count = avg_gs_count + 1.
avg_gs_waypoint = avg_gs_waypoint + gs.
avg_gs_waypoint_count = avg_gs_waypoint_count + 1.
avg_tas_waypoint = avg_tas_waypoint + tas.
avg_tas_waypoint_count = avg_tas_waypoint_count + 1.
With those values you can figure everything else out.

 

1 - Check to see if waypoint has sequenced.
    If so, then reset the following:
      a. distance_ground = distance_ground + distance_ground_waypoint.
      b. distance_air = distance_air + distance_air_waypoint.
      c. average_gs_waypoint_count = 1.
      d. average_tas_waypoint_count = 1.
      e. average_gs_waypoint = gs.
      f. average_tas_waypoint = tas.
2 - Calculate great circle distance from prior waypoint to aircraft current position.
3 - Store in distance_ground_waypoint.
4 - Calculate average_gs = average_gs_waypoint / average_gs_waypoint_count.
5 - Calculate average_tas = average_tas_waypoint / average_tas_waypoint_count.
6 - distance_air_waypoint = distance_ground_waypoint * (average_tas / average_gs).
7 - Calculate overall_average_gs = average_gs_total / average_gs_count.
8 - Calculate overall_average_tas = average_tas_total / average_tas_count.

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Author

Thanks Ed

Paul EGLD

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.