Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

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.

Help Needed: Two Calculation Problems

Featured Replies

Howdy, howdy:

I have two calculation problems that are severely testing my last few brain cells; please refer to the attached.

In the Trip Results box, I summarize some of the calculations in the Flight portal--one of them is average speed of the flights entered in the portal. The calculations (number) are:

Total_Trip_Time = Sum(Flight_Data::Time_Leg)

Total_Distance_Flown = Sum(Flight_Data::Distance_Flown)

Average_Speed = Total_Distance_Flown / Total_Trip_Time

As shown, Total_Trip_Time = 2.0 and Total_Distance_Flown = 34; both of these are correct. However, Average_Speed = 16.8. How on Earth did FM come up with that? It should be 17.0.

The next question revolves around the Time_on_Engine field. The three-legged trip starts at 1110.0 and ends at 1116.0, so the total time is 5.0 hours; how do I code a calc to obtain that? I imagine I need to use GTRR, but I'm not sure.

As always, your help is greatly appreciated.

Cheers!

Rich

Screenshot.gif

My guess would be it has something to do with your time enroute calc field. You most likely have it set up to display to the tenth of a place but there is most likely more digits beyond it. So the total time is probably 2.02 or soemthing like that.

As for your time engine you could use a calc such as,

Max(Flight_Data::Engine_End) - Min(Flight_Data::Engine_Start)

P.S. put in checks to make sure that the fields are not empty so that you dont get unwanted results.

1. John's guess is correct: your total time is actually 2:01 (2.0166666666666667 in decimal hours).

34 / ( 2 + 1 / 60 ) = 16.859504132231405

2. Another way would be:

Last ( Flight::EngineEnd ) - Flight::EngineStart )

assuming the records are entered in order, or that the relationship is sorted.

  • Author

Thanks, Mr. V and Comment! The engine calc works like a charm.

As for the Time-Distance-Speed calcs, I tweaked the calcs by using the Round command( e.g., Round(Sum(Flight_Data::Time_Leg);1)) to clear things up.

Thanks for the suggestion, too--it's a good one.

Edited by Guest
New reponse by Comment

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

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.