Suggestion: DistanceUnit.NAUTICALMILES is a worthy addition


(Brian Yoder) #1

Would it be reasonable to create an issue to request nautical miles ("nm"
as the abbreviation) for the DistanceUnit enumeration?

This would make it much more natural to adapt Elasticsearch for aircraft
planning / charting applications. Everything in that world is in nautical
miles and knots (nautical miles per hour).

Brian

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8ca57a9f-a8e0-4865-aaf7-2eee224822a8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Ivan Brusic) #2

Aircraft use nautical miles? You learn something new every day!

--
Ivan

On Mon, Feb 10, 2014 at 3:21 PM, InquiringMind brian.from.fl@gmail.comwrote:

Would it be reasonable to create an issue to request nautical miles ("nm"
as the abbreviation) for the DistanceUnit enumeration?

This would make it much more natural to adapt Elasticsearch for aircraft
planning / charting applications. Everything in that world is in nautical
miles and knots (nautical miles per hour).

Brian

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8ca57a9f-a8e0-4865-aaf7-2eee224822a8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCdNuCF4QN2hjW61oQKMODPZ3GGfywF2VATHSbPHjqyTw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Raffaele Sena) #3

One nautical mile is one minute of arc along the meridian line (one degree
of longitude), that makes it very easy to calculate distance on a chart
(independent on the vehicle used :slight_smile:

On Mon, Feb 10, 2014 at 3:27 PM, Ivan Brusic ivan@brusic.com wrote:

Aircraft use nautical miles? You learn something new every day!

--
Ivan

On Mon, Feb 10, 2014 at 3:21 PM, InquiringMind brian.from.fl@gmail.comwrote:

Would it be reasonable to create an issue to request nautical miles ("nm"
as the abbreviation) for the DistanceUnit enumeration?

This would make it much more natural to adapt Elasticsearch for aircraft
planning / charting applications. Everything in that world is in nautical
miles and knots (nautical miles per hour).

Brian

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8ca57a9f-a8e0-4865-aaf7-2eee224822a8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCdNuCF4QN2hjW61oQKMODPZ3GGfywF2VATHSbPHjqyTw%40mail.gmail.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CANKfucbO%2BgXXPLF52GnOeP5o5pq9kaRWQkSN%3DevHOJXe2kLFTA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Alexander Reelsen) #4

Hey,

never thought about such a use-case, but it sounds useful. Feel free to
create an issue, and even better, a pull request to add that functionality
to DistanceUnit

--Alex

On Tue, Feb 11, 2014 at 12:54 AM, Raffaele Sena raff367@gmail.com wrote:

One nautical mile is one minute of arc along the meridian line (one degree
of longitude), that makes it very easy to calculate distance on a chart
(independent on the vehicle used :slight_smile:

http://en.wikipedia.org/wiki/Nautical_mile

On Mon, Feb 10, 2014 at 3:27 PM, Ivan Brusic ivan@brusic.com wrote:

Aircraft use nautical miles? You learn something new every day!

--
Ivan

On Mon, Feb 10, 2014 at 3:21 PM, InquiringMind brian.from.fl@gmail.comwrote:

Would it be reasonable to create an issue to request nautical miles
("nm" as the abbreviation) for the DistanceUnit enumeration?

This would make it much more natural to adapt Elasticsearch for aircraft
planning / charting applications. Everything in that world is in nautical
miles and knots (nautical miles per hour).

Brian

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8ca57a9f-a8e0-4865-aaf7-2eee224822a8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCdNuCF4QN2hjW61oQKMODPZ3GGfywF2VATHSbPHjqyTw%40mail.gmail.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CANKfucbO%2BgXXPLF52GnOeP5o5pq9kaRWQkSN%3DevHOJXe2kLFTA%40mail.gmail.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9VGm0QW2gsb2TSDxjZVoLSmdrAdD6SxX5PuvOVkSEUiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Brian Yoder) #5

Alex,

I created issue https://github.com/elasticsearch/elasticsearch/issues/5085

I don't use GitHub that much, and I kinda muffed the issue, so I'll let
someone else add the one enumeration to wherever it should best go:

NAUTICALMILES(1852.0, "nm", "nmi"),

Thanks!

Brian

Brian

On Tuesday, February 11, 2014 8:25:03 AM UTC-5, Alexander Reelsen wrote:

Hey,

never thought about such a use-case, but it sounds useful. Feel free to
create an issue, and even better, a pull request to add that functionality
to DistanceUnit

--Alex

On Tue, Feb 11, 2014 at 12:54 AM, Raffaele Sena <raf...@gmail.com<javascript:>

wrote:

One nautical mile is one minute of arc along the meridian line (one
degree of longitude), that makes it very easy to calculate distance on a
chart (independent on the vehicle used :slight_smile:

http://en.wikipedia.org/wiki/Nautical_mile

On Mon, Feb 10, 2014 at 3:27 PM, Ivan Brusic <iv...@brusic.com<javascript:>

wrote:

Aircraft use nautical miles? You learn something new every day!

--
Ivan

On Mon, Feb 10, 2014 at 3:21 PM, InquiringMind <brian....@gmail.com<javascript:>

wrote:

Would it be reasonable to create an issue to request nautical miles
("nm" as the abbreviation) for the DistanceUnit enumeration?

This would make it much more natural to adapt Elasticsearch for
aircraft planning / charting applications. Everything in that world is in
nautical miles and knots (nautical miles per hour).

Brian

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/8ca57a9f-a8e0-4865-aaf7-2eee224822a8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCdNuCF4QN2hjW61oQKMODPZ3GGfywF2VATHSbPHjqyTw%40mail.gmail.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CANKfucbO%2BgXXPLF52GnOeP5o5pq9kaRWQkSN%3DevHOJXe2kLFTA%40mail.gmail.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/658b963d-f648-4066-adbd-eee4c80088de%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Brian Yoder) #6

Working on a pull request... I've created a fork off of master and cloned
it to my laptop. (First time using git and GitHub in this way...)

Brian

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/01e6926f-70af-4aa7-a24e-ab329bb9b908%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Ivan Brusic) #7

Create a branch for your changes. Submit a PR from the branch and not
master. Make sure to update DistanceUnitTests.java as well. The trickiest
part is getting the Elasticsearch team to notice your PR. :slight_smile: They must be
super busy with the 1.0 release.

Lots of tutorials online:

Cheers,

Ivan

On Tue, Feb 11, 2014 at 9:13 AM, InquiringMind brian.from.fl@gmail.comwrote:

Working on a pull request... I've created a fork off of master and cloned
it to my laptop. (First time using git and GitHub in this way...)

Brian

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/01e6926f-70af-4aa7-a24e-ab329bb9b908%40googlegroups.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC7apjv-7eKq8ugr1nGfxtGHAnvxAsDO_j%3Dp7gWibscYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Brian Yoder) #8

Ivan,

Thanks so much for the advice. I created the nm-branch (nautical miles
branch) off of master, then cloned it to my laptop. Found the two files
(DistanceUnit, and DistanceUnitTests). Made the (very simple) changes. Then
built ES and ran only the tests in DistanceUnitTests. The build was
surprisingly quick; the tests ran and succeeded:

$ mvn test -Dtests.class=org.elasticsearch.common.unit.DistanceUnitTests

[INFO] Your default console's encoding may not display certain unicode
glyphs: MacRoman
Executing 1 suite with 1 JVM.

Started J0 PID(9572@).
Suite: org.elasticsearch.common.unit.DistanceUnitTests
Completed in 0.54s, 2 tests

[INFO] JVM J0: 0.44 .. 1.56 = 1.12s
[INFO] Execution time total: 1.57 sec.
[INFO] Tests summary: 1 suite, 2 tests
[INFO]

[INFO] BUILD SUCCESS
[INFO]

[INFO] Total time: 8.507s
[INFO] Finished at: Tue Feb 11 15:57:37 EST 2014
[INFO] Final Memory: 10M/123M
[INFO]

Here is the pull request:

Please let me know if anything is amiss. This is my first actual use of
GitHub. A local git expert offered his advice as well, but any errors are
mine and no one else's.

Brian

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1ed828ce-77e6-46cc-851b-90c0b27d05bb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Brian Yoder) #9

Raffaele,

Thanks! Also, note the range (that is, maximum distance traveled with
appropriate fuel minimums) of the following aircraft. All are in nm(nautical miles):

http://www.gulfstream.com/careers/our_products.html

Cool stuff! (Now back to work!)

Brian

On Monday, February 10, 2014 6:54:44 PM UTC-5, Raffaele Sena wrote:

One nautical mile is one minute of arc along the meridian line (one
degree of longitude), that makes it very easy to calculate distance on a
chart (independent on the vehicle used :slight_smile:

http://en.wikipedia.org/wiki/Nautical_milehttp://en.wikipedia.org/wiki/Nautical_mile

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9e4065fa-160f-4bd5-a4f3-b1ad85f17d2e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Ivan Brusic) #10

I'm glad I was able to steer you in the right direction. I flubbed a PR
recently since I have not used git consistently in the past few years, so I
am glad someone else can learn from my mistakes. Your PR seemed to have
gained some attention! :slight_smile:

Ivan

On Tue, Feb 11, 2014 at 1:17 PM, InquiringMind brian.from.fl@gmail.comwrote:

Ivan,

Thanks so much for the advice. I created the nm-branch (nautical miles
branch) off of master, then cloned it to my laptop. Found the two files
(DistanceUnit, and DistanceUnitTests). Made the (very simple) changes. Then
built ES and ran only the tests in DistanceUnitTests. The build was
surprisingly quick; the tests ran and succeeded:

$ mvn test -Dtests.class=org.elasticsearch.common.unit.DistanceUnitTests

[INFO] Your default console's encoding may not display certain unicode
glyphs: MacRoman
Executing 1 suite with 1 JVM.

Started J0 PID(9572@).
Suite: org.elasticsearch.common.unit.DistanceUnitTests
Completed in 0.54s, 2 tests

[INFO] JVM J0: 0.44 .. 1.56 = 1.12s
[INFO] Execution time total: 1.57 sec.
[INFO] Tests summary: 1 suite, 2 tests
[INFO]

[INFO] BUILD SUCCESS
[INFO]

[INFO] Total time: 8.507s
[INFO] Finished at: Tue Feb 11 15:57:37 EST 2014
[INFO] Final Memory: 10M/123M
[INFO]

Here is the pull request:
https://github.com/elasticsearch/elasticsearch/pull/5088

Please let me know if anything is amiss. This is my first actual use of
GitHub. A local git expert offered his advice as well, but any errors are
mine and no one else's.

Brian

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1ed828ce-77e6-46cc-851b-90c0b27d05bb%40googlegroups.com
.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCaCWYy0EUmEFk3GwKf48CM5QVL_Ska-K_TdeUTx-WZNw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #11