# How to write this equation in LogStash lat = lat\_min + (Y \* lat\_range / y\_range) long = long\_min + (X \* long\_range / x\_range)

**URL:** https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572
**Category:** Logstash
**Created:** [July 18, 2017, 11:54am UTC](https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572 "2017-07-18T11:54:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Alex\_S](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@Alex\_S](https://discuss.elastic.co/u/Alex_S)
#### Post date: [July 18, 2017, 11:54am UTC](https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572/1 "2017-07-18T11:54:57Z")

</div>

Hello Geeks , I have a formula I want to write into LogStash but I don't know the syntax

lat = lat\_min + (Y \* lat\_range / y\_range)

long = long\_min + (X \* long\_range / x\_range)

Thanks :))

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [July 18, 2017, 11:58am UTC](https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572/2 "2017-07-18T11:58:46Z")

</div>

This looks like a duplicate of [How to write this algorithm in Logstash and display the new fields in Kibana](https://discuss.elastic.co/t/how-to-write-this-algorithm-in-logstash-and-display-the-new-fields-in-kibana/93534)

Please do not open multiple threads for a single issue.

---

<div class="post-metadata">

### Author: ![Alex\_S](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@Alex\_S](https://discuss.elastic.co/u/Alex_S)
#### Post date: [July 18, 2017, 12:10pm UTC](https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572/3 "2017-07-18T12:10:23Z")

</div>

Sure I'll delete the other thread thanks  
🙂

---

<div class="post-metadata">

### Author: ![Alex\_S](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@Alex\_S](https://discuss.elastic.co/u/Alex_S)
#### Post date: [July 18, 2017, 12:17pm UTC](https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572/4 "2017-07-18T12:17:41Z")

</div>

Hi @Christian_Dahlqvist  
Do you have any Idea on how I can write these equations into LogStash ? ?

Thanks

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [July 18, 2017, 12:21pm UTC](https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572/5 "2017-07-18T12:21:43Z")

</div>

You believe will need to use a Ruby filter.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 15, 2017, 12:21pm UTC](https://discuss.elastic.co/t/how-to-write-this-equation-in-logstash-lat-lat-min-y-lat-range-y-range-long-long-min-x-long-range-x-range/93572/6 "2017-08-15T12:21:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
