This will provide twilight times, as well as some other useful info. No today integration, as it's a Java application.
Compass for J2ME
by Dana Peters
Features
Use your cell phone as a compass. By rotating the phone so that the sun and/or moon icons match their location in the sky, the top of the phone will indicate true north.
Compatibility
Any cell phone or other mobile device with J2ME (Java 2 mobile edition).
Download
Version 4.1
Version 3.0
This older version can be useful for phones with limited memory.
Credits
Compass uses henson.midp.Float by
Nikolay Klimchuk.
Change Log
Version 4.1
- Fixed failure to load world map on Nokia 3rd edition phones.
- Improved format of info on Nokia phones.
- Reduced size of JAR by compressing world map images.
- Enlarged list of valid time zones for a given location.
- Improved "Please Wait" form with cancel option.
- Restored "Color" display option. Restored display of GTM. New icon.
Version 4.0
- User interface reorganized.
- Select location and destination using world map or airport code.
- Automatic daylight saving time adjustment.
- Load and save favorite locations or destinations.
- Display heading, distance, and local time of destination.
- Set arbitrary date and time.
- 12 hour or 24 hour time display option.
- "Prayer Focus" feature deprecated (replaced by "Destination").
- "Color" display option deprecated.
Version 3.0
- Displays times of sunrise, sunset, sun transit, moonrise, moonset, civil twilight, nautical twilight, and astronomical twilight.
- Phase of moon indicated by crescent shaped icon.
- Improved calculation accuracy.
Version 2.0
- Enter 3 or 4 letter airport code to indicate position instead of latitude and longitude. Airport database contains over 3000 airports, but consumes only 21K.
- Latitude / longitude entry is still permitted, and the problem with negative number entry is avoided by selecting North / South and West / East.
- Shows the great circle heading towards locations of religious significance. This feature provides the appropriate direction to face while praying for people of various faiths.
- Orientation options allow the screen to face down rather than up, and the top of the phone can point toward the sun or moon rather than North.
- Display options allow the color of the display to be selected. Different colors are available for day and night.
- Menu provides "Help" option to describe each selection.
- Display is automatically updated every 10 minutes.
- Displays "No Sun or Moon" if neither is present in the sky.
- Source code organization significantly improved.
FAQ
Q: How does it work?
A: Compass computes the sun and moon position using your latitude and longitude, and the time.
Q: Why do I need to select my time zone?
A: Compass knows your local time from your phone's real time clock, but astronomical computations need GTM (Greenwich Mean Time). By selecting the time zone, Compass can compute GTM from your local time.
Q: How can I find my airport code?
A: Use the
World Airport Codes web site.
Q: How do I know if my phone supports J2ME?
A: Consult the phone manufacturer's web site for specifications on your phone. Or start a game on your phone, and look for a "Java Powered" splash screen.
Q: How do I load this software on my phone?
A: Here are 4 possibilities:
- Start your WAP browser and enter the address qcontinuum.org/compass/compass.wml
- Start your WAP browser and enter wap.getjar.com, select "Quick Download", enter code 12347.
- If you have a cable to connect the phone to your PC, then use your phone vendor's software to copy compass.jar to the phone.
- If your phone is Bluetooth capable and supports OBEX file transfer, you may be able to use OBEX to copy compass.jar to your phone.
Q: How does Compass translate an airport code to the associated latitude / longitude?
A: Compass contains a database of 3000 global airports. The database is stored in a very efficient manner which requires only 21K of memory. The data was derived from the
Global Airport Database. See a
world map of the airport database.
Q: What algorithms does Compass use to perform astronomical calculations?
A: The calculations are based on algorithms from the book "
Astronomy on the Personal Computer".
Q: Thanks for the source code. Can I use it in my own application?
A: Yes, if you follow the terms of the
GNU General Public License.
No Warranty
Because this software is free of charge, there is no warranty. It is provided "as is" without warranty of any kind, either expressed or implied.