Name

sun observation, astronomic.sunobservation, kPMRPCAstronomicSunObservation — Calculate the time and date for an astronomical sun event.

Synopsis

void astronomic.sunobservation( at,
latitude,
longitude,
date);
at : string, choice, default;
latitude : real, default;
longitude : real, default;
date : date, default;

Description

Calculate the time and date for an astronomical sun event.

Returns a date for the given event. An empty response will be returned when the event does not occur on the date at the location.

Parameters

at. at is a string. If at is omitted, the default sunrise is used. at must be one of the following ten constants:

  • night end, kPMRPCParameterAt_SunObservation_NightEnd.
  • nautical dawn, kPMRPCParameterAt_SunObservation_NauticalDawn.
  • dawn, kPMRPCParameterAt_SunObservation_Dawn.
  • sunrise, kPMRPCParameterAt_SunObservation_Sunrise.
  • sunrise limit, kPMRPCParameterAt_SunObservation_SunriseLimit.
  • sunset limit, kPMRPCParameterAt_SunObservation_SunsetLimit.
  • sunset, kPMRPCParameterAt_SunObservation_Sunset.
  • dusk, kPMRPCParameterAt_SunObservation_Dusk.
  • nautical dusk, kPMRPCParameterAt_SunObservation_NauticalDusk.
  • night begin, kPMRPCParameterAt_SunObservation_NightBegin.

latitude. latitude is a real. If latitude is omitted, the default 51.476853 is used.

longitude. longitude is a real. If longitude is omitted, the default -0.0005 is used.

date. date is a date. If date is omitted, a default is created.

Security

sun observation can be requested by any authenticated client.

Unauthenticated clients are authorized using the uk.co.dssw.powermanager.astronomic.sunobservation right. By default, any local process can request sun observation.

Availablility

pmdctl

Examples

Example 17. C: Minimal astronomic.sunobservation

CFMutableDictionaryRef myRequest = PMRequestCreate(kCFAllocatorDefault, kPMRPCAstronomicSunObservation);