1. bm1
Member
Join Date
Apr 2010
Posts
134

## Distance gauge

Hello.
Iam looking for a gauge for FS9/FSX that can tell me the current distance flown, in nm, while in flight.

2. Member
Join Date
Jul 2009
Posts
937
How do you define 'distance flown'?
-progress along the flightplan
-distance flown relative to the air (ie not corrected for wind)
-distance flown relative to the ground (ie corrected for wind)

3. bm1
Member
Join Date
Apr 2010
Posts
134
Sorry about not being clear what Iam seeking.

Distance flown meaning simply, speed (ground speed) X time (minutes, hours).

For example, if Iam dead reckoning a 500nm flight, I take off, following a heading corrected for wind, then at say 258nm from take off, I have a waypoint made and I need to change course to avoid a mountain or something, Iam looking for a gauge that can tell me that I am at 258nm from take off. Without using a gps or map.

Hope this clears up some questions. Thanks.

4. Member
Join Date
Jul 2009
Posts
937
Here is a quicky:
Code:
```<Gauge Name="DistanceFlown">
<Size X="100" Y="10"/>
<Update Frequency="1"/>

<Element>
<Select>
<Value>
(A:GROUND VELOCITY, knots) (P:ABSOLUTE TIME, seconds) (L:PrevTime, seconds) - 3600 / * (>L:DistanceFlown, nm)
(L:PrevTime, seconds) 0 == if{ 0 (>L:DistanceFlown, nm) }
(P:ABSOLUTE TIME, seconds) (>L:PrevTime, seconds)
</Value>
</Select>
</Element>

<Element>
<Position X="0" Y="0"/>
<String>%((L:DistanceFlown, nm))%!5.1f!</String>
</Text>
</Element>

<Mouse>

<Area Left="0" Top="0" Right="100" Bottom="10">
<Cursor Type="Hand" />
<Click> 0 (>L:DistanceFlown, nm) </Click>
</Area>

</Mouse>

</Gauge>```
It will show the distance flown in nm and if you click on it the distance will be reset to 0.

Save this as an .xml file in the fs\gauges folder and add it to your panel.

5. bm1
Member
Join Date
Apr 2010
Posts
134
Thanks a bunch jeroen79.

6. Junior Member
Join Date
May 2011
Posts
2
Hi, jeroen79, I'm trying to find a gauge similar to the above but displaying metres traveled, for figuring out take-off and landing distances.
I tried modifying the above gauge, but can't it to work (didn't work as originally entered above either). Could you take a look please? Bold items are modified items.
<Gauge Name="DistanceFlown">
<Size X="100" Y="10"/>
<Update Frequency="1"/>

<Element>
<Select>
<Value>
(A:GPS GROUND SPEED, Meters per second) (P:LOCAL TIME, seconds) (L:PrevTime, seconds) - 3600 / * (>L:DistanceTravelled, Meters)
(L:PrevTime, seconds) 0 == if{ 0 (>L:DistanceTravelled, Meters) }
(P:LOCAL TIME, seconds) (>L:PrevTime, seconds)
</Value>
</Select>
</Element>

<Element>
<Position X="0" Y="0"/>
<String>%((L:DistanceTravelled, Meters))%!04d!</String>
</Text>
</Element>

<Mouse>

<Area Left="0" Top="0" Right="100" Bottom="10">
<Cursor Type="Hand" />
<Click> 0 (>L:DistanceTravelled, Meters) </Click>
</Area>

</Mouse>

</Gauge>

Thanks.

7. The problem is in the units specified...
...these are the only valid unit declarations allowed:

meter per second, meters/second, m/s

As for the L:var units, typically one would choose either 'bool', 'boolean', 'number' or 'enum' (although truthfully anything may be used).

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•